# HG changeset patch # User Jason Rumney # Date 1227706637 0 # Node ID eff40549740cd8217419981f33e9b3e0d36bc163 # Parent b1b204eafe5444371caf52fd19e33d196cf2dd4d (w32font_open_internal): Don't include external leading in font height. diff -r b1b204eafe54 -r eff40549740c src/ChangeLog --- a/src/ChangeLog Wed Nov 26 10:46:21 2008 +0000 +++ b/src/ChangeLog Wed Nov 26 13:37:17 2008 +0000 @@ -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 -r b1b204eafe54 -r eff40549740c src/w32font.c --- a/src/w32font.c Wed Nov 26 10:46:21 2008 +0000 +++ b/src/w32font.c Wed Nov 26 13:37:17 2008 +0000 @@ -843,8 +843,12 @@ } 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 @@ 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) {