Let’s face it: the plain vanilla font rendering on Linux was horrible. For a long time, I had relied on Infinality patches for freetype2
and fontconfig
to improve how texts looked on Arch Linux, and the result was impressive.
But then, the upstream of Infinality died. For some months now, I had been holding onto the patched freetype2
and fontconfig
as I was unable to find an acceptable alternative, though it was obvious that I had to make do with the plain vanilla freetype
and fontconfig
at some point. Even though parts, if not all, of Infinality patches had been merged into freetype2
, the texts remained quite ugly for some reason; not as ugly as the plain vanilla freetype2
used to look a year ago, perhaps, yet far from how the patched version looked. I was clearly missing something.
It turns out that although those patches have been merged into freetype2
, they aren’t enabled by default. In order to enable “Infinality mode” in plain vanilla freetype2
, edit /etc/profile.d/freetype2.sh
to include the following line:
export FREETYPE_PROPERTIES="truetype:interpreter-version=38"
Then create the following symbolic links in /etc/fonts/conf.d
if they aren’t already present:
ln -s ../conf.avail/10-hinting-slight.conf
ln -s ../conf.avail/10-sub-pixel-rgb.conf
ln -s ../conf.avail/11-lcdfilter-default.conf
With these few tweaks, the un-patched version looks identical to the patched one for truetype Latin script.