Branch: refs/heads/staging
  Home:   https://github.com/NixOS/nixpkgs
  Commit: 65592837b6e62fb555d6e8c891f347428886c4f2
      
https://github.com/NixOS/nixpkgs/commit/65592837b6e62fb555d6e8c891f347428886c4f2
  Author: Thomas Tuegel <ttue...@mailbox.org>
  Date:   2017-03-12 (Sun, 12 Mar 2017)

  Changed paths:
    M nixos/modules/config/fonts/fontconfig-ultimate.nix
    M nixos/modules/config/fonts/fontconfig.nix
    M nixos/modules/rename.nix
    M nixos/modules/services/x11/display-managers/default.nix
    M pkgs/development/libraries/cairo/default.nix
    M pkgs/development/libraries/fontconfig/2.10.nix
    M pkgs/development/libraries/fontconfig/default.nix
    A 
pkgs/development/libraries/fontconfig/test-pcf-family-names-freetype-2.7.patch
    M pkgs/development/libraries/freetype/default.nix
    A pkgs/development/libraries/freetype/enable-subpixel-rendering.patch
    A pkgs/development/libraries/freetype/enable-table-validation.patch

  Log Message:
  -----------
  freetype: 2.6.5 -> 2.7.1

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


  Commit: 354ea69ae42d2a1b691a4f3cb771e59141bd0dcd
      
https://github.com/NixOS/nixpkgs/commit/354ea69ae42d2a1b691a4f3cb771e59141bd0dcd
  Author: Thomas Tuegel <ttue...@mailbox.org>
  Date:   2017-03-17 (Fri, 17 Mar 2017)

  Changed paths:
    A nixos/modules/config/fonts/fontconfig-penultimate.nix
    M nixos/modules/module-list.nix
    A pkgs/data/fonts/fontconfig-penultimate/default.nix
    M pkgs/top-level/all-packages.nix

  Log Message:
  -----------
  fontconfig-penultimate: init at 0.2

Also provides a NixOS module.


  Commit: a6fce585e4c7acbd3fbb045199ef39a2f71df4ec
      
https://github.com/NixOS/nixpkgs/commit/a6fce585e4c7acbd3fbb045199ef39a2f71df4ec
  Author: Thomas Tuegel <ttue...@mailbox.org>
  Date:   2017-03-17 (Fri, 17 Mar 2017)

  Changed paths:
    M nixos/modules/config/fonts/fontconfig.nix

  Log Message:
  -----------
  nixos/fontconfig: set rendering defaults, not overrides


  Commit: d458b5401a36dd87cfd2bd071f634330f095cf5d
      
https://github.com/NixOS/nixpkgs/commit/d458b5401a36dd87cfd2bd071f634330f095cf5d
  Author: Thomas Tuegel <ttue...@mailbox.org>
  Date:   2017-03-20 (Mon, 20 Mar 2017)

  Changed paths:
    M nixos/doc/manual/release-notes/rl-1709.xml

  Log Message:
  -----------
  nixos/fontconfig: add Changelog message about FreeType update


  Commit: 1b0d9e9ae64b677c09f345f740f5a94fa41eb468
      
https://github.com/NixOS/nixpkgs/commit/1b0d9e9ae64b677c09f345f740f5a94fa41eb468
  Author: Thomas Tuegel <ttue...@secure.mailbox.org>
  Date:   2017-03-20 (Mon, 20 Mar 2017)

  Changed paths:
    M nixos/doc/manual/release-notes/rl-1709.xml
    A nixos/modules/config/fonts/fontconfig-penultimate.nix
    M nixos/modules/config/fonts/fontconfig-ultimate.nix
    M nixos/modules/config/fonts/fontconfig.nix
    M nixos/modules/module-list.nix
    M nixos/modules/rename.nix
    M nixos/modules/services/x11/display-managers/default.nix
    A pkgs/data/fonts/fontconfig-penultimate/default.nix
    M pkgs/development/libraries/cairo/default.nix
    M pkgs/development/libraries/fontconfig/2.10.nix
    M pkgs/development/libraries/fontconfig/default.nix
    A 
pkgs/development/libraries/fontconfig/test-pcf-family-names-freetype-2.7.patch
    M pkgs/development/libraries/freetype/default.nix
    A pkgs/development/libraries/freetype/enable-subpixel-rendering.patch
    A pkgs/development/libraries/freetype/enable-table-validation.patch
    M pkgs/top-level/all-packages.nix

  Log Message:
  -----------
  Merge pull request #23819 from ttuegel/freetype

FreeType 2.7.1 and Fontconfig defaults


Compare: https://github.com/NixOS/nixpkgs/compare/48bc3cf9f497...1b0d9e9ae64b
_______________________________________________
nix-commits mailing list
nix-comm...@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-commits

Reply via email to