···76767777 patches = [
7878 ./patches/3.0-immodules.cache.patch
7979-8080- (fetchpatch {
8181- name = "Xft-setting-fallback-compute-DPI-properly.patch";
8282- url = "https://bug757142.bugzilla-attachments.gnome.org/attachment.cgi?id=344123";
8383- sha256 = "0g6fhqcv8spfy3mfmxpyji93k8d4p4q4fz1v9a1c1cgcwkz41d7p";
8484- })
7979+ ./patches/3.0-Xft-setting-fallback-compute-DPI-properly.patch
8580 ] ++ lib.optionals stdenv.isDarwin [
8681 # X11 module requires <gio/gdesktopappinfo.h> which is not installed on Darwin
8782 # let’s drop that dependency in similar way to how other parts of the library do it
···11+From 269f2d80ea41cde17612600841fbdc32e99010f5 Mon Sep 17 00:00:00 2001
22+From: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
33+Date: Tue, 24 Jan 2017 12:30:08 +0100
44+Subject: [PATCH] Xft setting fallback: compute DPI properly
55+66+This is a partial revert of bdf0820c501437a2150d8ff0d5340246e713f73f. If
77+the Xft DPI settings are not explicitly set, use the values provided by
88+the X server rather than hard-coding the fallback value of 96.
99+1010+While an auto-configured Xorg already reports 96, this value can be
1111+overriden by the user, and we should respect the user choice in this
1212+case. There is no need to require them to set the same value in
1313+different places (the Xorg DPI settings and Xft.dpi).
1414+---
1515+ gdk/x11/gdkxftdefaults.c | 3 ++-
1616+ 1 file changed, 2 insertions(+), 1 deletion(-)
1717+1818+diff --git a/gdk/x11/gdkxftdefaults.c b/gdk/x11/gdkxftdefaults.c
1919+index fa1cfde2ec..c462b78c4b 100644
2020+--- a/gdk/x11/gdkxftdefaults.c
2121++++ b/gdk/x11/gdkxftdefaults.c
2222+@@ -174,7 +174,8 @@ init_xft_settings (GdkScreen *screen)
2323+ x11_screen->xft_rgba = FC_RGBA_UNKNOWN;
2424+2525+ if (!get_double_default (xdisplay, "dpi", &dpi_double))
2626+- dpi_double = 96.0;
2727++ dpi_double = (DisplayHeight(xdisplay, x11_screen->screen_num)*25.4)/
2828++ DisplayHeightMM(xdisplay, x11_screen->screen_num);
2929+3030+ x11_screen->xft_dpi = (int)(0.5 + PANGO_SCALE * dpi_double);
3131+ }
3232+--
3333+2.11.0.616.gd72966cf44.dirty
3434+