Take right margin into account for text inset width

This is particularly important for contents in RtL languages, where
the right margin may contain the paragraph indentation, or
itemize/enumeration symbols.

Fixes bug #12030.
This commit is contained in:
Jean-Marc Lasgouttes 2020-11-17 17:47:22 +01:00
parent 5ddd82bcea
commit 875b1def4f

View File

@ -550,7 +550,7 @@ bool TextMetrics::redoParagraph(pit_type const pit, bool const align_rows)
first = row.endpos();
++row_index;
pm.dim().wid = max(pm.dim().wid, row.width());
pm.dim().wid = max(pm.dim().wid, row.width() + row.right_margin);
pm.dim().des += row.height();
} while (first < par.size() || need_new_row);