summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2019-11-29 15:36:47 +0100
committerAlan Pearce2019-11-29 15:36:47 +0100
commit7e5653c280976af97aa4210a08f1bd2a89fcfb39 (patch)
tree2ae06f30a7939498fa4ee3fb698d1633e56ccb27
parentc2e1756638cd03398354090746854f4ccf41abcb (diff)
downloadnixfiles-7e5653c280976af97aa4210a08f1bd2a89fcfb39.tar.lz
nixfiles-7e5653c280976af97aa4210a08f1bd2a89fcfb39.tar.zst
nixfiles-7e5653c280976af97aa4210a08f1bd2a89fcfb39.zip
xserver: improve font setup
-rw-r--r--system/settings/services/xserver.nix33
1 files changed, 22 insertions, 11 deletions
diff --git a/system/settings/services/xserver.nix b/system/settings/services/xserver.nix
index 64bdb238..bc058a8a 100644
--- a/system/settings/services/xserver.nix
+++ b/system/settings/services/xserver.nix
@@ -34,19 +34,34 @@ with lib;
     fontconfig = {
       antialias = true;
       subpixel = mkIf config.fonts.fontconfig.antialias {
-        lcdfilter = "light";
+        lcdfilter = "default";
+        rgba = "rgb";
       };
       ultimate = mkIf config.fonts.fontconfig.antialias {
         enable = true;
-        preset = "ultimate3";
-        substitutions = "ms";
+        preset = "ultimate1";
+        substitutions = "combi";
       };
       useEmbeddedBitmaps = !config.fonts.fontconfig.antialias;
       defaultFonts = {
-        monospace = [ "Source Code Pro" ];
-        sansSerif = [ "Tahoma" ];
+        monospace = [ "IBM Plex Mono" ];
+        sansSerif = [ "Cantarell" ];
         serif = [ "Times New Roman" ];
       };
+
+      localConf = ''
+        <?xml version='1.0'?>
+        <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
+        <fontconfig>
+          <match target="font">
+            <test name="weight" compare="more">
+              <const>medium</const>
+            </test>
+            <edit name="autohint" mode="assign">
+              <bool>false</bool>
+            </edit>
+          </match>
+      '';
     };
     fonts = with pkgs; [
       gohufont
@@ -63,17 +78,13 @@ with lib;
       xorg.fontcursormisc
       xorg.fontbhlucidatypewriter100dpi
     ] ++ lib.optionals config.fonts.fontconfig.antialias [
+      cantarell-fonts
+
       fira
       fira-code
       fira-mono
-      go-font
       ibm-plex
 
-      liberation_ttf
-      mononoki
-      roboto
-      roboto-mono
-      roboto-slab
       source-code-pro
       source-sans-pro
       source-serif-pro