diff options
author | David Coppa <dcoppa@cvs.openbsd.org> | 2016-08-09 07:16:11 +0000 |
---|---|---|
committer | David Coppa <dcoppa@cvs.openbsd.org> | 2016-08-09 07:16:11 +0000 |
commit | df68ad9cc2cfe45374f65d71a5965ea7d7a8166f (patch) | |
tree | 882ffd63ac03f32456a5ce3cbdb329602a060bd6 /lib/freetype/devel | |
parent | ff16b4ef5c3ab985ee96b2d65cd84a3bc254a9d7 (diff) |
Update to FreeType 2.6.5
ok matthieu@
Diffstat (limited to 'lib/freetype/devel')
-rw-r--r-- | lib/freetype/devel/ftoption.h | 62 |
1 files changed, 50 insertions, 12 deletions
diff --git a/lib/freetype/devel/ftoption.h b/lib/freetype/devel/ftoption.h index b354efdcd..d20df81ed 100644 --- a/lib/freetype/devel/ftoption.h +++ b/lib/freetype/devel/ftoption.h @@ -586,23 +586,53 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ /* Define TT_CONFIG_OPTION_SUBPIXEL_HINTING if you want to compile */ - /* EXPERIMENTAL subpixel hinting support into the TrueType driver. This */ - /* replaces the native TrueType hinting mechanism when anything but */ - /* FT_RENDER_MODE_MONO is requested. */ + /* subpixel hinting support into the TrueType driver. This modifies the */ + /* TrueType hinting mechanism when anything but FT_RENDER_MODE_MONO is */ + /* requested. */ /* */ - /* Enabling this causes the TrueType driver to ignore instructions under */ - /* certain conditions. This is done in accordance with the guide here, */ - /* with some minor differences: */ + /* In particular, it modifies the bytecode interpreter to interpret (or */ + /* not) instructions in a certain way so that all TrueType fonts look */ + /* like they do in a Windows ClearType (DirectWrite) environment. See */ + /* [1] for a technical overview on what this means. See `ttinterp.h' */ + /* for more details on the LEAN option. */ /* */ - /* http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */ + /* There are three options. */ /* */ - /* By undefining this, you only compile the code necessary to hint */ - /* TrueType glyphs with native TT hinting. */ + /* 1. This option is associated with the `Infinality' moniker. */ + /* Contributed by an individual nicknamed Infinality with the goal of */ + /* making TrueType fonts render better than on Windows. A high */ + /* amount of configurability and flexibility, down to rules for */ + /* single glyphs in fonts, but also very slow. Its experimental and */ + /* slow nature and the original developer losing interest meant that */ + /* this option was never enabled in default builds. */ /* */ - /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */ - /* defined. */ + /* 2. The new default mode for the TrueType driver. The Infinality code */ + /* base was stripped to the bare minimum and all configurability */ + /* removed in the name of speed and simplicity. The configurability */ + /* was mainly aimed at legacy fonts like Arial, Times New Roman, or */ + /* Courier. Legacy fonts are fonts that modify vertical stems to */ + /* achieve clean black-and-white bitmaps. The new mode focuses on */ + /* applying a minimal set of rules to all fonts indiscriminately so */ + /* that modern and web fonts render well while legacy fonts render */ + /* okay. */ /* */ -#define TT_CONFIG_OPTION_SUBPIXEL_HINTING + /* 3. Compile both. */ + /* */ + /* By undefining these, you get rendering behavior like on Windows */ + /* without ClearType, i.e., Windows XP without ClearType enabled and */ + /* Win9x (interpreter version v35). Or not, depending on how much */ + /* hinting blood and testing tears the font designer put into a given */ + /* font. If you define one or both subpixel hinting options, you can */ + /* switch between between v35 and the ones you define. */ + /* */ + /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */ + /* defined. */ + /* */ + /* [1] http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */ + /* */ +/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 1 */ +/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2 */ +#define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 ) /*************************************************************************/ @@ -811,6 +841,14 @@ FT_BEGIN_HEADER */ #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER #define TT_USE_BYTECODE_INTERPRETER + +#if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 1 +#define TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY +#endif + +#if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 2 +#define TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL +#endif #endif |