fontconfig: Set the default hinting style to "slight"

This works around a bug in infinality that causes broken rendering in
some cases.  Issue NixOS/nixpkgs#663.

Upstream suggests that "slight" is a better/safer default in any case.
It also looks better, IMHO, YMMV.
This commit is contained in:
Eelco Dolstra 2013-06-27 13:28:22 +02:00
parent 0cbf0605d2
commit eb110fd3ce

View File

@ -30,6 +30,22 @@ with pkgs.lib;
environment.etc."fonts/fonts.conf".source =
pkgs.makeFontsConf { fontDirectories = config.fonts.fonts; };
environment.etc."fonts/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>
</fontconfig>
'';
environment.shellInit =
''
# FIXME: This variable is no longer needed, but we'll keep it