[pango/line-height: 3/8] win32: Set line height in metrics



commit 58ac7ba20d6ea23580cc5c3f2758cab0df7a9d59
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Jul 5 12:47:36 2019 +0000

    win32: Set line height in metrics
    
    Following information found here:
    https://docs.microsoft.com/en-us/windows/win32/gdi/string-widths-and-heights

 pango/pangowin32.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/pango/pangowin32.c b/pango/pangowin32.c
index 630898e0..6f60a70c 100644
--- a/pango/pangowin32.c
+++ b/pango/pangowin32.c
@@ -575,6 +575,7 @@ pango_win32_font_get_metrics (PangoFont     *font,
 
          metrics->ascent = tm.tmAscent * PANGO_SCALE;
          metrics->descent = tm.tmDescent * PANGO_SCALE;
+          metrics->height = (tm.tmHeight + tm.tmInternalLeading + tm.tmExternalLeading) * PANGO_SCALE;
          metrics->approximate_char_width = tm.tmAveCharWidth * PANGO_SCALE;
 
          coverage = pango_win32_font_get_coverage (font, language);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]