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

Thomas Tuegel ttuegel at mailbox.org
Wed Apr 19 17:06:03 CEST 2017


Volth <volth at volth.com> writes:

> Freetype changed defaults in 2.7, the truetype interpreter became v40
> instead of v35.
> The new defaults are incomatible in a weird way with some old fonts
> (notably PragmataPro).

> But on NixOS this - flipping one bit in libfreetype.so - means either
> to recompile all NixOS (too many packages depends on freetype, not
> only GUI apps, also devtools) or to live with corrupt nixstore.
>
> Is there a more elegant solution?

There is a more elegant work-around, and possibly an actual solution.

First, the workaround: add a modified FreeType library to
LD_LIBRARY_PATH. This environment variable should be passed through to
every program on NixOS because that is how we handle the impurity of
OpenGL drivers.

Second, I can probably fix the way PragmataPro renders by applying
selective Fontconfig rules. Could you please tell me, what settings are
you using in `fonts.fontconfig'? If you have changed any
Fontconfig settings like DPI or hinting through your desktop
environment, please share that also. Unfortunately, it is not possible
to simply change the interpreter from v40 to v35 through Fontconfig
rules. However, changing the hinting level for that font only can
essentially achieve the same thing.

Regards,
Tom



More information about the nix-dev mailing list