[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 772c0e6f20 1/2: Fix earlier change in xfaces.c for antialiasing i
From: |
Po Lu |
Subject: |
master 772c0e6f20 1/2: Fix earlier change in xfaces.c for antialiasing in the mode line |
Date: |
Sun, 19 Jun 2022 21:17:37 -0400 (EDT) |
branch: master
commit 772c0e6f20f789862883e42181dd16a6ac3cb0f6
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
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.
---
src/xfaces.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/xfaces.c b/src/xfaces.c
index 25b5e4d185..f70fe87c95 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);