hasn't a font, use that of the frame, as drawing glyphs
does.
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. */
{
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;