[pango/pango2: 117/195] run: Use line spacing
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/pango2: 117/195] run: Use line spacing
- Date: Mon, 6 Jun 2022 04:14:43 +0000 (UTC)
commit 7c0af7df8740cf8884a96a1f4b770df4a1436388
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Jan 23 22:43:45 2022 -0500
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.
pango/pango-run.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/pango/pango-run.c b/pango/pango-run.c
index 01ecb8d6..a011395d 100644
--- a/pango/pango-run.c
+++ b/pango/pango-run.c
@@ -189,7 +189,7 @@ pango_run_get_extents (PangoRun *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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]