]> git.eshelyaron.com Git - emacs.git/commitdiff
(x_load_font): For the height of font, if normarl ascent and
authorKenichi Handa <handa@m17n.org>
Sat, 30 Jan 1999 02:37:14 +0000 (02:37 +0000)
committerKenichi Handa <handa@m17n.org>
Sat, 30 Jan 1999 02:37:14 +0000 (02:37 +0000)
descent value are larger than those in max_bounds field, use the
former.

src/xterm.c

index 361a0d1159e28f3e63c869d9c6a6bcf660d2cad2..2af69ca92a4ae25de41368a225520097dffd7374 100644 (file)
@@ -6786,7 +6786,14 @@ x_load_font (f, fontname, size)
       fontp->full_name = fontp->name;
 
     fontp->size = font->max_bounds.width;
-    fontp->height = font->max_bounds.ascent + font->max_bounds.descent;
+    fontp->height = FONT_HEIGHT (font);
+    {
+      /* For some font, ascent and descent in max_bounds field is
+        larger than the above value.  */
+      int max_height = font->max_bounds.ascent + font->max_bounds.descent;
+      if (max_height > fontp->height)
+       fontp->height > max_height;
+    }
 
     if (NILP (font_names))
       {