Author: chris_y
Date: Wed Sep 23 16:52:36 2009
New Revision: 9597
URL:
http://source.netsurf-browser.org?rev=9597&view=rev
Log:
fix text cursor positioning some more
Modified:
trunk/netsurf/amiga/font.c
Modified: trunk/netsurf/amiga/font.c
URL:
http://source.netsurf-browser.org/trunk/netsurf/amiga/font.c?rev=9597&...
==============================================================================
--- trunk/netsurf/amiga/font.c (original)
+++ trunk/netsurf/amiga/font.c Wed Sep 23 16:52:36 2009
@@ -94,7 +94,7 @@
struct OutlineFont *ofont;
struct GlyphMap *glyph;
uint32 tx=0,i=0;
- size_t len,utf8len;
+ size_t len, utf8len = 0;
uint8 *utf8;
uint32 co = 0;
int utf16charlen;
@@ -113,9 +113,6 @@
utf16charlen = 1;
else
utf16charlen = 2;
-
- utf8len = utf8_char_byte_length(string);
- string += utf8len;
if(ESetInfo(&ofont->olf_EEngine,
OT_GlyphCode,*utf16,
@@ -142,10 +139,13 @@
TAG_END);
}
}
+
+ utf8len = utf8_char_byte_length(string);
+ string += utf8len;
utf16 += utf16charlen;
}
- if(co == length)
+ if(co == (length - 1))
{
*actual_x = tx;
co = length;