diff options
author | Po Lu <luangruo@yahoo.com> | 2022-06-20 09:16:41 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-06-20 09:16:41 +0800 |
commit | 772c0e6f20f789862883e42181dd16a6ac3cb0f6 (patch) | |
tree | 6ac48973b7b7d43928d0c3e500a9688b83966992 /src/xfaces.c | |
parent | 9c359b0cec5248871fb0ddb9f1f3bc84fffd4dd5 (diff) | |
download | emacs-772c0e6f20f789862883e42181dd16a6ac3cb0f6.tar.gz emacs-772c0e6f20f789862883e42181dd16a6ac3cb0f6.tar.bz2 emacs-772c0e6f20f789862883e42181dd16a6ac3cb0f6.zip |
Fix earlier change in xfaces.c for antialiasing in the mode line
* src/xfaces.c (realize_gui_face): Don't put QCantialias in
empty spec if it doesn't exist in the original.
Diffstat (limited to 'src/xfaces.c')
-rw-r--r-- | src/xfaces.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/xfaces.c b/src/xfaces.c index 25b5e4d185c..f70fe87c95e 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -5910,6 +5910,7 @@ realize_gui_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE] struct face *default_face; struct frame *f; Lisp_Object stipple, underline, overline, strike_through, box, temp_spec; + Lisp_Object temp_extra, antialias; eassert (FRAME_WINDOW_P (cache->f)); @@ -5957,11 +5958,18 @@ realize_gui_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE] preserve the antialiasing attribute. (bug#17973, bug#37473). */ temp_spec = Ffont_spec (0, NULL); + temp_extra = AREF (attrs[LFACE_FONT_INDEX], + FONT_EXTRA_INDEX); + /* If `:antialias' wasn't specified, keep it unspecified + instead of changing it to nil. */ - if (FONTP (attrs[LFACE_FONT_INDEX])) - Ffont_put (temp_spec, QCantialias, - Ffont_get (attrs[LFACE_FONT_INDEX], - QCantialias)); + if (CONSP (temp_extra)) + antialias = Fassq (QCantialias, temp_extra); + else + antialias = Qnil; + + if (FONTP (attrs[LFACE_FONT_INDEX]) && !NILP (antialias)) + Ffont_put (temp_spec, QCantialias, Fcdr (antialias)); attrs[LFACE_FONT_INDEX] = font_load_for_lface (f, attrs, temp_spec); |