[Nix-dev] How to downgrade or patch freetype-2.7 ?

Volth volth at volth.com
Thu Apr 20 17:28:03 CEST 2017


On 4/20/17, Thomas Tuegel <ttuegel at mailbox.org> wrote:
> Volth <volth at volth.com> writes:
>
>> The second (http://imgur.com/MDiydzS) is what we get with these
>> fontconfig rules on NixOS-17.09 (freetype-2.7.1) with default v40.
>> Antialias is off, but hinting is not in action.
>
> Did you intentionally turn off hinting in that sample, or is it just not
> working? Even with v40, it should be possible to achieve good results
> with full hinting and no antialiasing.

Hinting is on, the difference between the 2nd and the 3rd images is
only 35 vs. 40 in the environment variable.
If you want to reproduce, you may disable antialiasing and enable full
hinting for pkgs.ubuntu_font_family or pkgs.liberation_ttf_v1_binary
which are in nixpkgs.

>> PS. v38 works similar to v40. It easy to turn in off by
>> "config.fonts.fontconfig.ultimate.enable = false;".
>> What I was looking for is a similar easy way to turn off v40 appeared
>> in NixOS-unstable.
>
> That setting doesn't actually turn off v38! It turns off the
> fontconfig-ultimate settings, but FreeType 2.6 is still patched to use
> v38 instead of v35. So, if you could get acceptable rendering with
> FreeType 2.6 on NixOS (which used v38), we should also be able to fix it
> with FreeType 2.7 (v40) too.

There was a visually similar issue in 17.03 with liberation_ttf_2.xx
[1] which forced me to downgrade to 1.07. In 17.09 even
liberation_ttf_1.07.xx became broken.

There are clearly two diverging ways: the mainstream with
antialiasing, subpixel rendering, gray-on-white texts, ... and the
minority people who want to stay with contrast fonts rendered using
only two colors (foreground and background). In order to stay the
ground both the fonts and freetype are to be downgraded to their
previous versions, so it won't be so long to lose the battle. Anyway,
as dpi grows and pixels became invisible, it won't be the matter at
all.

1. https://github.com/NixOS/nixpkgs/issues/21806


More information about the nix-dev mailing list