mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Fix aborts when opening a new font after face-cache reset
* src/font.c (font_open_for_lface): Make sure the default face is realized before using its height for the font to be open. (Bug#37637)
This commit is contained in:
parent
005ed49495
commit
bdb04e9dd1
1 changed files with 4 additions and 0 deletions
|
|
@ -3314,6 +3314,10 @@ font_open_for_lface (struct frame *f, Lisp_Object entity, Lisp_Object *attrs, Li
|
|||
pt = XFIXNUM (attrs[LFACE_HEIGHT_INDEX]);
|
||||
else
|
||||
{
|
||||
/* We need the default face to be valid below. */
|
||||
if (FRAME_FACE_CACHE (f)->used == 0)
|
||||
recompute_basic_faces (f);
|
||||
|
||||
struct face *def = FACE_FROM_ID (f, DEFAULT_FACE_ID);
|
||||
Lisp_Object height = def->lface[LFACE_HEIGHT_INDEX];
|
||||
eassert (FIXNUMP (height));
|
||||
|
|
|
|||
Loading…
Reference in a new issue