aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Ingebrigtsen2022-06-19 15:02:01 +0200
committerLars Ingebrigtsen2022-06-19 15:03:07 +0200
commit37f168afdd272d4094da9a975425e797f253e63b (patch)
tree134badb06191c4cc7aea7eb9435358b7d6708d9a /src
parentdcb7b9f5ff853bfb18c0a27af47507d9ecd7be64 (diff)
downloademacs-37f168afdd272d4094da9a975425e797f253e63b.tar.gz
emacs-37f168afdd272d4094da9a975425e797f253e63b.zip
Don't lose antialiasing info when hitting `C-x C-+'
* src/xfaces.c (realize_gui_face): Don't lose antialiasing info when hitting `C-x C-+' (bug#37473).
Diffstat (limited to 'src')
-rw-r--r--src/xfaces.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/xfaces.c b/src/xfaces.c
index 04e5439d9d5..424220591b7 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -5951,8 +5951,20 @@ realize_gui_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE]
5951 emacs_abort (); 5951 emacs_abort ();
5952 } 5952 }
5953 if (! FONT_OBJECT_P (attrs[LFACE_FONT_INDEX])) 5953 if (! FONT_OBJECT_P (attrs[LFACE_FONT_INDEX]))
5954 attrs[LFACE_FONT_INDEX] 5954 {
5955 = font_load_for_lface (f, attrs, Ffont_spec (0, NULL)); 5955 /* We want attrs to allow overriding most elements in the
5956 spec, but we don't want to start with an all-nil font,
5957 either, because then we lose attributes like
5958 antialiasing. This should probably be fixed in a
5959 different way, see bug#17973 and bug#37473. */
5960 Lisp_Object spec = copy_font_spec (attrs[LFACE_FONT_INDEX]);
5961 Ffont_put (spec, QCfoundry, Qnil);
5962 Ffont_put (spec, QCfamily, Qnil);
5963 Ffont_put (spec, QCregistry, Qnil);
5964 Ffont_put (spec, QCadstyle, Qnil);
5965 attrs[LFACE_FONT_INDEX]
5966 = font_load_for_lface (f, attrs, spec);
5967 }
5956 if (FONT_OBJECT_P (attrs[LFACE_FONT_INDEX])) 5968 if (FONT_OBJECT_P (attrs[LFACE_FONT_INDEX]))
5957 { 5969 {
5958 face->font = XFONT_OBJECT (attrs[LFACE_FONT_INDEX]); 5970 face->font = XFONT_OBJECT (attrs[LFACE_FONT_INDEX]);