From bd97ff5ff453f664791fe28bdbdffbcebdded464 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Fri, 24 Mar 2023 11:43:39 +0100 Subject: [PATCH] nixos/fontconfig: Change default antialiasing style to greyscale instead of subpixel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fontconfig before version 2.13.1 was apparently implicitly not using subpixel antialiasing. The fontconfig NixOS module deviated from this, using subpixel antialiasing with `rgb` layout by default. In fontconfig 2.14.1, subpixel antialiasing was inadvertently enabled as the default: https://gitlab.freedesktop.org/fontconfig/fontconfig/-/commit/2b6afa02ab2b7dd3796a48cf47896c4c6de4d6ba According to https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/337, that deviates from GNOME/GTK’s defaults, which resulted in apps taking the settings directly from fontconfig (e.g. Firefox) from diverging from GNOME programs. The change was subsequently reverted in 2.14.2, choosing the greyscale antialiasing explicitly: https://gitlab.freedesktop.org/fontconfig/fontconfig/-/commit/030759b74f5b3ce7fab6d17bbda6377444e82841 Let’s reflect this default setting in the NixOS module. Co-authored-by: Jan Tojnar Signed-off-by: Sefa Eyeoglu --- nixos/doc/manual/release-notes/rl-2311.section.md | 2 ++ nixos/modules/config/fonts/fontconfig.nix | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/doc/manual/release-notes/rl-2311.section.md b/nixos/doc/manual/release-notes/rl-2311.section.md index 83fd6028ec6d..9c8457d54be3 100644 --- a/nixos/doc/manual/release-notes/rl-2311.section.md +++ b/nixos/doc/manual/release-notes/rl-2311.section.md @@ -30,6 +30,8 @@ - The Cinnamon module now enables XDG desktop integration by default. If you are experiencing collisions related to xdg-desktop-portal-gtk you can safely remove `xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];` from your NixOS configuration. +- `fontconfig` now defaults to using greyscale antialiasing instead of subpixel antialiasing because of a [recommendation from one of the downstreams](https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/337). You can change this value by configuring [](#opt-fonts.fontconfig.subpixel.rgba) accordingly. + - A new option was added to the virtualisation module that enables specifying explicitly named network interfaces in QEMU VMs. The existing `virtualisation.vlans` is still supported for cases where the name of the network interface is irrelevant. - `services.nginx` gained a `defaultListen` option at server-level with support for PROXY protocol listeners, also `proxyProtocol` is now exposed in `services.nginx.virtualHosts..listen` option. It is now possible to run PROXY listeners and non-PROXY listeners at a server-level, see [#213510](https://github.com/NixOS/nixpkgs/pull/213510/) for more details. diff --git a/nixos/modules/config/fonts/fontconfig.nix b/nixos/modules/config/fonts/fontconfig.nix index a49595c58e1c..95b1529e2a11 100644 --- a/nixos/modules/config/fonts/fontconfig.nix +++ b/nixos/modules/config/fonts/fontconfig.nix @@ -417,7 +417,7 @@ in subpixel = { rgba = mkOption { - default = "rgb"; + default = "none"; type = types.enum ["rgb" "bgr" "vrgb" "vbgr" "none"]; description = lib.mdDoc '' Subpixel order. The overwhelming majority of displays are