changeset 34030:f9d77d3fc85d

(x_estimate_mode_line_height): If `mode-line' face hasn't a font, use that of the frame, as drawing glyphs does.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 30 Nov 2000 11:56:35 +0000
parents d80bd382fa99
children fb2af42432a8
files src/xterm.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.c	Thu Nov 30 11:23:55 2000 +0000
+++ b/src/xterm.c	Thu Nov 30 11:56:35 2000 +0000
@@ -2326,7 +2326,7 @@
      struct frame *f;
      enum face_id face_id;
 {
-  int height = 1;
+  int height = FONT_HEIGHT (FRAME_FONT (f));
 
   /* This function is called so early when Emacs starts that the face
      cache and mode line face are not yet initialized.  */
@@ -2334,7 +2334,11 @@
       {
 	struct face *face = FACE_FROM_ID (f, face_id);
 	if (face)
-	  height = FONT_HEIGHT (face->font) + 2 * face->box_line_width;
+	  {
+	    if (face->font)
+	      height = FONT_HEIGHT (face->font);
+	    height += 2 * face->box_line_width;
+	  }
       }
   
   return height;