[pango/pango-1-46: 8/9] Improve letterspacing with marks
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/pango-1-46: 8/9] Improve letterspacing with marks
- Date: Sun, 9 May 2021 01:32:55 +0000 (UTC)
commit 00e222ab045f0956c16621aaadab4c76248f9bdb
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
(cherry-picked from commit fdc432bc)
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 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 */
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]