diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2012-05-02 18:29:59 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2012-05-02 18:29:59 +0000 |
commit | a4ff885365f95afb672efea589ed30b0a2ae47b0 (patch) | |
tree | 99dc944fad3552dae9d1f72a44336a4db930f5c1 /amiga | |
parent | a44ead03cff7dd69d821b3b3e17095ed142951d8 (diff) | |
download | netsurf-a4ff885365f95afb672efea589ed30b0a2ae47b0.tar.gz netsurf-a4ff885365f95afb672efea589ed30b0a2ae47b0.tar.bz2 |
Ensure we are using the faster(?) character size functions in all
applicable places.
svn path=/trunk/netsurf/; revision=13901
Diffstat (limited to 'amiga')
-rw-r--r-- | amiga/font.c | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/amiga/font.c b/amiga/font.c index 2f3817e7d..ef35cb23b 100644 --- a/amiga/font.c +++ b/amiga/font.c @@ -724,12 +724,21 @@ ULONG ami_unicode_text(struct RastPort *rp,const char *string,ULONG length,const 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) - tempx = ami_font_plot_glyph(ofont, rp, *utf16, utf16next, dx + x, dy, emwidth); + 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) { @@ -740,14 +749,22 @@ ULONG ami_unicode_text(struct RastPort *rp,const char *string,ULONG length,const 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); + } } */ } |