[pango/fix-letterspacing] Improve letterspacing with marks




commit bbcfecf8c43937febbdb9b3935e5fc5d7bfaeeff
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Mar 17 22:49:38 2021 -0400

    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

 pango/pango-glyph-item.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/pango/pango-glyph-item.c b/pango/pango-glyph-item.c
index 8cca8627..d1d44189 100644
--- a/pango/pango-glyph-item.c
+++ b/pango/pango-glyph-item.c
@@ -760,7 +760,13 @@ 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)
+            {
+              glyphs[iter.start_glyph].geometry.x_offset -= space_right;
+            }
+          continue;
+        }
 
       if (iter.start_glyph < iter.end_glyph) /* LTR */
        {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]