changeset 99960:eff40549740c

(w32font_open_internal): Don't include external leading in font height.
author Jason Rumney <jasonr@gnu.org>
date Wed, 26 Nov 2008 13:37:17 +0000
parents b1b204eafe54
children dd629d9d9d4b
files src/ChangeLog src/w32font.c
diffstat 2 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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  <jasonr@gnu.org>
+
+	* w32font.c (w32font_open_internal): Don't include external
+	leading in font height.
+
 2008-11-26  Glenn Morris  <rgm@gnu.org>
 
 	* xfaces.c (Fx_font_family_list): Replace lisp/term/pc-win.el
--- 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)
     {