(w32font_open_internal): Don't include external leading in font height.
authorJason Rumney <jasonr@gnu.org>
Wed, 26 Nov 2008 13:37:17 +0000 (13:37 +0000)
committerJason Rumney <jasonr@gnu.org>
Wed, 26 Nov 2008 13:37:17 +0000 (13:37 +0000)
src/ChangeLog
src/w32font.c

index 939d3e2..82bb25a 100644 (file)
@@ -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
index 63cd5c2..40d4bd6 100644 (file)
@@ -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)
     {