From 2fc90e362cb8526da36f799284df6ed042d7dd58 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sat, 5 Sep 2009 12:35:05 +0000 Subject: Fix missing characters svn path=/trunk/netsurf/; revision=9540 --- amiga/font.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'amiga/font.c') diff --git a/amiga/font.c b/amiga/font.c index 75d149a3b..80724429d 100644 --- a/amiga/font.c +++ b/amiga/font.c @@ -182,7 +182,6 @@ bool nsfont_split(const plot_font_style_t *fstyle, uint32 tx=0,i=0; size_t len; int utf8len, utf8clen = 0; - bool found = false; len = utf8_bounded_length(string, length); if(utf8_to_enc((char *)string,"UTF-16",length,(char **)&utf16) != UTF8_CONVERT_OK) return false; @@ -194,6 +193,8 @@ bool nsfont_split(const plot_font_style_t *fstyle, for(i=0;iolf_EEngine, OT_GlyphCode,*utf16, TAG_END) == OTERR_Success) @@ -202,20 +203,19 @@ bool nsfont_split(const plot_font_style_t *fstyle, OT_GlyphMap8Bit,&glyph, TAG_END) == 0) { - if(x < (tx + glyph->glm_X1)) + tx+= glyph->glm_X1; + + if(x < tx) { i = length+1; } else { - if(*string == ' ') //*utf16 == 0x0020) + if(string[utf8clen] == ' ') //*utf16 == 0x0020) { *actual_x = tx; *char_offset = utf8clen; - //found = true; } - - tx+= glyph->glm_X1; } EReleaseInfo(&ofont->olf_EEngine, @@ -229,18 +229,9 @@ bool nsfont_split(const plot_font_style_t *fstyle, else utf16 += 2; - utf8len = utf8_char_byte_length(string); - string += utf8len; utf8clen += utf8len; } -/* - if(found == false) - { - *char_offset = utf8clen; - *actual_x = tx; - } -*/ free(outf16); return true; -- cgit v1.2.3