From 9a9b9a3bc5e4b63c66a06a8361e0c19de22e6868 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 29 Aug 2021 18:09:25 -0400 Subject: layout: Apply rise to cluster extents This has been broken all along. :( --- pango/pango-layout.c | 6 ++++++ 1 file changed, 6 insertions(+) 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); } } -- cgit v1.2.1