Skip to content

Instantly share code, notes, and snippets.

@Earnestly
Last active March 17, 2022 08:04
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Earnestly/820873e37fb3a6d64879 to your computer and use it in GitHub Desktop.
Save Earnestly/820873e37fb3a6d64879 to your computer and use it in GitHub Desktop.
Better Defaults for Freetype

Better Defaults for Freetype

Introduction

Historically on Linux in order to get nicely rendered fonts one would need to resort to patches like Infinality, however this only applied to TrueType fonts.

In 2013 Adobe donated their CFF (Compact Font Format) rasterizer to the freetype project which greatly boosted quality of OpenType rendering. It was donated primarily for Adobe and Google’s epic Noto typeface.

Freetype has since made the CFF hinting engine default in version 2.4.12.

In contrast, while Infinality’s ClearType implementation has been part of freetype since mid 2012, it is not enabled by default due to patent concerns.

Configuration

I have provided what I consider a good base-line configuration for freetype via fontconfig. There is minimal opinion of which can be easily removed. The configuration is fairly well documented in the fonts-conf(5) manual.

Simply place the configuration in XDG_CONFIG_HOME/fontconfig/fonts.conf (~/.config/fontconfig/fonts.conf) and restart any software which loaded the freetype library.

(Some systems do not require restarts as they update freetype settings automatically such as GNOME via the gnome-settings-daemon or xsettingsd.)

The Infinality Ultimate Bundle

The Infinality Ultimate Bundle (not to be confused with Infinality itself) is a nice project which aims to create a curated and tuned collection of fonts for use on free OS' such as Linux. This is similar to what both Windows and OSX do for their users. Use this if you are not particularly interested in typefaces and simply want nice font rendering.

Additional Resources

@qguv
Copy link

qguv commented Mar 17, 2022

Thanks for this summary! A couple updates:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment