summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-05-09 03:17:04 +0000
committerMatthias Clasen <mclasen@redhat.com>2021-05-09 03:17:04 +0000
commit69441dbe8761f7e74d6caad7c4a1e01f91f439ef (patch)
tree181e2c12353ce4b7e941dc43444ed8aaab80fbc7
parentb3ebe097a3042737165ba497dc5b08f235df8167 (diff)
parent1661f1b2c1651009c324f851eeee1957db097910 (diff)
downloadpango-69441dbe8761f7e74d6caad7c4a1e01f91f439ef.tar.gz
Merge branch 'fix-empty-line-spacing' into 'master'
layout: handle empty lines better Closes #499 See merge request GNOME/pango!324
-rw-r--r--pango/pango-layout.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 57ec7606..c483526f 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -5213,8 +5213,15 @@ pango_layout_line_get_extents_and_height (PangoLayoutLine *line,
tmp_list = tmp_list->next;
}
- if (logical_rect && !line->runs)
- pango_layout_line_get_empty_extents (line, logical_rect);
+ if (!line->runs)
+ {
+ PangoRectangle r, *rect;
+
+ rect = logical_rect ? logical_rect : &r;
+ pango_layout_line_get_empty_extents (line, rect);
+ if (height)
+ *height = rect->height;
+ }
if (caching)
{