Fix line wrap at word end when string widths are true double values (non integer).
Useful for rescaling that creates non-integer string widths. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12176 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
3ce40f3faf
commit
a2f22358cd
@ -64,7 +64,7 @@ static const char* expand_text_(const char* from, char*& buf, int maxbuf, double
|
||||
// test for word-wrap:
|
||||
if (word_start < p && wrap) {
|
||||
double newwidth = w + fl_width(word_end, (int) (o-word_end) );
|
||||
if (word_end > buf && newwidth > maxw) { // break before this word
|
||||
if (word_end > buf && int(newwidth) > maxw) { // break before this word
|
||||
o = word_end;
|
||||
p = word_start;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user