1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-19 18:13:55 +00:00

(x_estimate_mode_line_height): If `mode-line' face

hasn't a font, use that of the frame, as drawing glyphs
does.
This commit is contained in:
Gerd Moellmann 2000-11-30 11:56:35 +00:00
parent 4dd4cc1464
commit 43281ee3f4

View 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;