diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-03-17 22:49:38 -0400 |
---|---|---|
committer | Marco Trevisan (TreviƱo) <mail@3v1n0.net> | 2021-05-05 17:32:56 +0200 |
commit | 00e222ab045f0956c16621aaadab4c76248f9bdb (patch) | |
tree | 582ae0983ef4fb5857e652c4d4ef36d1b210709d /pango/pango-glyph-item.c | |
parent | d59071e02bbc3e6732cf8176e41ef2cc3adb1849 (diff) | |
download | pango-00e222ab045f0956c16621aaadab4c76248f9bdb.tar.gz |
Improve letterspacing with marks
harfbuzz puts marks into their own clusters, so we need
to work a little harder to keep non-spacing marks placed
over their base character.
Fixes: #541
(cherry-picked from commit fdc432bc)
Diffstat (limited to 'pango/pango-glyph-item.c')
-rw-r--r-- | pango/pango-glyph-item.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pango/pango-glyph-item.c b/pango/pango-glyph-item.c index 326ae37f..e38de730 100644 --- a/pango/pango-glyph-item.c +++ b/pango/pango-glyph-item.c @@ -753,7 +753,16 @@ pango_glyph_item_letter_space (PangoGlyphItem *glyph_item, have_cluster = pango_glyph_item_iter_next_cluster (&iter)) { if (!log_attrs[iter.start_char].is_cursor_position) - continue; + { + if (glyphs[iter.start_glyph].geometry.width == 0) + { + if (iter.start_glyph < iter.end_glyph) /* LTR */ + glyphs[iter.start_glyph].geometry.x_offset -= space_right; + else + glyphs[iter.start_glyph].geometry.x_offset += space_left; + } + continue; + } if (iter.start_glyph < iter.end_glyph) /* LTR */ { |