Try to avoid the split point jumping around when it occurs exactly on the boundary requested
This commit is contained in:
parent
13e667ff78
commit
5fcdbb80f0
|
@ -341,15 +341,14 @@ bool nsfont_split(const plot_font_style_t *fstyle,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tx += tempx;
|
|
||||||
|
|
||||||
if ((x < tx) && (*char_offset != 0)) {
|
if ((x < tx) && (*char_offset != 0)) {
|
||||||
/* Reached available width, and a space was found;
|
/* Reached available width, and a space was found;
|
||||||
* split there. */
|
* split there. */
|
||||||
free(outf16);
|
free(outf16);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tx += tempx;
|
||||||
utf16 = utf16next;
|
utf16 = utf16next;
|
||||||
utf8_pos = utf8_next(string, length, utf8_pos);
|
utf8_pos = utf8_next(string, length, utf8_pos);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue