about summary refs log tree commit diff
path: root/nixos/modules/config/fonts/fontconfig.nix
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@secure.mailbox.org>2017-03-20 11:43:50 -0500
committerGitHub <noreply@github.com>2017-03-20 11:43:50 -0500
commit1b0d9e9ae64b677c09f345f740f5a94fa41eb468 (patch)
tree1cbb71acfb427c9521ea4552853692898ee755c4 /nixos/modules/config/fonts/fontconfig.nix
parent48bc3cf9f497f38d0bfcf0ac6a808a1cd411a855 (diff)
parentd458b5401a36dd87cfd2bd071f634330f095cf5d (diff)
downloadnixlib-1b0d9e9ae64b677c09f345f740f5a94fa41eb468.tar
nixlib-1b0d9e9ae64b677c09f345f740f5a94fa41eb468.tar.gz
nixlib-1b0d9e9ae64b677c09f345f740f5a94fa41eb468.tar.bz2
nixlib-1b0d9e9ae64b677c09f345f740f5a94fa41eb468.tar.lz
nixlib-1b0d9e9ae64b677c09f345f740f5a94fa41eb468.tar.xz
nixlib-1b0d9e9ae64b677c09f345f740f5a94fa41eb468.tar.zst
nixlib-1b0d9e9ae64b677c09f345f740f5a94fa41eb468.zip
Merge pull request #23819 from ttuegel/freetype
FreeType 2.7.1 and Fontconfig defaults
Diffstat (limited to 'nixos/modules/config/fonts/fontconfig.nix')
-rw-r--r--nixos/modules/config/fonts/fontconfig.nix55
1 files changed, 32 insertions, 23 deletions
diff --git a/nixos/modules/config/fonts/fontconfig.nix b/nixos/modules/config/fonts/fontconfig.nix
index 5648b7b1d027..4d3cc26365fc 100644
--- a/nixos/modules/config/fonts/fontconfig.nix
+++ b/nixos/modules/config/fonts/fontconfig.nix
@@ -75,23 +75,23 @@ let cfg = config.fonts.fontconfig;
       <fontconfig>
 
         <!-- Default rendering settings -->
-        <match target="font">
-          <edit mode="assign" name="hinting">
+        <match target="pattern">
+          <edit mode="append" name="hinting">
             ${fcBool cfg.hinting.enable}
           </edit>
-          <edit mode="assign" name="autohint">
+          <edit mode="append" name="autohint">
             ${fcBool cfg.hinting.autohint}
           </edit>
-          <edit mode="assign" name="hintstyle">
-            <const>hint${cfg.hinting.style}</const>
+          <edit mode="append" name="hintstyle">
+            <const>hintslight</const>
           </edit>
-          <edit mode="assign" name="antialias">
+          <edit mode="append" name="antialias">
             ${fcBool cfg.antialias}
           </edit>
-          <edit mode="assign" name="rgba">
+          <edit mode="append" name="rgba">
             <const>${cfg.subpixel.rgba}</const>
           </edit>
-          <edit mode="assign" name="lcdfilter">
+          <edit mode="append" name="lcdfilter">
             <const>lcd${cfg.subpixel.lcdfilter}</const>
           </edit>
         </match>
@@ -304,7 +304,11 @@ in
         antialias = mkOption {
           type = types.bool;
           default = true;
-          description = "Enable font antialiasing.";
+          description = ''
+            Enable font antialiasing. At high resolution (> 200 DPI),
+            antialiasing has no visible effect; users of such displays may want
+            to disable this option.
+          '';
         };
 
         dpi = mkOption {
@@ -320,7 +324,7 @@ in
           type = types.lines;
           default = "";
           description = ''
-            System-wide customization file contents, has higher priority than 
+            System-wide customization file contents, has higher priority than
             <literal>defaultFonts</literal> settings.
           '';
         };
@@ -358,7 +362,12 @@ in
           enable = mkOption {
             type = types.bool;
             default = true;
-            description = "Enable TrueType hinting.";
+            description = ''
+              Enable font hinting. Hinting aligns glyphs to pixel boundaries to
+              improve rendering sharpness at low resolution. At high resolution
+              (> 200 dpi) hinting will do nothing (at best); users of such
+              displays may want to disable this option.
+            '';
           };
 
           autohint = mkOption {
@@ -370,16 +379,6 @@ in
               correctly-hinted fonts.
             '';
           };
-
-          style = mkOption {
-            type = types.enum ["none" "slight" "medium" "full"];
-            default = "full";
-            description = ''
-              TrueType hinting style, one of <literal>none</literal>,
-              <literal>slight</literal>, <literal>medium</literal>, or
-              <literal>full</literal>.
-            '';
-          };
         };
 
         includeUserConf = mkOption {
@@ -398,7 +397,15 @@ in
             default = "rgb";
             type = types.enum ["rgb" "bgr" "vrgb" "vbgr" "none"];
             description = ''
-              Subpixel order.
+              Subpixel order. The overwhelming majority of displays are
+              <literal>rgb</literal> in their normal orientation. Select
+              <literal>vrgb</literal> for mounting such a display 90 degrees
+              clockwise from its normal orientation or <literal>vbgr</literal>
+              for mounting 90 degrees counter-clockwise. Select
+              <literal>bgr</literal> in the unlikely event of mounting 180
+              degrees from the normal orientation. Reverse these directions in
+              the improbable event that the display's native subpixel order is
+              <literal>bgr</literal>.
             '';
           };
 
@@ -406,7 +413,9 @@ in
             default = "default";
             type = types.enum ["none" "default" "light" "legacy"];
             description = ''
-              FreeType LCD filter.
+              FreeType LCD filter. At high resolution (> 200 DPI), LCD filtering
+              has no visible effect; users of such displays may want to select
+              <literal>none</literal>.
             '';
           };