diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-05-08 22:17:54 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-05-08 22:17:54 -0400 |
commit | 1661f1b2c1651009c324f851eeee1957db097910 (patch) | |
tree | 181e2c12353ce4b7e941dc43444ed8aaab80fbc7 /pango | |
parent | b3ebe097a3042737165ba497dc5b08f235df8167 (diff) | |
download | pango-1661f1b2c1651009c324f851eeee1957db097910.tar.gz |
layout: handle empty lines betterfix-empty-line-spacing
When using line-spacing, we were not giving
empty lines their expected width. Fix that.
Fixes: #499
Diffstat (limited to 'pango')
-rw-r--r-- | pango/pango-layout.c | 11 |
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) { |