** Some fonts are detected but not usable under Xft.
+We understand that these issues were resolved in Xft release 2.3.6.
+
Some fonts might not be usable under Emacs even though they show up in
the font family list when Emacs is built with Xft. This is because
Emacs prevents fonts that have color glyphs (such as color Emoji) from
}
#if defined HAVE_XFT && defined FC_COLOR
+#if (XFT_MAJOR < 2 \
+ || (XFT_MAJOR == 2 && (XFT_MINOR < 3 \
+ || (XFT_MINOR == 3 \
+ && XFT_REVISION < 6))))
+
static bool
xft_color_font_whitelisted_p (const char *family)
{
return false;
}
-#endif
+
+#endif /* Xft < 2.3.6 */
+#endif /* HAVE_XFT && FC_COLOR */
static FcPattern *
ftfont_spec_pattern (Lisp_Object spec, char *otlayout,
&& ! FcPatternAddBool (pattern, FC_SCALABLE, scalable ? FcTrue : FcFalse))
goto err;
#if defined HAVE_XFT && defined FC_COLOR
- /* We really don't like color fonts, they cause Xft crashes. See
- Bug#30874. */
+#if (XFT_MAJOR < 2 \
+ || (XFT_MAJOR == 2 && (XFT_MINOR < 3 \
+ || (XFT_MINOR == 3 \
+ && XFT_REVISION < 6))))
+ /* We really don't like color fonts, they cause Xft crashes with
+ releases older than 2.3.6. See Bug#30874. */
if (xft_ignore_color_fonts
&& (NILP (AREF (spec, FONT_FAMILY_INDEX))
|| NILP (Vxft_color_font_whitelist))
&& ! FcPatternAddBool (pattern, FC_COLOR, FcFalse))
goto err;
-#endif
+#endif /* Xft < 2.3.6 */
+#endif /* HAVE_XFT && FC_COLOR */
goto finish;
{
Lisp_Object entity;
#if defined HAVE_XFT && defined FC_COLOR
+#if (XFT_MAJOR < 2 \
+ || (XFT_MAJOR == 2 && (XFT_MINOR < 3 \
+ || (XFT_MINOR == 3 \
+ && XFT_REVISION < 6))))
{
/* Some fonts, notably NotoColorEmoji, have an FC_COLOR value
that's neither FcTrue nor FcFalse, which means FcFontList
== FcResultMatch && b != FcFalse)
continue;
}
-#endif
+#endif /* Xft < 2.3.6 */
+#endif /* HAVE_XFT && FC_COLOR */
if (spacing >= 0)
{
int this;