diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2013-02-10 21:52:36 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2013-02-10 21:52:36 +0000 |
commit | 315f5a8ca13f680bd1111b5108e8c3c23131f1f7 (patch) | |
tree | 6b19c99895d21e3d53a68338ab99c4b94256f8b7 /atari/plot/font_freetype.c | |
parent | ceb1668a8aede4d517a843e89361429a48a636b6 (diff) | |
parent | f6703dcbaab1dd9d434a039709fa4ddeb8b20988 (diff) | |
download | netsurf-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-x | atari/plot/font_freetype.c | 5 |
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;
|