summaryrefslogtreecommitdiff
path: root/atari/plot/font_freetype.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-02-10 21:52:36 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2013-02-10 21:52:36 +0000
commit315f5a8ca13f680bd1111b5108e8c3c23131f1f7 (patch)
tree6b19c99895d21e3d53a68338ab99c4b94256f8b7 /atari/plot/font_freetype.c
parentceb1668a8aede4d517a843e89361429a48a636b6 (diff)
parentf6703dcbaab1dd9d434a039709fa4ddeb8b20988 (diff)
downloadnetsurf-315f5a8ca13f680bd1111b5108e8c3c23131f1f7.tar.gz
netsurf-315f5a8ca13f680bd1111b5108e8c3c23131f1f7.tar.bz2
Merge branch 'master' of git://git.netsurf-browser.org/netsurf
Conflicts: gtk/font_pango.c Conflict resolved.
Diffstat (limited to 'atari/plot/font_freetype.c')
-rwxr-xr-xatari/plot/font_freetype.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/atari/plot/font_freetype.c b/atari/plot/font_freetype.c
index 8db7cc2c0..ed850bce2 100755
--- a/atari/plot/font_freetype.c
+++ b/atari/plot/font_freetype.c
@@ -443,8 +443,9 @@ static int str_split( FONT_PLOTTER self, const plot_font_style_t *fstyle,
last_space_idx = nxtchr;
}
*actual_x += glyph->advance.x >> 16;
- if (*actual_x > x) {
- /* string has exceeded available width return previous space*/
+ if (*actual_x > x && last_space_idx != 0) {
+ /* string has exceeded available width and we've
+ * found a space; return previous space */
*actual_x = last_space_x;
*char_offset = last_space_idx;
return true;