summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-09-24 16:17:35 +0000
committerMatthias Clasen <mclasen@redhat.com>2021-09-24 16:17:35 +0000
commit20967565edabb728b3826ff1501a8081d6e322ad (patch)
treeba91a2f075700896da32f57fd56c425353d2815d
parentba247af646863c2ca6b4095b068eeae0a929af84 (diff)
parent2e49eb0c706b5124e7acc30d098564aa929296ae (diff)
downloadpango-20967565edabb728b3826ff1501a8081d6e322ad.tar.gz
Merge branch 'fix-underlined-spaces' into 'main'
Underline spaces again Closes #613 See merge request GNOME/pango!478
-rw-r--r--pango/pango-renderer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pango/pango-renderer.c b/pango/pango-renderer.c
index b3b70549..311c28cd 100644
--- a/pango/pango-renderer.c
+++ b/pango/pango-renderer.c
@@ -362,8 +362,8 @@ add_underline (PangoRenderer *renderer,
int underline_thickness = pango_font_metrics_get_underline_thickness (metrics);
int underline_position = pango_font_metrics_get_underline_position (metrics);
- new_rect.x = base_x + ink_rect->x;
- new_rect.width = ink_rect->width;
+ new_rect.x = base_x + MIN (ink_rect->x, logical_rect->x);
+ new_rect.width = MAX (ink_rect->width, logical_rect->width);
new_rect.height = underline_thickness;
new_rect.y = base_y;