diff --git a/nixos/modules/config/fonts/fontconfig-ultimate.nix b/nixos/modules/config/fonts/fontconfig-ultimate.nix
new file mode 100644
index 00000000000..408d49053dd
--- /dev/null
+++ b/nixos/modules/config/fonts/fontconfig-ultimate.nix
@@ -0,0 +1,193 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let fcBool = x: if x then "true" else "false";
+in
+{
+
+ options = {
+
+ fonts = {
+
+ fontconfig = {
+
+ ultimate = {
+ enable = mkOption {
+ type = types.bool;
+ default = true;
+ description = ''
+ Enable fontconfig-ultimate settings (formerly known as
+ Infinality). Besides the customizable settings in this NixOS
+ module, fontconfig-ultimate also provides many font-specific
+ rendering tweaks.
+ '';
+ };
+
+ allowBitmaps = mkOption {
+ type = types.bool;
+ default = true;
+ description = ''
+ Allow bitmap fonts. Set to false to ban all
+ bitmap fonts.
+ '';
+ };
+
+ allowType1 = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Allow Type-1 fonts. Default is false because of
+ poor rendering.
+ '';
+ };
+
+ useEmbeddedBitmaps = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''Use embedded bitmaps in fonts like Calibri.'';
+ };
+
+ forceAutohint = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Force use of the TrueType Autohinter. Useful for debugging or
+ free-software purists.
+ '';
+ };
+
+ renderMonoTTFAsBitmap = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''Render some monospace TTF fonts as bitmaps.'';
+ };
+
+ substitutions = mkOption {
+ type = types.str // {
+ check = flip elem ["none" "free" "combi" "ms"];
+ };
+ default = "free";
+ description = ''
+ Font substitutions to replace common Type 1 fonts with nicer
+ TrueType fonts. free uses free fonts,
+ ms uses Microsoft fonts,
+ combi uses a combination, and
+ none disables the substitutions.
+ '';
+ };
+
+ rendering = mkOption {
+ type = types.attrs;
+ default = pkgs.fontconfig-ultimate.rendering.ultimate;
+ description = ''
+ FreeType rendering settings presets. The default is
+ pkgs.fontconfig-ultimate.rendering.ultimate.
+ The other available styles are:
+ ultimate-lighter,
+ ultimate-darker,
+ ultimate-lightest,
+ ultimate-darkest,
+ default (the original Infinality default),
+ osx,
+ ipad,
+ ubuntu,
+ linux,
+ winxplight,
+ win7light,
+ winxp,
+ win7,
+ vanilla,
+ classic,
+ nudge,
+ push,
+ shove,
+ sharpened,
+ infinality. Any of the presets may be
+ customized by editing the attributes. To disable, set this option
+ to the empty attribute set {}.
+ '';
+ };
+ };
+ };
+ };
+
+ };
+
+
+ config =
+ let ultimate = config.fonts.fontconfig.ultimate;
+ fontconfigUltimateConf = ''
+
+
+
+
+ ${optionalString ultimate.allowBitmaps ''
+
+
+
+
+ false
+
+
+
+ ''}
+
+ ${optionalString ultimate.allowType1 ''
+
+
+
+
+
+ Type 1
+
+
+
+
+ ''}
+
+
+
+
+ ${fcBool ultimate.useEmbeddedBitmaps}
+
+
+
+
+
+
+ ${fcBool ultimate.forceAutohint}
+
+
+
+
+
+
+ ${fcBool ultimate.renderMonoTTFAsBitmap}
+
+
+
+ ${optionalString (ultimate.substitutions != "none") ''
+
+ ${pkgs.fontconfig-ultimate.confd}/etc/fonts/presets/${ultimate.substitutions}
+ ''}
+
+ ${pkgs.fontconfig-ultimate.confd}/etc/fonts/conf.d
+
+
+ '';
+ in mkIf (config.fonts.fontconfig.enable && ultimate.enable) {
+
+ environment.etc."fonts/conf.d/52-fontconfig-ultimate.conf" = {
+ text = fontconfigUltimateConf;
+ };
+
+ environment.etc."fonts/${pkgs.fontconfig.configVersion}/conf.d/52-fontconfig-ultimate.conf" = {
+ text = fontconfigUltimateConf;
+ };
+
+ environment.variables = ultimate.rendering;
+
+ };
+
+}
diff --git a/nixos/modules/config/fonts/fontconfig.nix b/nixos/modules/config/fonts/fontconfig.nix
index 4b6f9325fda..793b0a250ac 100644
--- a/nixos/modules/config/fonts/fontconfig.nix
+++ b/nixos/modules/config/fonts/fontconfig.nix
@@ -8,72 +8,250 @@ with lib;
fonts = {
- enableFontConfig = mkOption { # !!! should be enableFontconfig
- type = types.bool;
- default = true;
- description = ''
- If enabled, a Fontconfig configuration file will be built
- pointing to a set of default fonts. If you don't care about
- running X11 applications or any other program that uses
- Fontconfig, you can turn this option off and prevent a
- dependency on all those fonts.
- '';
+ fontconfig = {
+ enable = mkOption {
+ type = types.bool;
+ default = true;
+ description = ''
+ If enabled, a Fontconfig configuration file will be built
+ pointing to a set of default fonts. If you don't care about
+ running X11 applications or any other program that uses
+ Fontconfig, you can turn this option off and prevent a
+ dependency on all those fonts.
+ '';
+ };
+
+ antialias = mkOption {
+ type = types.bool;
+ default = true;
+ description = "Enable font antialiasing.";
+ };
+
+ dpi = mkOption {
+ type = types.int;
+ default = 0;
+ description = ''
+ Force DPI setting. Setting to 0 disables DPI
+ forcing; the DPI detected for the display will be used.
+ '';
+ };
+
+ defaultFonts = {
+ monospace = mkOption {
+ type = types.listOf types.str;
+ default = ["DejaVu Sans Mono"];
+ description = ''
+ System-wide default monospace font(s). Multiple fonts may be
+ listed in case multiple languages must be supported.
+ '';
+ };
+
+ sansSerif = mkOption {
+ type = types.listOf types.str;
+ default = ["DejaVu Sans"];
+ description = ''
+ System-wide default sans serif font(s). Multiple fonts may be
+ listed in case multiple languages must be supported.
+ '';
+ };
+
+ serif = mkOption {
+ type = types.listOf types.str;
+ default = ["DejaVu Serif"];
+ description = ''
+ System-wide default serif font(s). Multiple fonts may be listed
+ in case multiple languages must be supported.
+ '';
+ };
+ };
+
+ hinting = {
+ enable = mkOption {
+ type = types.bool;
+ default = true;
+ description = "Enable TrueType hinting.";
+ };
+
+ autohint = mkOption {
+ type = types.bool;
+ default = true;
+ description = ''
+ Enable the autohinter, which provides hinting for otherwise
+ un-hinted fonts. The results are usually lower quality than
+ correctly-hinted fonts.
+ '';
+ };
+
+ style = mkOption {
+ type = types.str // {
+ check = flip elem ["none" "slight" "medium" "full"];
+ };
+ default = "full";
+ description = ''
+ TrueType hinting style, one of none,
+ slight, medium, or
+ full.
+ '';
+ };
+ };
+
+ includeUserConf = mkOption {
+ type = types.bool;
+ default = true;
+ description = ''
+ Include the user configuration from
+ ~/.config/fontconfig/fonts.conf or
+ ~/.config/fontconfig/conf.d.
+ '';
+ };
+
+ subpixel = {
+
+ rgba = mkOption {
+ type = types.string // {
+ check = flip elem ["rgb" "bgr" "vrgb" "vbgr" "none"];
+ };
+ default = "rgb";
+ description = ''
+ Subpixel order, one of none,
+ rgb, bgr,
+ vrgb, or vbgr.
+ '';
+ };
+
+ lcdfilter = mkOption {
+ type = types.str // {
+ check = flip elem ["none" "default" "light" "legacy"];
+ };
+ default = "default";
+ description = ''
+ FreeType LCD filter, one of none,
+ default, light, or
+ legacy.
+ '';
+ };
+
+ };
+
};
};
};
+ config =
+ let fontconfig = config.fonts.fontconfig;
+ fcBool = x: "" + (if x then "true" else "false") + "";
+ nixosConf = ''
+
+
+
- config = mkIf config.fonts.enableFontConfig {
+
+
+
+ ${fcBool fontconfig.hinting.enable}
+
+
+ ${fcBool fontconfig.hinting.autohint}
+
+
+ hint${fontconfig.hinting.style}
+
+
+ ${fcBool fontconfig.antialias}
+
+
+ ${fontconfig.subpixel.rgba}
+
+
+ lcd${fontconfig.subpixel.lcdfilter}
+
+
- # Fontconfig 2.10 backward compatibility
+
+ ${optionalString (fontconfig.defaultFonts.sansSerif != []) ''
+
+ sans-serif
+
+ ${concatStringsSep "\n"
+ (map (font: "${font}")
+ fontconfig.defaultFonts.sansSerif)}
+
+
+ ''}
+ ${optionalString (fontconfig.defaultFonts.serif != []) ''
+
+ serif
+
+ ${concatStringsSep "\n"
+ (map (font: "${font}")
+ fontconfig.defaultFonts.serif)}
+
+
+ ''}
+ ${optionalString (fontconfig.defaultFonts.monospace != []) ''
+
+ monospace
+
+ ${concatStringsSep "\n"
+ (map (font: "${font}")
+ fontconfig.defaultFonts.monospace)}
+
+
+ ''}
- # Bring in the default (upstream) fontconfig configuration, only for fontconfig 2.10
- environment.etc."fonts/fonts.conf".source =
- pkgs.makeFontsConf { fontconfig = pkgs.fontconfig_210; fontDirectories = config.fonts.fonts; };
+ ${optionalString (fontconfig.dpi != 0) ''
+
+
+ ${fontconfig.dpi}
+
+
+ ''}
- environment.etc."fonts/conf.d/00-nixos.conf".text =
- ''
-
-
-
+
+ '';
+ in mkIf fontconfig.enable {
-
-
-
- hintslight
-
-
+ # 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 { fontconfig = pkgs.fontconfig_210; fontDirectories = config.fonts.fonts; };
- # Versioned fontconfig > 2.10. Take shared fonts.conf from fontconfig.
- # Otherwise specify only font directories.
- environment.etc."fonts/${pkgs.fontconfig.configVersion}/fonts.conf".source =
- "${pkgs.fontconfig}/etc/fonts/fonts.conf";
- environment.etc."fonts/${pkgs.fontconfig.configVersion}/conf.d/00-nixos.conf".text =
- ''
-
-
-
+ environment.etc."fonts/conf.d/98-nixos.conf".text = nixosConf;
-
-
-
- hintslight
-
-
+ # Versioned fontconfig > 2.10. Take shared fonts.conf from fontconfig.
+ # Otherwise specify only font directories.
+ environment.etc."fonts/${pkgs.fontconfig.configVersion}/fonts.conf".source =
+ "${pkgs.fontconfig}/etc/fonts/fonts.conf";
-
- ${concatStringsSep "\n" (map (font: "${font}") config.fonts.fonts)}
+ environment.etc."fonts/${pkgs.fontconfig.configVersion}/conf.d/00-nixos.conf".text =
+ ''
+
+
+
+
+ ${concatStringsSep "\n" (map (font: "${font}") config.fonts.fonts)}
+
+ '';
-
- '';
+ environment.etc."fonts/${pkgs.fontconfig.configVersion}/conf.d/98-nixos.conf".text = nixosConf;
- environment.systemPackages = [ pkgs.fontconfig ];
+ environment.etc."fonts/${pkgs.fontconfig.configVersion}/conf.d/99-user.conf" = {
+ enable = fontconfig.includeUserConf;
+ text = ''
+
+
+
+ fontconfig/conf.d
+ fontconfig/fonts.conf
+
+ '';
+ };
- };
+ environment.systemPackages = [ pkgs.fontconfig ];
+
+ };
}
diff --git a/nixos/modules/config/fonts/fonts.nix b/nixos/modules/config/fonts/fonts.nix
index baf5b7713f5..a3fa4bd9778 100644
--- a/nixos/modules/config/fonts/fonts.nix
+++ b/nixos/modules/config/fonts/fonts.nix
@@ -25,7 +25,7 @@ with lib;
[ pkgs.xorg.fontbhttf
pkgs.xorg.fontbhlucidatypewriter100dpi
pkgs.xorg.fontbhlucidatypewriter75dpi
- pkgs.ttf_bitstream_vera
+ pkgs.dejavu_fonts
pkgs.freefont_ttf
pkgs.liberation_ttf
pkgs.xorg.fontbh100dpi
diff --git a/nixos/modules/config/no-x-libs.nix b/nixos/modules/config/no-x-libs.nix
index f91dbb4cc28..47393c9d3f5 100644
--- a/nixos/modules/config/no-x-libs.nix
+++ b/nixos/modules/config/no-x-libs.nix
@@ -24,7 +24,7 @@ with lib;
programs.ssh.setXAuthLocation = false;
security.pam.services.su.forwardXAuth = lib.mkForce false;
- fonts.enableFontConfig = false;
+ fonts.fontconfig.enable = false;
nixpkgs.config.packageOverrides = pkgs:
{ dbus = pkgs.dbus.override { useX11 = false; }; };
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index 177eb6d0e19..36e56a1d152 100755
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -1,6 +1,7 @@
[
./config/fonts/corefonts.nix
./config/fonts/fontconfig.nix
+ ./config/fonts/fontconfig-ultimate.nix
./config/fonts/fontdir.nix
./config/fonts/fonts.nix
./config/fonts/ghostscript.nix
diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix
index b29a3d0354c..cb1b92e78d6 100644
--- a/nixos/modules/rename.nix
+++ b/nixos/modules/rename.nix
@@ -74,6 +74,7 @@ in zipModules ([]
++ obsolete [ "environment" "x11Packages" ] [ "environment" "systemPackages" ]
++ obsolete [ "environment" "enableBashCompletion" ] [ "programs" "bash" "enableCompletion" ]
++ obsolete [ "environment" "nix" ] [ "nix" "package" ]
+++ obsolete [ "fonts" "enableFontConfig" ] [ "fonts" "fontconfig" "enable" ]
++ obsolete [ "fonts" "extraFonts" ] [ "fonts" "fonts" ]
++ obsolete [ "security" "extraSetuidPrograms" ] [ "security" "setuidPrograms" ]
diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix
index 6b01cde9e2b..8bc8175f88f 100644
--- a/nixos/modules/services/x11/display-managers/default.nix
+++ b/nixos/modules/services/x11/display-managers/default.nix
@@ -23,6 +23,17 @@ let
pathsToLink = [ "/" ];
};
+ fontconfig = config.fonts.fontconfig;
+ xresourcesXft = pkgs.writeText "Xresources-Xft" ''
+ ${optionalString (fontconfig.dpi != 0) ''Xft.dpi: ${fontconfig.dpi}''}
+ Xft.antialias: ${if fontconfig.antialias then "1" else "0"}
+ Xft.rgba: ${fontconfig.subpixel.rgba}
+ Xft.lcdfilter: lcd${fontconfig.subpixel.lcdfilter}
+ Xft.hinting: ${if fontconfig.hinting.enable then "1" else "0"}
+ Xft.autohint: ${if fontconfig.hinting.autohint then "1" else "0"}
+ Xft.hintstyle: hint${fontconfig.hinting.style}
+ '';
+
# file provided by services.xserver.displayManager.session.script
xsession = wm: dm: pkgs.writeScript "xsession"
''
@@ -79,6 +90,7 @@ let
''}
# Load X defaults.
+ ${xorg.xrdb}/bin/xrdb -merge ${xresourcesXft}
if test -e ~/.Xresources; then
${xorg.xrdb}/bin/xrdb -merge ~/.Xresources
elif test -e ~/.Xdefaults; then
diff --git a/pkgs/development/libraries/fontconfig-ultimate/confd.nix b/pkgs/development/libraries/fontconfig-ultimate/confd.nix
new file mode 100644
index 00000000000..ce734527162
--- /dev/null
+++ b/pkgs/development/libraries/fontconfig-ultimate/confd.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation {
+ name = "fontconfig-ultimate-20141123";
+ src = fetchurl {
+ url = "https://github.com/bohoomil/fontconfig-ultimate/archive/2014-11-23.tar.gz";
+ sha256 = "0czfm3hxc41x5mscwrba7p1vhm2w62j1qg7z8kfdrf21z8fvgznw";
+ };
+
+ phases = "$prePhases unpackPhase installPhase $postPhases";
+ installPhase = ''
+ mkdir -p $out/etc/fonts/conf.d
+ cp conf.d.infinality/*.conf $out/etc/fonts/conf.d
+
+ # Base rendering settings will be determined by NixOS module
+ rm $out/etc/fonts/conf.d/10-base-rendering.conf
+
+ # Options controlled by NixOS module
+ rm $out/etc/fonts/conf.d/82-*.conf
+ rm $out/etc/fonts/conf.d/83-*.conf
+
+ # Inclusion of local and user configs handled by global configuration
+ rm $out/etc/fonts/conf.d/97-local.conf
+ rm $out/etc/fonts/conf.d/98-user.conf
+
+ cp fontconfig_patches/fonts-settings/*.conf $out/etc/fonts/conf.d
+
+ mkdir -p $out/etc/fonts/presets/{combi,free,ms}
+ cp fontconfig_patches/combi/*.conf $out/etc/fonts/presets/combi
+ cp fontconfig_patches/free/*.conf $out/etc/fonts/presets/free
+ cp fontconfig_patches/ms/*.conf $out/etc/fonts/presets/ms
+ '';
+}
diff --git a/pkgs/development/libraries/fontconfig-ultimate/default.nix b/pkgs/development/libraries/fontconfig-ultimate/default.nix
new file mode 100644
index 00000000000..aa799d850d7
--- /dev/null
+++ b/pkgs/development/libraries/fontconfig-ultimate/default.nix
@@ -0,0 +1,6 @@
+{ callPackage }:
+
+{
+ confd = callPackage ./confd.nix {};
+ rendering = callPackage ./rendering.nix {};
+}
diff --git a/pkgs/development/libraries/fontconfig-ultimate/rendering.nix b/pkgs/development/libraries/fontconfig-ultimate/rendering.nix
new file mode 100644
index 00000000000..b1de43b49b2
--- /dev/null
+++ b/pkgs/development/libraries/fontconfig-ultimate/rendering.nix
@@ -0,0 +1,212 @@
+{}:
+
+rec {
+ default = {
+ INFINALITY_FT_FILTER_PARAMS="11 22 38 22 11";
+ INFINALITY_FT_GRAYSCALE_FILTER_STRENGTH="0";
+ INFINALITY_FT_FRINGE_FILTER_STRENGTH="0";
+ INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH="10";
+ INFINALITY_FT_AUTOHINT_VERTICAL_STEM_DARKEN_STRENGTH="25";
+ INFINALITY_FT_WINDOWS_STYLE_SHARPENING_STRENGTH="10";
+ INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="0";
+ INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25";
+ INFINALITY_FT_STEM_FITTING_STRENGTH="25";
+ INFINALITY_FT_GAMMA_CORRECTION="0 100";
+ INFINALITY_FT_BRIGHTNESS="0";
+ INFINALITY_FT_CONTRAST="0";
+ INFINALITY_FT_USE_VARIOUS_TWEAKS="true";
+ INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS="true";
+ INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT="100";
+ INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE="40";
+ INFINALITY_FT_USE_KNOWN_SETTINGS_ON_SELECTED_FONTS="true";
+ INFINALITY_FT_GLOBAL_EMBOLDEN_X_VALUE="0";
+ INFINALITY_FT_GLOBAL_EMBOLDEN_Y_VALUE="0";
+ INFINALITY_FT_BOLD_EMBOLDEN_X_VALUE="0";
+ INFINALITY_FT_BOLD_EMBOLDEN_Y_VALUE="0";
+ };
+
+ osx = default // {
+ INFINALITY_FT_FILTER_PARAMS="03 32 38 32 03";
+ INFINALITY_FT_GRAYSCALE_FILTER_STRENGTH="25";
+ INFINALITY_FT_WINDOWS_STYLE_SHARPENING_STRENGTH="0";
+ INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="0";
+ INFINALITY_FT_STEM_FITTING_STRENGTH="0";
+ INFINALITY_FT_GAMMA_CORRECTION="1000 80";
+ INFINALITY_FT_BRIGHTNESS="10";
+ INFINALITY_FT_CONTRAST="20";
+ INFINALITY_FT_USE_VARIOUS_TWEAKS="false";
+ INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS="false";
+ INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT="0";
+ INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE="0";
+ INFINALITY_FT_USE_KNOWN_SETTINGS_ON_SELECTED_FONTS="false";
+ INFINALITY_FT_GLOBAL_EMBOLDEN_Y_VALUE="8";
+ INFINALITY_FT_BOLD_EMBOLDEN_X_VALUE="16";
+ };
+
+ ipad = default // {
+ INFINALITY_FT_FILTER_PARAMS="00 00 100 00 00";
+ INFINALITY_FT_GRAYSCALE_FILTER_STRENGTH="100";
+ INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH="0";
+ INFINALITY_FT_AUTOHINT_VERTICAL_STEM_DARKEN_STRENGTH="0";
+ INFINALITY_FT_WINDOWS_STYLE_SHARPENING_STRENGTH="0";
+ INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="0";
+ INFINALITY_FT_STEM_FITTING_STRENGTH="0";
+ INFINALITY_FT_GAMMA_CORRECTION="1000 80";
+ INFINALITY_FT_USE_VARIOUS_TWEAKS="false";
+ INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS="false";
+ INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT="0";
+ INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE="0";
+ INFINALITY_FT_USE_KNOWN_SETTINGS_ON_SELECTED_FONTS="false";
+ };
+
+ ubuntu = default // {
+ INFINALITY_FT_WINDOWS_STYLE_SHARPENING_STRENGTH="0";
+ INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="0";
+ INFINALITY_FT_STEM_FITTING_STRENGTH="0";
+ INFINALITY_FT_GAMMA_CORRECTION="1000 80";
+ INFINALITY_FT_BRIGHTNESS="-10";
+ INFINALITY_FT_CONTRAST="15";
+ INFINALITY_FT_USE_VARIOUS_TWEAKS="false";
+ INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS="false";
+ INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT="0";
+ INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE="0";
+ INFINALITY_FT_USE_KNOWN_SETTINGS_ON_SELECTED_FONTS="false";
+ };
+
+ linux = default // {
+ INFINALITY_FT_FILTER_PARAMS="06 25 44 25 06";
+ INFINALITY_FT_WINDOWS_STYLE_SHARPENING_STRENGTH="0";
+ INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="0";
+ INFINALITY_FT_STEM_FITTING_STRENGTH="0";
+ INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS="false";
+ INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT="100";
+ INFINALITY_FT_USE_KNOWN_SETTINGS_ON_SELECTED_FONTS="false";
+ };
+
+ winxplight = default // {
+ INFINALITY_FT_FILTER_PARAMS="06 25 44 25 06";
+ INFINALITY_FT_FRINGE_FILTER_STRENGTH="100";
+ INFINALITY_FT_WINDOWS_STYLE_SHARPENING_STRENGTH="65";
+ INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="15";
+ INFINALITY_FT_STEM_FITTING_STRENGTH="15";
+ INFINALITY_FT_GAMMA_CORRECTION="1000 120";
+ INFINALITY_FT_BRIGHTNESS="20";
+ INFINALITY_FT_CONTRAST="30";
+ INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS="false";
+ INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE="30";
+ };
+
+ win7light = default // {
+ INFINALITY_FT_FILTER_PARAMS="20 25 38 25 05";
+ INFINALITY_FT_FRINGE_FILTER_STRENGTH="100";
+ INFINALITY_FT_WINDOWS_STYLE_SHARPENING_STRENGTH="100";
+ INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="0";
+ INFINALITY_FT_STEM_FITTING_STRENGTH="0";
+ INFINALITY_FT_GAMMA_CORRECTION="1000 160";
+ INFINALITY_FT_CONTRAST="20";
+ INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS="false";
+ INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE="30";
+ };
+
+ winxp = default // {
+ INFINALITY_FT_FILTER_PARAMS="06 25 44 25 06";
+ INFINALITY_FT_FRINGE_FILTER_STRENGTH="100";
+ INFINALITY_FT_WINDOWS_STYLE_SHARPENING_STRENGTH="65";
+ INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="15";
+ INFINALITY_FT_STEM_FITTING_STRENGTH="15";
+ INFINALITY_FT_GAMMA_CORRECTION="1000 120";
+ INFINALITY_FT_BRIGHTNESS="10";
+ INFINALITY_FT_CONTRAST="20";
+ INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS="false";
+ INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE="30";
+ };
+
+ win7 = default // {
+ INFINALITY_FT_FILTER_PARAMS="20 25 42 25 06";
+ INFINALITY_FT_FRINGE_FILTER_STRENGTH="100";
+ INFINALITY_FT_WINDOWS_STYLE_SHARPENING_STRENGTH="65";
+ INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="0";
+ INFINALITY_FT_STEM_FITTING_STRENGTH="0";
+ INFINALITY_FT_GAMMA_CORRECTION="1000 120";
+ INFINALITY_FT_BRIGHTNESS="10";
+ INFINALITY_FT_CONTRAST="20";
+ INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS="false";
+ INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE="0";
+ };
+
+ vanilla = default // {
+ INFINALITY_FT_FILTER_PARAMS="06 25 38 25 06";
+ INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH="0";
+ INFINALITY_FT_AUTOHINT_VERTICAL_STEM_DARKEN_STRENGTH="0";
+ INFINALITY_FT_WINDOWS_STYLE_SHARPENING_STRENGTH="0";
+ INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="0";
+ INFINALITY_FT_STEM_FITTING_STRENGTH="0";
+ INFINALITY_FT_USE_VARIOUS_TWEAKS="false";
+ INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS="false";
+ INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT="0";
+ INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE="0";
+ INFINALITY_FT_USE_KNOWN_SETTINGS_ON_SELECTED_FONTS="false";
+ };
+
+ classic = default // {
+ INFINALITY_FT_FILTER_PARAMS="06 25 38 25 06";
+ INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH="0";
+ INFINALITY_FT_AUTOHINT_VERTICAL_STEM_DARKEN_STRENGTH="0";
+ INFINALITY_FT_WINDOWS_STYLE_SHARPENING_STRENGTH="0";
+ INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="0";
+ INFINALITY_FT_STEM_FITTING_STRENGTH="0";
+ INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE="0";
+ INFINALITY_FT_USE_KNOWN_SETTINGS_ON_SELECTED_FONTS="false";
+ };
+
+ nudge = default // {
+ INFINALITY_FT_WINDOWS_STYLE_SHARPENING_STRENGTH="0";
+ INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE="30";
+ INFINALITY_FT_USE_KNOWN_SETTINGS_ON_SELECTED_FONTS="false";
+ };
+
+ push = default // {
+ INFINALITY_FT_WINDOWS_STYLE_SHARPENING_STRENGTH="0";
+ INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="75";
+ INFINALITY_FT_STEM_FITTING_STRENGTH="50";
+ INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE="30";
+ };
+
+ infinality = default // {
+ INFINALITY_FT_WINDOWS_STYLE_SHARPENING_STRENGTH="5";
+ };
+
+ shove = default // {
+ INFINALITY_FT_WINDOWS_STYLE_SHARPENING_STRENGTH="0";
+ INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="100";
+ INFINALITY_FT_STEM_FITTING_STRENGTH="100";
+ INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE="0";
+ };
+
+ sharpened = default // {
+ INFINALITY_FT_WINDOWS_STYLE_SHARPENING_STRENGTH="65";
+ };
+
+ ultimate = {
+ INFINALITY_FT_FILTER_PARAMS="08 24 36 24 08";
+ INFINALITY_FT_FRINGE_FILTER_STRENGTH="50";
+ INFINALITY_FT_USE_VARIOUS_TWEAKS="true";
+ INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20";
+ };
+
+ ultimate-lighter = ultimate // {
+ INFINALITY_FT_FILTER_PARAMS="06 22 36 22 06";
+ };
+
+ ultimate-lightest = ultimate // {
+ INFINALITY_FT_FILTER_PARAMS="04 22 38 22 04";
+ };
+
+ ultimate-darker = ultimate // {
+ INFINALITY_FT_FILTER_PARAMS="10 25 37 25 10";
+ };
+
+ ultimate-darkest = ultimate // {
+ INFINALITY_FT_FILTER_PARAMS="12 28 42 28 12";
+ };
+}
diff --git a/pkgs/development/libraries/fontconfig/make-fonts-conf.xsl b/pkgs/development/libraries/fontconfig/make-fonts-conf.xsl
index 03f7815e38a..1b79834c894 100644
--- a/pkgs/development/libraries/fontconfig/make-fonts-conf.xsl
+++ b/pkgs/development/libraries/fontconfig/make-fonts-conf.xsl
@@ -27,8 +27,6 @@
/etc/fonts/conf.d
/etc/fonts//conf.d
-
- fontconfig/conf.d
fontconfig
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 15a3e9fcd2c..4fd5b9dc3e0 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -5168,6 +5168,8 @@ let
fontconfig = callPackage ../development/libraries/fontconfig { };
+ fontconfig-ultimate = callPackage ../development/libraries/fontconfig-ultimate {};
+
folly = callPackage ../development/libraries/folly { };
makeFontsConf = let fontconfig_ = fontconfig; in {fontconfig ? fontconfig_, fontDirectories}: