[pango/gravity-fixes: 2/2] Fix line heights in improper gravities
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/gravity-fixes: 2/2] Fix line heights in improper gravities
- Date: Sun, 28 Nov 2021 04:39:36 +0000 (UTC)
commit c9f80afa019c4fe6bdb5b3a2f56646a525c9e847
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Nov 27 23:37:23 2021 -0500
Fix line heights in improper gravities
Without this, we end up with line height being
zero in gravity north or west. The visible symptom
is that wrapped lines are drawn on top of each
other with line-height != 0.
Fixes: #631
pango/pango-layout.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 40e24cbb..7b32eeef 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -5664,7 +5664,7 @@ pango_layout_line_get_extents_and_height (PangoLayoutLine *line,
}
if (height)
- *height = MAX (*height, run_height);
+ *height = MAX (*height, abs (run_height));
x_pos += run_logical.width;
tmp_list = tmp_list->next;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]