[pango/fix-letterspacing: 8/8] Improve letterspacing with marks
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/fix-letterspacing: 8/8] Improve letterspacing with marks
- Date: Sun, 21 Mar 2021 16:26:42 +0000 (UTC)
commit fdc432bc8d9222538bbcc3e973ce1a3a6a86fb5b
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 | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
---
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 */
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]