summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-11-16 18:22:32 -0500
committerMatthias Clasen <mclasen@redhat.com>2021-11-16 18:22:32 -0500
commit82cea295cf3ad21260b35be2ef2aaa30325d272a (patch)
treed246a5417923c8eb14ce8a9f0c6ff71e391f849e
parent05ea7f4f9905921746fa033a2cd7614148fb8242 (diff)
downloadpango-82cea295cf3ad21260b35be2ef2aaa30325d272a.tar.gz
Fix a thinko in zero_line_final_space
We must not add the width of the space back to remaining_width, since we're just correcting the glyphs to match the accounting that process_item has already done. This was showing up as justification operating on wrong numbers when justifying lines with a final space, leading to uneven margins.
-rw-r--r--pango/pango-layout.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 1e8f1087..f820a6c6 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -6003,7 +6003,6 @@ zero_line_final_space (PangoLayoutLine *line,
}
g_debug ("zero line final space: collapsing the space");
- state->remaining_width += glyphs->glyphs[glyph].geometry.width;
glyphs->glyphs[glyph].geometry.width = 0;
glyphs->glyphs[glyph].glyph = PANGO_GLYPH_EMPTY;
}