summaryrefslogtreecommitdiffstats
path: root/nixos/modules/config/fonts
diff options
context:
space:
mode:
authorLuca Bruno <lucabru@src.gnome.org>2014-09-27 20:08:45 +0200
committerVladimír Čunát <vcunat@gmail.com>2014-10-23 10:40:26 +0200
commit0927405a371292e9abddb2365540e46e2f1cc2c7 (patch)
treedc9ea8aa8c6a83844cba7aa4a1cd43a5608e15d0 /nixos/modules/config/fonts
parentb772f53acb1acac0e5b1d10f7e53f5e70ed2c581 (diff)
fontconfig: update 2.10.2 -> 2.11.1. Close #4410, #2050
Diffstat (limited to 'nixos/modules/config/fonts')
-rw-r--r--nixos/modules/config/fonts/fontconfig.nix27
-rw-r--r--nixos/modules/config/fonts/fonts.nix8
2 files changed, 25 insertions, 10 deletions
diff --git a/nixos/modules/config/fonts/fontconfig.nix b/nixos/modules/config/fonts/fontconfig.nix
index 7516d7ddf1a6..2d7549aab6d7 100644
--- a/nixos/modules/config/fonts/fontconfig.nix
+++ b/nixos/modules/config/fonts/fontconfig.nix
@@ -27,9 +27,11 @@ with lib;
config = mkIf config.fonts.enableFontConfig {
- # Bring in the default (upstream) fontconfig configuration.
+ # Fontconfig 2.10 backward compatibility
+
+ # Bring in the default (upstream) fontconfig configuration, only for fontconfig 2.10
environment.etc."fonts/fonts.conf".source =
- pkgs.makeFontsConf { fontDirectories = config.fonts.fonts; };
+ pkgs.makeFontsConf { fontconfig = pkgs.fontconfig_210; fontDirectories = config.fonts.fonts; };
environment.etc."fonts/conf.d/00-nixos.conf".text =
''
@@ -47,6 +49,27 @@ with lib;
</fontconfig>
'';
+ # Versioned fontconfig > 2.10. Only specify font directories.
+
+ environment.etc."fonts/${pkgs.fontconfig.configVersion}/conf.d/00-nixos.conf".text =
+ ''
+ <?xml version='1.0'?>
+ <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
+ <fontconfig>
+
+ <!-- Set the default hinting style to "slight". -->
+ <match target="font">
+ <edit mode="assign" name="hintstyle">
+ <const>hintslight</const>
+ </edit>
+ </match>
+
+ <!-- Font directories -->
+ ${concatStringsSep "\n" (map (font: "<dir>${font}</dir>") config.fonts.fonts)}
+
+ </fontconfig>
+ '';
+
environment.systemPackages = [ pkgs.fontconfig ];
};
diff --git a/nixos/modules/config/fonts/fonts.nix b/nixos/modules/config/fonts/fonts.nix
index f6060a910a15..baf5b7713f5f 100644
--- a/nixos/modules/config/fonts/fonts.nix
+++ b/nixos/modules/config/fonts/fonts.nix
@@ -13,14 +13,6 @@ with lib;
type = types.listOf types.path;
example = literalExample "[ pkgs.dejavu_fonts ]";
description = "List of primary font paths.";
- apply = list: list ++
- [ # - the user's current profile
- "~/.nix-profile/lib/X11/fonts"
- "~/.nix-profile/share/fonts"
- # - the default profile
- "/nix/var/nix/profiles/default/lib/X11/fonts"
- "/nix/var/nix/profiles/default/share/fonts"
- ];
};
};