]> git.eshelyaron.com Git - emacs.git/commitdiff
(x_estimate_mode_line_height): If `mode-line' face
authorGerd Moellmann <gerd@gnu.org>
Thu, 30 Nov 2000 11:56:35 +0000 (11:56 +0000)
committerGerd Moellmann <gerd@gnu.org>
Thu, 30 Nov 2000 11:56:35 +0000 (11:56 +0000)
hasn't a font, use that of the frame, as drawing glyphs
does.

src/xterm.c

index 01b8c5be56e1ab8f6e5a0b2f91dda95604f9e746..7a2260c682694c0f32a37996f1d8bf7e542b2b69 100644 (file)
@@ -2326,7 +2326,7 @@ x_estimate_mode_line_height (f, face_id)
      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 @@ x_estimate_mode_line_height (f, face_id)
       {
        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;