]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix failure of setting default face attribute in init script (Bug#36284)
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Thu, 20 Jun 2019 02:57:50 +0000 (11:57 +0900)
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Thu, 20 Jun 2019 02:58:36 +0000 (11:58 +0900)
* src/xsettings.c (apply_xft_settings): Undo replacing all #ifdef HAVE_XFT
with #if defined USE_CAIRO || defined HAVE_XFT for this function.

src/xsettings.c

index 3e9012e3ab1c7bd819284212a7281132d3bd5062..06c47c6c6ceaea0fc52b77642f6aae54c1b18309 100644 (file)
@@ -608,18 +608,16 @@ static void
 apply_xft_settings (struct x_display_info *dpyinfo,
                     struct xsettings *settings)
 {
-#if defined USE_CAIRO || defined HAVE_XFT
+#ifdef HAVE_XFT
   FcPattern *pat;
   struct xsettings oldsettings;
   bool changed = false;
 
   memset (&oldsettings, 0, sizeof (oldsettings));
   pat = FcPatternCreate ();
-#ifdef HAVE_XFT
   XftDefaultSubstitute (dpyinfo->display,
                         XScreenNumberOfScreen (dpyinfo->screen),
                         pat);
-#endif
   FcPatternGetBool (pat, FC_ANTIALIAS, 0, &oldsettings.aa);
   FcPatternGetBool (pat, FC_HINTING, 0, &oldsettings.hinting);
 #ifdef FC_HINT_STYLE
@@ -719,9 +717,7 @@ apply_xft_settings (struct x_display_info *dpyinfo,
       };
       char buf[sizeof format + d_formats * d_growth + lf_formats * lf_growth];
 
-#ifdef HAVE_XFT
       XftDefaultSet (dpyinfo->display, pat);
-#endif
       store_config_changed_event (Qfont_render,
                                  XCAR (dpyinfo->name_list_element));
       Vxft_settings
@@ -733,7 +729,7 @@ apply_xft_settings (struct x_display_info *dpyinfo,
     }
   else
     FcPatternDestroy (pat);
-#endif /* USE_CAIRO || HAVE_XFT */
+#endif /* HAVE_XFT */
 }
 
 /* Read XSettings from the display for DPYINFO.