diff options
author | Matthias Clasen <mclasen@redhat.com> | 2022-01-23 22:43:45 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2022-01-25 15:29:16 -0500 |
commit | 3e2f610a4f150b03deef6be44717f7675884ae8d (patch) | |
tree | de61b863aac8cf34913c386d70eaf67b63fc64b9 | |
parent | ccc60eb794524b53642e0b94b32ae1c7a1770dce (diff) | |
download | pango-3e2f610a4f150b03deef6be44717f7675884ae8d.tar.gz |
layout-run: Use line spacing
Take line spacing into account when determining
the leading to use for logical extents. We add
line spacing when we use gap metrics from the
font, and ignore it when line height is determined
by line height attributes.
-rw-r--r-- | pango/pango-layout-run.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pango/pango-layout-run.c b/pango/pango-layout-run.c index 90edb3f0..f17ca084 100644 --- a/pango/pango-layout-run.c +++ b/pango/pango-layout-run.c @@ -160,7 +160,7 @@ pango_layout_run_get_extents (PangoLayoutRun *run, if (!metrics) metrics = pango_font_get_metrics (glyph_item->item->analysis.font, glyph_item->item->analysis.language); - leading = MAX (metrics->height - (metrics->ascent + metrics->descent), 0); + leading = MAX (metrics->height - (metrics->ascent + metrics->descent) + properties.line_spacing, 0); } if ((trim & PANGO_LEADING_TRIM_START) == 0) logical_rect->y -= leading / 2; |