aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/font.c7
-rw-r--r--src/ftfont.c7
2 files changed, 14 insertions, 0 deletions
diff --git a/src/font.c b/src/font.c
index e53935a15cc..305bb14576a 100644
--- a/src/font.c
+++ b/src/font.c
@@ -5476,6 +5476,13 @@ Disabling compaction of font caches might enlarge the Emacs memory
5476footprint in sessions that use lots of different fonts. */); 5476footprint in sessions that use lots of different fonts. */);
5477 inhibit_compacting_font_caches = 0; 5477 inhibit_compacting_font_caches = 0;
5478 5478
5479 DEFVAR_BOOL ("xft-ignore-color-fonts",
5480 Vxft_ignore_color_fonts,
5481 doc: /*
5482Non-nil means don't query fontconfig for color fonts, since they often
5483cause Xft crashes. Only has an effect in Xft builds. */);
5484 Vxft_ignore_color_fonts = 1;
5485
5479#ifdef HAVE_WINDOW_SYSTEM 5486#ifdef HAVE_WINDOW_SYSTEM
5480#ifdef HAVE_FREETYPE 5487#ifdef HAVE_FREETYPE
5481 syms_of_ftfont (); 5488 syms_of_ftfont ();
diff --git a/src/ftfont.c b/src/ftfont.c
index c2e093e633d..24a92dd52e8 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -764,6 +764,13 @@ ftfont_spec_pattern (Lisp_Object spec, char *otlayout, struct OpenTypeSpec **ots
764 if (scalable >= 0 764 if (scalable >= 0
765 && ! FcPatternAddBool (pattern, FC_SCALABLE, scalable ? FcTrue : FcFalse)) 765 && ! FcPatternAddBool (pattern, FC_SCALABLE, scalable ? FcTrue : FcFalse))
766 goto err; 766 goto err;
767#ifdef HAVE_XFT
768 /* We really don't like color fonts, they cause Xft crashes. See
769 Bug#30874. */
770 if (Vxft_ignore_color_fonts
771 && ! FcPatternAddBool(pattern, FC_COLOR, FcFalse))
772 goto err;
773#endif
767 774
768 goto finish; 775 goto finish;
769 776