diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-07-16 19:03:45 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-07-16 19:03:45 -0400 |
commit | c5aeaba0816f8adb6557d5306b65e85c254b400c (patch) | |
tree | ebd8b330b68f380f597a704e5a2ca72162eaca14 /pango/pangocairo-win32font.c | |
parent | 5903d1b168e9e5e3021e960e1e12e9ebfb3dd8b7 (diff) | |
download | pango-c5aeaba0816f8adb6557d5306b65e85c254b400c.tar.gz |
cairo win32: Set height in font metrics
Diffstat (limited to 'pango/pangocairo-win32font.c')
-rw-r--r-- | pango/pangocairo-win32font.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pango/pangocairo-win32font.c b/pango/pangocairo-win32font.c index 2a8e9edf..9f4f5c14 100644 --- a/pango/pangocairo-win32font.c +++ b/pango/pangocairo-win32font.c @@ -86,7 +86,6 @@ pango_cairo_win32_font_create_base_metrics_for_context (PangoCairoFont *font, PangoFontMetrics *metrics; cairo_scaled_font_t *scaled_font; cairo_font_extents_t font_extents; - double height; metrics = pango_font_metrics_new (); @@ -101,11 +100,11 @@ pango_cairo_win32_font_create_base_metrics_for_context (PangoCairoFont *font, /* FIXME: Should get the real settings for these from the TrueType * font file. */ - height = metrics->ascent + metrics->descent; - metrics->underline_thickness = height / 14; + metrics->height = metrics->ascent + metrics->descent; + metrics->underline_thickness = metrics->height / 14; metrics->underline_position = - metrics->underline_thickness; metrics->strikethrough_thickness = metrics->underline_thickness; - metrics->strikethrough_position = height / 4; + metrics->strikethrough_position = metrics->height / 4; pango_quantize_line_geometry (&metrics->underline_thickness, &metrics->underline_position); |