xserver: improve font setup
Alan Pearce alan@alanpearce.eu
Fri, 29 Nov 2019 15:36:47 +0100
1 files changed, 22 insertions(+), 11 deletions(-)
M system/settings/services/xserver.nix → system/settings/services/xserver.nix
@@ -34,19 +34,34 @@ enableDefaultFonts = false; 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 @@ xorg.fontmiscmisc 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