Fix min_max line width calc to include box spaces.

This commit is contained in:
Michael Drake 2013-01-02 12:46:17 +00:00
parent 33934e1271
commit 8bf3346ce2

View File

@ -3045,11 +3045,15 @@ struct box *layout_minmax_line(struct box *first,
&fixed, &frac);
if (0 < fixed)
max += fixed;
if (b->next && b->space == UNKNOWN_WIDTH) {
font_func->font_width(&fstyle, " ", 1,
&b->space);
if (b->next) {
if (b->space == UNKNOWN_WIDTH) {
font_func->font_width(&fstyle, " ", 1,
&b->space);
}
max += b->space;
}
*line_has_height = true;
continue;
}
@ -3095,9 +3099,11 @@ struct box *layout_minmax_line(struct box *first,
}
}
max += b->width;
if (b->next && b->space == UNKNOWN_WIDTH) {
font_func->font_width(&fstyle, " ", 1,
&b->space);
if (b->next) {
if (b->space == UNKNOWN_WIDTH) {
font_func->font_width(&fstyle, " ", 1,
&b->space);
}
max += b->space;
}