Currently, two versions are available which represent the bytecode interpreter with and without subpixel hinting support, respectively. The default is subpixel support if TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined, and no subpixel support otherwise (since it isn't available then).
If subpixel hinting is on, many TrueType bytecode instructions behave differently compared to B/W or grayscale rendering. The main idea is to render at a much increased horizontal resolution, then sampling down the created output to subpixel precision. However, many older fonts are not suited to this and must be specially taken care of by applying (hardcoded) font-specific tweaks.
Details on subpixel hinting and some of the necessary tweaks can be found in Greg Hitchcock's whitepaper at ‘http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx’.
The following example code demonstrates how to activate subpixel hinting (omitting the error handling).
FT_Library library;
FT_Face face;
FT_UInt interpreter_version = TT_INTERPRETER_VERSION_38;
FT_Init_FreeType( &library );
FT_Property_Set( library, "truetype",
"interpreter-version",
&interpreter_version );
|