summaryrefslogtreecommitdiff
path: root/pango/pango-renderer.c
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2019-11-02 01:45:49 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2019-11-02 01:45:49 +0200
commit6c58f52269a368160a7c21fe38b81a775587c3bf (patch)
treef630c4dc9acd6267aeb009fe722a0ac3e4477048 /pango/pango-renderer.c
parent2099fcf52b4f33da77c9fe11210ee3c2c927c449 (diff)
downloadpango-6c58f52269a368160a7c21fe38b81a775587c3bf.tar.gz
Don’t use underline position in overlines
This matches what web browsers do. Fixes https://gitlab.gnome.org/GNOME/pango/issues/432
Diffstat (limited to 'pango/pango-renderer.c')
-rw-r--r--pango/pango-renderer.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/pango/pango-renderer.c b/pango/pango-renderer.c
index 8180fbf3..6c0786c5 100644
--- a/pango/pango-renderer.c
+++ b/pango/pango-renderer.c
@@ -411,7 +411,6 @@ add_overline (PangoRenderer *renderer,
PangoRectangle *current_rect = &state->overline_rect;
PangoRectangle new_rect;
int underline_thickness = pango_font_metrics_get_underline_thickness (metrics);
- int underline_position = pango_font_metrics_get_underline_position (metrics);
int ascent = pango_font_metrics_get_ascent (metrics);
new_rect.x = base_x + logical_rect->x;
@@ -425,7 +424,7 @@ add_overline (PangoRenderer *renderer,
g_assert_not_reached ();
break;
case PANGO_OVERLINE_SINGLE:
- new_rect.y -= ascent + underline_position;
+ new_rect.y -= ascent;
if (state->overline == renderer->overline)
{
new_rect.y = MIN (current_rect->y, new_rect.y);