diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2009-09-05 12:35:05 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2009-09-05 12:35:05 +0000 |
commit | 2fc90e362cb8526da36f799284df6ed042d7dd58 (patch) | |
tree | d1e6b5193a204f1f9299097b4ef2ee2e6b1cb39d /amiga | |
parent | b322e5d8d686874e998d61b2fea75f5236f0216f (diff) | |
download | netsurf-2fc90e362cb8526da36f799284df6ed042d7dd58.tar.gz netsurf-2fc90e362cb8526da36f799284df6ed042d7dd58.tar.bz2 |
Fix missing characters
svn path=/trunk/netsurf/; revision=9540
Diffstat (limited to 'amiga')
-rw-r--r-- | amiga/font.c | 21 |
1 files changed, 6 insertions, 15 deletions
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;i<len;i++) { + utf8len = utf8_char_byte_length(string+utf8clen); + if(ESetInfo(&ofont->olf_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; |