mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-31 04:41:23 -08:00
Ignore all color fonts when using XFT
* etc/NEWS: Announce change to matching color fonts when using XFT. * src/ftfont.c (ftfont_list) [HAVE_XFT && FC_COLOR]: Query for the color attribute of the matched font, and skip it if it is not FcFalse (Bug#37786).
This commit is contained in:
parent
aa0c679f48
commit
732dcfc850
2 changed files with 24 additions and 1 deletions
8
etc/NEWS
8
etc/NEWS
|
|
@ -296,6 +296,14 @@ To get the old, less-secure behavior, you can set the
|
|||
*** When run by root, emacsclient no longer connects to non-root sockets.
|
||||
(Instead you can use Tramp methods to run root commands in a non-root Emacs.)
|
||||
|
||||
---
|
||||
*** 'xft-ignore-color-fonts' now ignores even more color fonts.
|
||||
There are color fonts that managed to bypass the existing checks,
|
||||
causing XFT crashes, they are now filtered out. Setting
|
||||
'xft-ignore-color-conts' to nil removes those checks, which might
|
||||
require setting 'face-ignored-fonts' to filter out problematic fonts.
|
||||
Known problematic fonts are "Noto Color Emoji" and "Emoji One".
|
||||
|
||||
+++
|
||||
** New user option 'what-cursor-show-names'.
|
||||
When non-nil, 'what-cursor-position' will show the name of the character
|
||||
|
|
|
|||
17
src/ftfont.c
17
src/ftfont.c
|
|
@ -864,6 +864,9 @@ ftfont_list (struct frame *f, Lisp_Object spec)
|
|||
#endif /* FC_CAPABILITY */
|
||||
#ifdef FC_FONTFORMAT
|
||||
FC_FONTFORMAT,
|
||||
#endif
|
||||
#if defined HAVE_XFT && defined FC_COLOR
|
||||
FC_COLOR,
|
||||
#endif
|
||||
NULL);
|
||||
if (! objset)
|
||||
|
|
@ -904,7 +907,19 @@ ftfont_list (struct frame *f, Lisp_Object spec)
|
|||
for (i = 0; i < fontset->nfont; i++)
|
||||
{
|
||||
Lisp_Object entity;
|
||||
|
||||
#if defined HAVE_XFT && defined FC_COLOR
|
||||
{
|
||||
/* Some fonts, notably NotoColorEmoji, have an FC_COLOR value
|
||||
that's neither FcTrue nor FcFalse, which means FcFontList
|
||||
returns them even when it shouldn't really do so, so we
|
||||
need to manually skip them here (Bug#37786). */
|
||||
FcBool b;
|
||||
if (Vxft_ignore_color_fonts
|
||||
&& FcPatternGetBool (fontset->fonts[i], FC_COLOR, 0, &b)
|
||||
== FcResultMatch && b != FcFalse)
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
if (spacing >= 0)
|
||||
{
|
||||
int this;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue