emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master bdb04e9: Fix aborts when opening a new font after f


From: Eli Zaretskii
Subject: [Emacs-diffs] master bdb04e9: Fix aborts when opening a new font after face-cache reset
Date: Tue, 8 Oct 2019 09:14:40 -0400 (EDT)

branch: master
commit bdb04e9dd182436a08fc80d5f7bda6432439271a
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    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)
---
 src/font.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/font.c b/src/font.c
index 935dd64..6bc977f 100644
--- a/src/font.c
+++ b/src/font.c
@@ -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));



reply via email to

[Prev in Thread] Current Thread [Next in Thread]