]> git.r.bdr.sh - rbdr/super-polarity/blob
07ae54d3d2831aedda08bcc908e82b12698540b5
[rbdr/super-polarity] /
1 /***************************************************************************/
2 /* */
3 /* ftcffdrv.h */
4 /* */
5 /* FreeType API for controlling the CFF driver (specification only). */
6 /* */
7 /* Copyright 2013 by */
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
9 /* */
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. */
15 /* */
16 /***************************************************************************/
17
18
19 #ifndef __FTCFFDRV_H__
20 #define __FTCFFDRV_H__
21
22 #include <ft2build.h>
23 #include FT_FREETYPE_H
24
25 #ifdef 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."
29 #endif
30
31
32 FT_BEGIN_HEADER
33
34
35 /**************************************************************************
36 *
37 * @section:
38 * cff_driver
39 *
40 * @title:
41 * The CFF driver
42 *
43 * @abstract:
44 * Controlling the CFF driver module.
45 *
46 * @description:
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.
51 *
52 * The CFF driver's module name is `cff'.
53 *
54 */
55
56
57 /**************************************************************************
58 *
59 * @property:
60 * hinting-engine
61 *
62 * @description:
63 * Thanks to Adobe, which contributed a new hinting (and parsing)
64 * engine, an application can select between `freetype' and `adobe'.
65 *
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.
69 *
70 * The following example code demonstrates how to select Adobe's hinting
71 * engine (omitting the error handling).
72 *
73 * {
74 * FT_Library library;
75 * FT_Face face;
76 * FT_UInt hinting_engine = FT_CFF_HINTING_ADOBE;
77 *
78 *
79 * FT_Init_FreeType( &library );
80 *
81 * FT_Property_Set( library, "cff",
82 * "hinting-engine", &hinting_engine );
83 * }
84 *
85 * @note:
86 * This property can be used with @FT_Property_Get also.
87 *
88 */
89
90
91 /**************************************************************************
92 *
93 * @enum:
94 * FT_CFF_HINTING_XXX
95 *
96 * @description:
97 * A list of constants used for the @hinting-engine property to select
98 * the hinting engine for CFF fonts.
99 *
100 * @values:
101 * FT_CFF_HINTING_FREETYPE ::
102 * Use the old FreeType hinting engine.
103 *
104 * FT_CFF_HINTING_ADOBE ::
105 * Use the hinting engine contributed by Adobe.
106 *
107 */
108 #define FT_CFF_HINTING_FREETYPE 0
109 #define FT_CFF_HINTING_ADOBE 1
110
111
112 /**************************************************************************
113 *
114 * @property:
115 * no-stem-darkening
116 *
117 * @description:
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.
121 *
122 * Note that stem darkening is never applied if @FT_LOAD_NO_SCALE is set.
123 *
124 * {
125 * FT_Library library;
126 * FT_Face face;
127 * FT_Bool no_stem_darkening = TRUE;
128 *
129 *
130 * FT_Init_FreeType( &library );
131 *
132 * FT_Property_Set( library, "cff",
133 * "no-stem-darkening", &no_stem_darkening );
134 * }
135 *
136 * @note:
137 * This property can be used with @FT_Property_Get also.
138 *
139 */
140
141
142 /* */
143
144 FT_END_HEADER
145
146
147 #endif /* __FTCFFDRV_H__ */
148
149
150 /* END */