aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xfaces.c23
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]
5909#ifdef HAVE_WINDOW_SYSTEM 5909#ifdef HAVE_WINDOW_SYSTEM
5910 struct face *default_face; 5910 struct face *default_face;
5911 struct frame *f; 5911 struct frame *f;
5912 Lisp_Object stipple, underline, overline, strike_through, box; 5912 Lisp_Object stipple, underline, overline, strike_through, box, temp_spec;
5913 5913
5914 eassert (FRAME_WINDOW_P (cache->f)); 5914 eassert (FRAME_WINDOW_P (cache->f));
5915 5915
@@ -5953,17 +5953,18 @@ realize_gui_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE]
5953 if (! FONT_OBJECT_P (attrs[LFACE_FONT_INDEX])) 5953 if (! FONT_OBJECT_P (attrs[LFACE_FONT_INDEX]))
5954 { 5954 {
5955 /* We want attrs to allow overriding most elements in the 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, 5956 spec (IOW, to start out as an empty font spec), but
5957 either, because then we lose attributes like 5957 preserve the antialiasing attribute. (bug#17973,
5958 antialiasing. This should probably be fixed in a 5958 bug#37473). */
5959 different way, see bug#17973 and bug#37473. */ 5959 temp_spec = Ffont_spec (0, NULL);
5960 Lisp_Object spec = copy_font_spec (attrs[LFACE_FONT_INDEX]); 5960
5961 Ffont_put (spec, QCfoundry, Qnil); 5961 if (FONTP (attrs[LFACE_FONT_INDEX]))
5962 Ffont_put (spec, QCfamily, Qnil); 5962 Ffont_put (temp_spec, QCantialias,
5963 Ffont_put (spec, QCregistry, Qnil); 5963 Ffont_get (attrs[LFACE_FONT_INDEX],
5964 Ffont_put (spec, QCadstyle, Qnil); 5964 QCantialias));
5965
5965 attrs[LFACE_FONT_INDEX] 5966 attrs[LFACE_FONT_INDEX]
5966 = font_load_for_lface (f, attrs, spec); 5967 = font_load_for_lface (f, attrs, temp_spec);
5967 } 5968 }
5968 if (FONT_OBJECT_P (attrs[LFACE_FONT_INDEX])) 5969 if (FONT_OBJECT_P (attrs[LFACE_FONT_INDEX]))
5969 { 5970 {