diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-03-17 22:49:38 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-03-21 12:26:26 -0400 |
commit | fdc432bc8d9222538bbcc3e973ce1a3a6a86fb5b (patch) | |
tree | 03161b6a590b4d2af85f19a21ac62c2d0dffc2d9 /pango | |
parent | e2b86200e54ce8b7917f36bb09fa45dc5dbd66a8 (diff) | |
download | pango-fdc432bc8d9222538bbcc3e973ce1a3a6a86fb5b.tar.gz |
Improve letterspacing with marksfix-letterspacing
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
Diffstat (limited to 'pango')
-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 8cca8627..08bb8762 100644 --- a/pango/pango-glyph-item.c +++ b/pango/pango-glyph-item.c @@ -760,7 +760,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 */ { |