summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2013-05-25 14:05:32 +0100
committerChris Young <chris@unsatisfactorysoftware.co.uk>2013-05-25 14:05:32 +0100
commit4a618b7040022b9f1b18d030139f09ddabc4e3e3 (patch)
tree63418571a18c10c48fb491442ecda1094351b091
parentb66775dc53f4117868e66d829d7fc37572865235 (diff)
downloadnetsurf-4a618b7040022b9f1b18d030139f09ddabc4e3e3.tar.gz
netsurf-4a618b7040022b9f1b18d030139f09ddabc4e3e3.tar.bz2
Another attempt to fix the moving split position when a string fits exactly.
-rwxr-xr-xamiga/font.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/amiga/font.c b/amiga/font.c
index 441f4d408..68ec8da1a 100755
--- a/amiga/font.c
+++ b/amiga/font.c
@@ -308,7 +308,7 @@ bool nsfont_split(const plot_font_style_t *fstyle,
*char_offset = 0;
*actual_x = 0;
- while (utf8_pos < length) {
+ while (utf8_pos <= length) {
if ((*utf16 < 0xD800) || (0xDBFF < *utf16))
utf16charlen = 1;
else
@@ -341,15 +341,14 @@ bool nsfont_split(const plot_font_style_t *fstyle,
}
}
- tx+= tempx;
-
if ((x < tx) && (*char_offset != 0)) {
/* Reached available width, and a space was found;
* split there. */
free(outf16);
return true;
}
-
+
+ tx += tempx;
utf16 = utf16next;
utf8_pos = utf8_next(string, length, utf8_pos);
}