r13901 chris_y - /trunk/netsurf/amiga/font.c

netsurf at semichrome.net netsurf at semichrome.net
Wed May 2 19:29:59 BST 2012


Author: chris_y
Date: Wed May  2 13:29:59 2012
New Revision: 13901

URL: http://source.netsurf-browser.org?rev=13901&view=rev
Log:
Ensure we are using the faster(?) character size functions in all
applicable places.

Modified:
    trunk/netsurf/amiga/font.c

Modified: trunk/netsurf/amiga/font.c
URL: http://source.netsurf-browser.org/trunk/netsurf/amiga/font.c?rev=13901&r1=13900&r2=13901&view=diff
==============================================================================
--- trunk/netsurf/amiga/font.c (original)
+++ trunk/netsurf/amiga/font.c Wed May  2 13:29:59 2012
@@ -724,14 +724,23 @@
 			utf16charsc = ami_font_translate_smallcaps(*utf16);
 			utf16nextsc = ami_font_translate_smallcaps(utf16next);
 
-			tempx = ami_font_plot_glyph(ofont, rp, utf16charsc, utf16nextsc, dx + x, dy, emwidth);
+			if(rp) {
+				tempx = ami_font_plot_glyph(ofont, rp, utf16charsc, utf16nextsc, dx + x, dy, emwidth);
+			} else {
+				tempx = ami_font_width_glyph(ofont, utf16charsc, utf16nextsc, emwidth);
+			}
 		}
 		else tempx = 0;
 
+		if(tempx == 0) {
+			if(rp) {
+				tempx = ami_font_plot_glyph(ofont, rp, *utf16, utf16next, dx + x, dy, emwidth);
+			} else {
+				tempx = ami_font_width_glyph(ofont, *utf16, utf16next, emwidth);
+			}
+		}
+
 		if(tempx == 0)
-			tempx = ami_font_plot_glyph(ofont, rp, *utf16, utf16next, dx + x, dy, emwidth);
-
-		if(tempx == 0)
 		{
 			if(ufont == NULL)
 			{
@@ -740,14 +749,22 @@
 
 			if(ufont)
 			{
-				tempx = ami_font_plot_glyph(ufont, rp, *utf16, utf16next,
-							dx + x, dy, emwidth);
+				if(rp) {
+					tempx = ami_font_plot_glyph(ufont, rp, *utf16, utf16next,
+												dx + x, dy, emwidth);
+				} else {
+					tempx = ami_font_width_glyph(ufont, *utf16, utf16next, emwidth);
+				}
 			}
 /*
 			if(tempx == 0)
 			{
-				tempx = ami_font_plot_glyph(ofont, rp, 0xfffd, utf16next,
-							dx + x, dy, emwidth);
+				if(rp) {
+					tempx = ami_font_plot_glyph(ofont, rp, 0xfffd, utf16next,
+												dx + x, dy, emwidth);
+				} else {
+					tempx = ami_font_width_glyph(ofont, 0xfffd, utf16next, emwidth);
+				}
 			}
 */
 		}




More information about the netsurf-commits mailing list