]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix build without Cairo FreeType and fontconfig support
authorPo Lu <luangruo@yahoo.com>
Fri, 28 Oct 2022 11:35:39 +0000 (19:35 +0800)
committerPo Lu <luangruo@yahoo.com>
Fri, 28 Oct 2022 11:35:39 +0000 (19:35 +0800)
* src/xsettings.c (apply_xft_settings): Don't enable Xft code
unless Cairo FreeType support is present.  (bug#58830)

src/xsettings.c

index 14098e21f5c9581a25c0aee1fa199a0e0334de93..deacddcfde9ec314deee2ce0c86a8b94456c8f43 100644 (file)
@@ -804,7 +804,9 @@ static void
 apply_xft_settings (Display_Info *dpyinfo,
                     struct xsettings *settings)
 {
-#if defined USE_CAIRO || defined HAVE_XFT
+#if defined HAVE_XFT                                   \
+  || (defined USE_CAIRO && defined CAIRO_HAS_FC_FONT   \
+      && defined CAIRO_HAS_FT_FONT)
   FcPattern *pat;
   struct xsettings oldsettings;
   bool changed = false;
@@ -940,7 +942,7 @@ apply_xft_settings (Display_Info *dpyinfo,
     }
   else
     FcPatternDestroy (pat);
-#endif /* HAVE_XFT */
+#endif /* HAVE_XFT || (USE_CAIRO && CAIRO_HAS_FC_FONT && CAIRO_HAS_FT_FONT) */
 }
 #endif