[pango/line-underline: 18/18] Use ascent for overlines
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/line-underline: 18/18] Use ascent for overlines
- Date: Sat, 24 Aug 2019 09:38:05 +0000 (UTC)
commit 4ec01e6952573ad5785dfe80fd2202aaaa5f5b80
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Aug 24 11:35:33 2019 +0200
Use ascent for overlines
pango/pango-renderer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/pango/pango-renderer.c b/pango/pango-renderer.c
index 7f824f32..8180fbf3 100644
--- a/pango/pango-renderer.c
+++ b/pango/pango-renderer.c
@@ -410,9 +410,9 @@ 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;
new_rect.width = logical_rect->width;
@@ -425,7 +425,7 @@ add_overline (PangoRenderer *renderer,
g_assert_not_reached ();
break;
case PANGO_OVERLINE_SINGLE:
- new_rect.y += ink_rect->y - underline_thickness + underline_position;
+ new_rect.y -= ascent + underline_position;
if (state->overline == renderer->overline)
{
new_rect.y = MIN (current_rect->y, new_rect.y);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]