diff options
Diffstat (limited to 'pango/pango-layout-line.c')
-rw-r--r-- | pango/pango-layout-line.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/pango/pango-layout-line.c b/pango/pango-layout-line.c index f7150598..3f1583a5 100644 --- a/pango/pango-layout-line.c +++ b/pango/pango-layout-line.c @@ -920,6 +920,31 @@ pango_layout_line_justify (PangoLayoutLine *line, * If you need extents with trimmed leading, use [method@Pango.LayoutLine.get_trimmed_extents]. * * Note that the origin is at the left end of the baseline. + * + * Pango is following CSS in splitting the external leading, and giving one half of it + * to the line above, and the other half the the line below. Unless the line height is set + * via attributes, the external leading is determined as the difference between the + * height and ascent + descent in font metrics: + * + * <picture> + * <source srcset="line-height1-dark.png" media="(prefers-color-scheme: dark)"> + * <img alt="Pango Font Metrics" src="line-height1-light.png"> + * </picture> + * + * If spacing is set, it also gets split, for the purpose of determining the + * logical extents. + * + * <picture> + * <source srcset="line-height2-dark.png" media="(prefers-color-scheme: dark)"> + * <img alt="Pango Extents and Spacing" src="line-height2-light.png"> + * </picture> + * + * If line height is set, it determines the logical extents. + * + * <picture> + * <source srcset="line-height3-dark.png" media="(prefers-color-scheme: dark)"> + * <img alt="Pango Extents and Line Height" src="line-height3-light.png"> + * </picture> */ void pango_layout_line_get_extents (PangoLayoutLine *line, |