1 /***************************************************************************/
5 /* FreeType API for controlling the CFF driver (specification only). */
7 /* Copyright 2013 by */
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
10 /* This file is part of the FreeType project, and may only be used, */
11 /* modified, and distributed under the terms of the FreeType project */
12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
13 /* this file you indicate that you have read the license and */
14 /* understand and accept it fully. */
16 /***************************************************************************/
19 #ifndef __FTCFFDRV_H__
20 #define __FTCFFDRV_H__
23 #include FT_FREETYPE_H
26 #error "freetype.h of FreeType 1 has been loaded!"
27 #error "Please fix the directory search order for header files"
28 #error "so that freetype.h of FreeType 2 is found first."
35 /**************************************************************************
44 * Controlling the CFF driver module.
47 * While FreeType's CFF driver doesn't expose API functions by itself,
48 * it is possible to control its behaviour with @FT_Property_Set and
49 * @FT_Property_Get. The following lists the available properties
50 * together with the necessary macros and structures.
52 * The CFF driver's module name is `cff'.
57 /**************************************************************************
63 * Thanks to Adobe, which contributed a new hinting (and parsing)
64 * engine, an application can select between `freetype' and `adobe'.
66 * Right now, the default engine is `freetype'. However, this will
67 * change: After a certain time of intensive testing it is planned to
68 * make `adobe' the default due to its superior rendering results.
70 * The following example code demonstrates how to select Adobe's hinting
71 * engine (omitting the error handling).
76 * FT_UInt hinting_engine = FT_CFF_HINTING_ADOBE;
79 * FT_Init_FreeType( &library );
81 * FT_Property_Set( library, "cff",
82 * "hinting-engine", &hinting_engine );
86 * This property can be used with @FT_Property_Get also.
91 /**************************************************************************
97 * A list of constants used for the @hinting-engine property to select
98 * the hinting engine for CFF fonts.
101 * FT_CFF_HINTING_FREETYPE ::
102 * Use the old FreeType hinting engine.
104 * FT_CFF_HINTING_ADOBE ::
105 * Use the hinting engine contributed by Adobe.
108 #define FT_CFF_HINTING_FREETYPE 0
109 #define FT_CFF_HINTING_ADOBE 1
112 /**************************************************************************
118 * By default, the Adobe CFF engine darkens stems at smaller sizes,
119 * regardless of hinting, to enhance contrast. Setting this property,
120 * stem darkening gets switched off.
122 * Note that stem darkening is never applied if @FT_LOAD_NO_SCALE is set.
125 * FT_Library library;
127 * FT_Bool no_stem_darkening = TRUE;
130 * FT_Init_FreeType( &library );
132 * FT_Property_Set( library, "cff",
133 * "no-stem-darkening", &no_stem_darkening );
137 * This property can be used with @FT_Property_Get also.
147 #endif /* __FTCFFDRV_H__ */