diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-08-29 22:43:23 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-08-29 22:43:23 +0000 |
commit | f7a99fd86067f0ed9baa466d0f612365462cca20 (patch) | |
tree | cc879b32eb67677a88d475fbf01efaa91a464a01 /pango | |
parent | d37bfbfeaa900c0c95a42244a04785127f404a19 (diff) | |
parent | 6e2596ae578a22eda9794a7b23c9ac4c8cdef35b (diff) | |
download | pango-f7a99fd86067f0ed9baa466d0f612365462cca20.tar.gz |
Merge branch 'matthiasc/for-main' into 'main'
layout: Apply rise to cluster extents
See merge request GNOME/pango!457
Diffstat (limited to 'pango')
-rw-r--r-- | pango/pango-layout.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pango/pango-layout.c b/pango/pango-layout.c index 4235b7f3..5aa9ee12 100644 --- a/pango/pango-layout.c +++ b/pango/pango-layout.c @@ -7093,6 +7093,8 @@ pango_layout_iter_get_cluster_extents (PangoLayoutIter *iter, PangoRectangle *ink_rect, PangoRectangle *logical_rect) { + ItemProperties properties; + if (ITER_IS_INVALID (iter)) return; @@ -7105,6 +7107,8 @@ pango_layout_iter_get_cluster_extents (PangoLayoutIter *iter, return; } + pango_layout_get_item_properties (iter->run->item, &properties); + pango_glyph_string_extents_range (iter->run->glyphs, iter->cluster_start, iter->next_cluster_glyph, @@ -7115,6 +7119,7 @@ pango_layout_iter_get_cluster_extents (PangoLayoutIter *iter, if (ink_rect) { ink_rect->x += iter->cluster_x; + ink_rect->y -= properties.rise; offset_y (iter, &ink_rect->y); } @@ -7122,6 +7127,7 @@ pango_layout_iter_get_cluster_extents (PangoLayoutIter *iter, { g_assert (logical_rect->width == iter->cluster_width); logical_rect->x += iter->cluster_x; + logical_rect->y -= properties.rise; offset_y (iter, &logical_rect->y); } } |