diff options
author | Po Lu <luangruo@yahoo.com> | 2022-06-19 21:57:11 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-06-19 21:57:25 +0800 |
commit | b2d11d69dd49864874f8fe53669b4049e83bfce9 (patch) | |
tree | 990fe5de79f3cabfd6b5c065c87f0ed95dc6e952 /src/xfaces.c | |
parent | 7bfb35f8a7b364877c5a07297f16bc38d00f1989 (diff) | |
download | emacs-b2d11d69dd49864874f8fe53669b4049e83bfce9.tar.gz |
More conservative fix for bug#37473
* src/xfaces.c (realize_gui_face): Add more conservative fix,
since the last change makes C-x C-+ lead to weight weirdness on
my machine.
Diffstat (limited to 'src/xfaces.c')
-rw-r--r-- | src/xfaces.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/xfaces.c b/src/xfaces.c index 424220591b7..25b5e4d185c 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -5909,7 +5909,7 @@ realize_gui_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE] #ifdef HAVE_WINDOW_SYSTEM struct face *default_face; struct frame *f; - Lisp_Object stipple, underline, overline, strike_through, box; + Lisp_Object stipple, underline, overline, strike_through, box, temp_spec; eassert (FRAME_WINDOW_P (cache->f)); @@ -5953,17 +5953,18 @@ realize_gui_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE] if (! FONT_OBJECT_P (attrs[LFACE_FONT_INDEX])) { /* We want attrs to allow overriding most elements in the - spec, but we don't want to start with an all-nil font, - either, because then we lose attributes like - antialiasing. This should probably be fixed in a - different way, see bug#17973 and bug#37473. */ - Lisp_Object spec = copy_font_spec (attrs[LFACE_FONT_INDEX]); - Ffont_put (spec, QCfoundry, Qnil); - Ffont_put (spec, QCfamily, Qnil); - Ffont_put (spec, QCregistry, Qnil); - Ffont_put (spec, QCadstyle, Qnil); + spec (IOW, to start out as an empty font spec), but + preserve the antialiasing attribute. (bug#17973, + bug#37473). */ + temp_spec = Ffont_spec (0, NULL); + + if (FONTP (attrs[LFACE_FONT_INDEX])) + Ffont_put (temp_spec, QCantialias, + Ffont_get (attrs[LFACE_FONT_INDEX], + QCantialias)); + attrs[LFACE_FONT_INDEX] - = font_load_for_lface (f, attrs, spec); + = font_load_for_lface (f, attrs, temp_spec); } if (FONT_OBJECT_P (attrs[LFACE_FONT_INDEX])) { |