summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-08-29 18:09:25 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-08-29 18:09:25 -0400
commit9a9b9a3bc5e4b63c66a06a8361e0c19de22e6868 (patch)
tree0a3638a771d727b5633d290da549eccb0706ff10 /pango
parent41eac9414a8ac4f4a72eb9c57fcb3df5e0945731 (diff)
downloadpango-9a9b9a3bc5e4b63c66a06a8361e0c19de22e6868.tar.gz
layout: Apply rise to cluster extents
This has been broken all along. :(
Diffstat (limited to 'pango')
-rw-r--r--pango/pango-layout.c6
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);
}
}