summaryrefslogtreecommitdiffstats
path: root/nixos/modules/config/fonts
AgeCommit message (Collapse)Author
2019-04-29treewide: Remove usage of isNullDaniel Schaefer
isNull "is deprecated; just write e == null instead" says the Nix manual
2019-02-22nixos: add preferLocalBuild=true; on derivations for config filesSymphorien Gibol
2018-11-16nixos/fontconfig: fix enable option of penultimateJohannes Frankenau
2018-07-20[bot]: remove unreferenced codevolth
2017-11-10fonts: fix fontconfig.localConf when used with penultimateBenjamin Staffin
Fixes #31500
2017-09-05nixos/fontconfig: fix substitutions option (#28895)pbogdan
2017-04-11treewide: use boolToString functionFranz Pletz
2017-04-08nixos/fonts: install gyre-fonts by defaultThomas Tuegel
gyre-fonts provides high-quality TrueType substitutes for standard PostScript fonts. Unlike most other distributions, NixOS does not install Ghostscript and its Type 1 fonts by default, so we must get the standard fonts elsewhere.
2017-04-08nixos/fontconfig-ultimate: Restore presetsThomas Tuegel
The `preset` option was accidentally removed.
2017-04-03fontconfig-penultimate: 0.2.1 -> 0.3.2Thomas Tuegel
2017-04-03nixos/fontconfig: remove renderMonoTTFAsBitmapThomas Tuegel
2017-04-03nixos/fontconfig: remove forceAutohint optionThomas Tuegel
2017-04-03nixos/fontconfig: disable autohint by defaultThomas Tuegel
2017-03-20Merge pull request #23819 from ttuegel/freetypeThomas Tuegel
FreeType 2.7.1 and Fontconfig defaults
2017-03-17nixos/fontconfig: set rendering defaults, not overridesThomas Tuegel
2017-03-17fontconfig-penultimate: init at 0.2Thomas Tuegel
Also provides a NixOS module.
2017-03-12freetype: 2.6.5 -> 2.7.1Thomas Tuegel
The Infinality bytecode interpreter is removed in favor of the new v40 TrueType interpreter. In the past, the Infinality interpreter provided support for ClearType-style hinting instructions while the default interpreter (then v35) provided support only for original TrueType-style instructions. The v40 interpreter corrects this deficiency, so the Infinality interpreter is no longer necessary. To understand why the Infinality interpreter is no longer necessary, we should understand how ClearType differs from TrueType and how the v40 interpreter works. The following is a summary of information available on the FreeType website [1] mixed with my own editorializing. TrueType instructions use horizontal and vertical hints to improve glyph rendering. Before TrueType, fonts were only vertically hinted; horizontal hints improved rendering by snapping stems to pixel boundaries. Horizontal hinting is a risk because it can significantly distort glyph shapes and kerning. Extensive testing at different resolutions is needed to perfect the TrueType hints. Microsoft invested significant effort to do this with its "Core fonts for the Web" project, but few other typefaces have seen this level of attention. With the advent of subpixel rendering, the effective horizontal resolution of most displays increased significantly. ClearType eschews horizontal hinting in favor of horizontal supersampling. Most fonts are designed for the Microsoft bytecode interpreter, which implements a compatibility mode with TrueType-style (horizontal and vertical) instructions. However, applying the full horizontal hints to subpixel-rendered fonts leads to color fringes and inconsistent stem widths. The Infinality interpreter implements several techniques to mitigate these problems, going so far as to embed font- and glyph-specific hacks in the interpreter. On the other hand, the v40 interpreter ignores the horizontal hinting instructions so that glyphs render as they are intended to on the Microsoft interpreter. Without the horizontal hints, the problems of glyph and kerning distortion, color fringes, and inconsistent stem widths--the problems the Infinality interpreter was created to solve--simply don't occur in the first place. There are also security concerns which motivate removing the Infinality patches. Although there is an updated version of the Infinality interpreter for FreeType 2.7, the lack of a consistent upstream maintainer is a security concern. The interpreter is a Turing-complete virtual machine which has had security vulnerabilities in the past. While the default interpreter is used in billions of devices and is maintained by an active developer, the Infinality interpreter is neither scrutinized nor maintained. We will probably never know if there are defects in the Infinality interpreter, and if they were discovered they would likely never be fixed. I do not think that is an acceptable situtation for a core library like FreeType. Dropping the Infinality patches means that font rendering will be less customizable. I think this is an acceptable trade-off. The Infinality interpreter made many compromises to mitigate the problems with horizontal hinting; the main purpose of customization is to tailor these compromises to the user's preferences. The new interpreter does not have to make these compromises because it renders fonts as their designers intended, so this level of customization is not necessary. The Infinality-associated patches are also removed from cairo. These patches only set the default rendering options in case they aren't set though Fontconfig. On NixOS, the rendering options are always set in Fontconfig, so these patches never actually did anything for us! The Fontconfig test suite is patched to account for a quirk in the way PCF fonts are named. The fontconfig option `hintstyle` is no longer configurable in NixOS. This option selects the TrueType interpreter; the v40 interpreter is `hintslight` and the older v35 interpreter is `hintmedium` or `hintfull` (which have actually always been the same thing). The setting may still be changed through the `localConf` option or by creating a user Fontconfig file. Users with HiDPI displays should probably disable hinting and antialiasing: at best they have no visible effect. The fontconfig-ultimate settings are still available in NixOS, but they are no longer the default. They still work, but their main purpose is to set rendering quirks which are no longer necessary and may actually be detrimental (e.g. setting `hintfull` for some fonts). Also, the vast array of font substitutions provided is not an appropriate default; the default setting should be to give the user the font they asked for. [1]. https://www.freetype.org/freetype2/docs/subpixel-hinting.html
2017-03-04nixos/fontconfig: lift some settings out of fontconfig.ultimateThomas Tuegel
2016-11-16fontconfig module: use enumEric Sagnes
2016-09-05Make the default fonts conditional on services.xserver.enableEelco Dolstra
We were pulling in 44 MiB of fonts in the default configuration, which is a bit excessive for headless configurations like EC2 instances. Note that dejavu_minimal ensures that remote X11-forwarded applications still have a basic font regardless.
2016-08-29treewide: stop using fontbhttfVladimír Čunát
2016-08-20freetype: re-add infinality patchesNikolay Amiantov
archfan has updated those patches for the new version.
2016-08-20freetype: 2.6.2 -> 2.6.5cmfwyp
The fontconfig-ultimate patches are unmaintained. Since they were not updated for newer FreeType versions, this removes them and disables fontconfig-ultimate by default.
2016-08-20fontconfig-ultimate: 2015-12-06 -> 2016-04-23Nikolay Amiantov
This removes our hardcoded presets which weren't updated for quite some time. Infinality now has new hardcoded presets in freetype, which can be overriden if desired with environment variables (as before). Accordingly, updated NixOS module to set the hardcoded preset. Additionally used a more "right" type for substitutions.
2016-08-20fontconfig module: respect upstream definitionsEric Sagnes
2016-08-20fontconfig: fix etc priorityEric Sagnes
2016-07-15Revert "fontconfig: fix etc priority"obadz
This reverts commit 1e53d4a7776acbf61f42c094c103652c8068ad64. Closes #16983 cc @vcunat @ericsagnes @dezgeg
2016-07-09fontconfig: fix etc priorityEric Sagnes
2016-05-26config.fonts.fontdir: use runCommand instead of builderDefsJoachim Fasting
The primary motivation here is to get rid of builderDefs, but now the resulting font directory is also linked into /run/current-system/sw, which fixes #15194.
2016-02-03Merge recent 'staging' into closure-sizeVladimír Čunát
Let's get rid of those merge conflicts.
2016-01-29fontconfig service: add pre-generated fonts cachesNikolay Amiantov
2015-10-05fontconfig: split into multiple outputsVladimír Čunát
Fixed all 'fontconfig}' references as well, hopefully, ugh!
2015-09-26nixos/fonts: Add unifont to list of default fonts.aszlig
This fixes #10077 because after some debugging it turns out that by default we don't have a font which is able to display Chinese symbols. Thanks to @anderspapitto, @kmicu and hyper_ch on IRC to help debugging this issue, see log at: http://nixos.org/irc/logs/log.20150926 starting at 19:46 With unifont we have a reasonable fallback font to ensure that every written language is rendered correctly and thus less surprise for new users who keep their font settings at the default. Reported-by: Anders Papitto <anderspapitto@gmail.com> Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-09-18nixos: fix some typesJan Malakhovski
2015-08-04nixos/fontconfig: separate rendering and alias configurationThomas Tuegel
Fixes #9110. Fontconfig recommends different precedence for rendering settings and generic alias settings. To comply with the recommendations, `98-nixos.conf` has been separated into `10-nixos-rendering.conf` and `60-nixos-generic-alias.conf`.
2015-06-01Hide the option fonts.enableCoreFontsEelco Dolstra
We shouldn't have options that simply enable a package.
2015-03-12Fix infinite loop in fontconfig-ultimate.nixNicolas B. Pierron
With the new evaluation of arguments, pkgs is now defined by the configuration, which implies that option declaration with pkgs.lib will cause an infinite loop.
2015-02-01fontconfig: stringify dpi correctlyThomas Tuegel
2014-12-15nixos: fix config.fonts.fontconfig.ultimate.allowBitmapsThomas Tuegel
The option was incorrectly negated, so that 'allowBitmaps = true' actually disabled bitmap fonts.
2014-12-08nixos: let fontconfig default fonts be lists of fontsThomas Tuegel
2014-12-08Replace Bitstream Vera fonts by DejaVu in defaultsThomas Tuegel
The default configuration installed the Bitstream Vera fonts, but DejaVu is a superior replacement, and the default Fontconfig settings need it now for the generic faces monospace, sans-serif, and serif.
2014-12-08Add NixOS module for fontconfig-ultimateThomas Tuegel
Details: * The option `fonts.fontconfig.ultimate.enable` can be used to disable the fontconfig-ultimate configuration. * The user-configurable options provided by fontconfig-ultimate are exposed in the NixOS module: `allowBitmaps` (default: true), `allowType1` (default: false), `useEmbeddedBitmaps` (default: false), `forceAutohint` (default: false), `renderMonoTTFAsBitmap` (default: false). * Upstream provides three substitution modes for substituting TrueType fonts for Type 1 fonts (which do not render well). The default, "free", substitutes free fonts for Type 1 fonts. The option "ms" substitutions Microsoft fonts for Type 1 fonts. The option "combi" uses a combination of Microsoft and free fonts. Substitutions can also be disabled. * All 21 of the Infinality rendering modes supported by fontconfig-ultimate or by the original Infinality distribution can be selected through `fonts.fontconfig.ultimate.rendering`. The default is the medium style provided by fontconfig-ultimate. Any of the modes may be customized, or Infinality rendering can be disabled entirely.
2014-12-08Rewrite Fontconfig NixOS moduleThomas Tuegel
Details: * The option `fonts.enableFontConfig` has (finally) been renamed `fonts.fontconfig.enable`. * Configurations are loaded in this order: first the Fontconfig-upstream configuration is loaded, then the NixOS-specific font directories are set, the system-wide default configuration is loaded, and finally the user configuration is loaded (if enabled). * The NixOS options `fonts.fontconfig.defaultFonts.monospace`, `fonts.fontconfig.defaultFonts.sansSerif` and `fonts.fontconfig.defaultFonts.serif` are added to allow setting the default system-wide font used for these generic faces. The defaults are the appropriate faces from the DejaVu collection because of their comprehensive Unicode coverage, clean rendering, and excellent legibility. * The NixOS option `fonts.fontconfig.antialias` can be used to disable antialiasing (it is enabled by default). * The options `fonts.fontconfig.subpixel.rgba` and `fonts.fontconfig.subpixel.lcdfilter` control the system-wide default settings for subpixel order and LCD filtering algorithm, respectively. * `fonts.fontconfig.hinting.enable` can be used to disable TrueType font hinting (it is enabled by default). `fonts.fontconfig.hinting.autohint` controls the FreeType autohinter. `fonts.fontconfig.hinting.style` controls the hint style; it is "full" by default. * User configurations can be disabled system-wide by setting `fonts.fontconfig.includeUserConf = false`. They are enabled by default so users can set Fontconfig options in the desktop environment of their choice.
2014-11-05fontconfig: patch and documentVladimír Čunát
2014-10-23fontconfig: update 2.10.2 -> 2.11.1. Close #4410, #2050Luca Bruno
2014-10-05FONTCONFIG_FILE: remove setters to /etc/fonts/fonts.confVladimír Čunát
Any reasonably new version of fontconfig does search that path by default, and setting this globally causes problems, as 2.10 and 2.11 need incompatible configs. Tested: slim+xfce desktop, chrootenv-ed steam. I have no idea why we were setting the global variable; e.g., neither Fedora nor Ubuntu does that.
2014-08-27nixos/manual: Use literalExample when feasible.aszlig
Should bring most of the examples into a better consistency regarding syntactic representation in the manual. Thanks to @devhell for reporting. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-05-22Add type for fonts.fonts optionEelco Dolstra
2014-04-29Obsolete fonts.extraFontsEelco Dolstra
You can now just set fonts.fonts, which will be merged with the default value unless you use mkOverride.
2014-04-29Remove redundant ~/.fonts element from the font search pathEelco Dolstra