diff options
author | Po Lu <luangruo@yahoo.com> | 2022-05-19 20:10:19 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-05-19 20:10:19 +0800 |
commit | c15430997679fced7ef6adc23cbc59d0cfa3d625 (patch) | |
tree | 43b014a1790c32856e815d5d516b050a442aade7 /src/xftfont.c | |
parent | 0a4d9f26ee9b24ecf0a8b1fb14d4b4bab5daa3ae (diff) | |
download | emacs-c15430997679fced7ef6adc23cbc59d0cfa3d625.tar.gz |
Whitelist some incorrectly labeled "color" fonts under Xft
* etc/PROBLEMS: Document problem with fonts incorrectly labeled
as color fonts under Xft.
* src/ftfont.c (xft_color_font_whitelisted_p): New function.
(ftfont_spec_pattern, ftfont_list): Respect whitelisting of
"color" fonts under Xft.
* src/xftfont.c (syms_of_xftfont): New variable
`xft-color-font-whitelist'.
Diffstat (limited to 'src/xftfont.c')
-rw-r--r-- | src/xftfont.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/xftfont.c b/src/xftfont.c index 31fb877c35b..6043ef9f94f 100644 --- a/src/xftfont.c +++ b/src/xftfont.c @@ -797,6 +797,15 @@ syms_of_xftfont (void) This is needed with some fonts to correct vertical overlap of glyphs. */); xft_font_ascent_descent_override = 0; + DEFVAR_LISP ("xft-color-font-whitelist", Vxft_color_font_whitelist, + doc: /* List of "color" font families that don't actually have color glyphs. +Some fonts (such as Source Code Pro) are reported as color fonts, but +do not actually have glyphs with colors that can cause Xft crashes. + +The font families in this list will not be ignored when +`xft-ignore-color-fonts' is non-nil. */); + Vxft_color_font_whitelist = list1 (build_pure_c_string ("Source Code Pro")); + pdumper_do_now_and_after_load (syms_of_xftfont_for_pdumper); } |