From cd54bd4c1e2368cb1de1d3c98b609cf802e849aa Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 18 Dec 2021 19:25:21 -0500 Subject: Improve line width accounting We want to avoid trading chars for hyphens in the margin beyond the set width. Fixes: #646 --- pango/pango-layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pango/pango-layout.c b/pango/pango-layout.c index a133afe6..3f11d5b0 100644 --- a/pango/pango-layout.c +++ b/pango/pango-layout.c @@ -4234,7 +4234,7 @@ retry_break: if (break_num_chars == item->num_chars || new_break_width + extra_width <= state->remaining_width || - new_break_width + extra_width <= break_width + break_extra_width) + new_break_width + extra_width < break_width + break_extra_width) { DEBUG1 ("accept breakpoint %d: %d + %d <= %d + %d", num_chars, new_break_width, extra_width, break_width, break_extra_width); -- cgit v1.2.1