From 9196133b4b3480a58f27c043805443a99ad825e1 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Wed, 26 Nov 2008 13:37:17 +0000 Subject: [PATCH] (w32font_open_internal): Don't include external leading in font height. --- src/ChangeLog | 5 +++++ src/w32font.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 939d3e274bb..82bb25ae26c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-11-26 Jason Rumney + + * w32font.c (w32font_open_internal): Don't include external + leading in font height. + 2008-11-26 Glenn Morris * xfaces.c (Fx_font_family_list): Replace lisp/term/pc-win.el diff --git a/src/w32font.c b/src/w32font.c index 63cd5c2de47..40d4bd64049 100644 --- a/src/w32font.c +++ b/src/w32font.c @@ -843,8 +843,12 @@ w32font_open_internal (f, font_entity, pixel_size, font_object) } font->max_width = w32_font->metrics.tmMaxCharWidth; + /* Parts of Emacs display assume that height = ascent + descent... + so height is defined later, after ascent and descent. font->height = w32_font->metrics.tmHeight + w32_font->metrics.tmExternalLeading; + */ + font->space_width = font->average_width = w32_font->metrics.tmAveCharWidth; font->vertical_centering = 0; @@ -876,6 +880,7 @@ w32font_open_internal (f, font_entity, pixel_size, font_object) font->min_width = font->space_width; font->ascent = w32_font->metrics.tmAscent; font->descent = w32_font->metrics.tmDescent; + font->height = font->ascent + font->descent; if (metrics) { -- 2.39.2