Subject: bug#25228: 25.1; GNU emacs 25.1: custom-set-faces from init file ~/.emacs ignored

From: martin rudalics <[email-masked]>
Date: Wed, 21 Dec 2016 08:42:30 +0100

> Yes! On that particular machine the test still fails on 88cdf14b37
 > (Sorry it took me while to test it. I was fighting with proxies)
 >
 >> , we'd like you to
 >> apply a small patch and see if the problem goes away.  Is it okay?
 >
 > Yes. Gladly.

Please try the attached.

Thanks, martin
diff --git a/src/xsettings.c b/src/xsettings.c
index d7af68f..6131f67 100644
--- a/src/xsettings.c
+++ b/src/xsettings.c
@@ -667,8 +667,12 @@ apply_xft_settings (struct x_display_info *dpyinfo,
     }
 #endif
 
-  if ((settings->seen & SEEN_DPI) != 0 && oldsettings.dpi != settings->dpi
-      && settings->dpi > 0)
+  if ((settings->seen & SEEN_DPI) != 0
+      && settings->dpi > 0
+      && ((oldsettings.dpi >= settings->dpi
+	   && (oldsettings.dpi - settings->dpi) > 2)
+	  || ((settings->dpi > oldsettings.dpi)
+	      && (settings->dpi - oldsettings.dpi) > 2)))
     {
       FcPatternDel (pat, FC_DPI);
       FcPatternAddDouble (pat, FC_DPI, settings->dpi);