summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2000-11-30 11:56:35 +0000
committerGerd Moellmann <gerd@gnu.org>2000-11-30 11:56:35 +0000
commit43281ee3f4b699d86ba12c23871758976c267e74 (patch)
tree5ccc02bed4d442813e0b97614d6d5cb5815cb750
parent4dd4cc14645dc8ca89b76295bf85a4fa09862d9d (diff)
downloademacs-43281ee3f4b699d86ba12c23871758976c267e74.tar.gz
(x_estimate_mode_line_height): If `mode-line' face
hasn't a font, use that of the frame, as drawing glyphs does.
-rw-r--r--src/xterm.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 01b8c5be56e..7a2260c6826 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -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;