Comment 29 for bug 1722508

Revision history for this message
gldickens3 (gordon-dickens) wrote : Re: Font hinting appears broken on 17.10 beta

One of the primary differences in freetype-2.8 and prior Ubuntu versions of freetype is the introduction of TT_CONFIG_OPTION_SUBPIXEL_HINTING in /include/freetype/config/ftoption.h in freetype-2.7.X and later. The default value is:

#define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2

This needs to be undefined (uncommented) in order for freetype-2.7 and 2.8 to render fonts identically to prior versions of Ubuntu freetype (freetype-2.6.X and earlier).

The diff file (freetype_2.8-0.2ubuntu2.diff.gz) at https://launchpad.net/ubuntu/+source/freetype/2.8-0.2ubuntu2 enables FT_CONFIG_OPTION_SUBPIXEL_RENDERING in /include/freetype/config/ftoption.h with:

#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING

This properly enables subpixel rendering to render fonts identical to MS cleartype, however, if TT_CONFIG_OPTION_SUBPIXEL_HINTING is also set then the fonts are rendered differently than before. So, this problem is fixed simply by undefining TT_CONFIG_OPTION_SUBPIXEL_HINTING.