1 /***************************************************************************/
5 /* User-selectable configuration macros (specification only). */
7 /* Copyright 1996-2000 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 /***************************************************************************/
23 /*************************************************************************/
25 /* USER-SELECTABLE CONFIGURATION MACROS */
27 /* These macros can be toggled by developers to enable or disable */
28 /* certain aspects of FreeType. This is a default file, where all major */
29 /* options are enabled. */
31 /* Note that if some modifications are required for your build, we */
32 /* advise you to put a modified copy of this file in your build */
33 /* directory, rather than modifying it in-place. */
35 /* The build directory is normally `freetype/builds/<system>' and */
36 /* contains build or system-specific files that are included in */
37 /* priority when building the library. */
39 /*************************************************************************/
42 /*************************************************************************/
43 /*************************************************************************/
45 /**** G E N E R A L F R E E T Y P E 2 C O N F I G U R A T I O N ****/
47 /*************************************************************************/
48 /*************************************************************************/
51 /*************************************************************************/
53 /* Convenience functions support */
55 /* Some functions of the FreeType 2 API are provided as a convenience */
56 /* for client applications and developers. However, they are not */
57 /* required to build and run the library itself. */
59 /* By defining this configuration macro, you'll disable the */
60 /* compilation of these functions at build time. This can be useful */
61 /* to reduce the library's code size when you don't need any of */
62 /* these functions. */
64 /* All convenience functions are declared as such in their */
67 #undef FT_CONFIG_OPTION_NO_CONVENIENCE_FUNCS
70 /*************************************************************************/
72 /* Alternate Glyph Image Format support */
74 /* By default, the glyph images returned by the FreeType glyph loader */
75 /* can either be a pixmap or a vectorial outline defined through */
76 /* Bezier control points. When defining the following configuration */
77 /* macro, some font drivers will be able to register alternate */
78 /* glyph image formats. */
80 /* Unset this macro if you are sure that you will never use a font */
81 /* driver with an alternate glyph format; this will reduce the size of */
82 /* the base layer code. */
84 /* Note that a few Type 1 fonts, as well as Windows `vector' fonts */
85 /* use a vector `plotter' format that isn't supported when this */
86 /* macro is undefined. */
88 #define FT_CONFIG_OPTION_ALTERNATE_GLYPH_FORMATS
91 /*************************************************************************/
93 /* Glyph Postscript Names handling */
95 /* By default, FreeType 2 is compiled with the `PSNames' module. This */
96 /* This module is in charge of converting a glyph name string into a */
97 /* Unicode value, or return a Macintosh standard glyph name for the */
98 /* use with the TrueType `post' table. */
100 /* Undefine this macro if you do not want `PSNames' compiled in your */
101 /* build of FreeType. This has the following effects: */
103 /* - The TrueType driver will provide its own set of glyph names, */
104 /* if you build it to support postscript names in the TrueType */
107 /* - The Type 1 driver will not be able to synthetize a Unicode */
108 /* charmap out of the glyphs found in the fonts. */
110 /* You would normally undefine this configuration macro when building */
111 /* a version of FreeType that doesn't contain a Type 1 or CFF driver. */
113 #define FT_CONFIG_OPTION_POSTSCRIPT_NAMES
116 /*************************************************************************/
118 /* Postscript Names to Unicode Values support */
120 /* By default, FreeType 2 is built with the `PSNames' module compiled */
121 /* in. Among other things, the module is used to convert a glyph name */
122 /* into a Unicode value. This is especially useful in order to */
123 /* synthetize on the fly a Unicode charmap from the CFF/Type 1 driver */
124 /* through a big table named the `Adobe Glyph List' (AGL). */
126 /* Undefine this macro if you do not want the Adobe Glyph List */
127 /* compiled in your `PSNames' module. The Type 1 driver will not be */
128 /* able to synthetize a Unicode charmap out of the glyphs found in the */
131 #define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
134 /*************************************************************************/
136 /* Many compilers provide the non-ANSI `long long' 64-bit type. You can */
137 /* activate it by defining the FTCALC_USE_LONG_LONG macro. Note that */
138 /* this will produce many -ansi warnings during library compilation, and */
139 /* that in many cases the generated code will not be smaller or faster! */
141 #undef FTCALC_USE_LONG_LONG
144 /*************************************************************************/
146 /* DLL export compilation */
148 /* When compiling FreeType as a DLL, some systems/compilers need a */
149 /* special keyword in front OR after the return type of function */
152 /* Two macros are used within the FreeType source code to define */
153 /* exported library functions: FT_EXPORT_DEF and FT_EXPORT_FUNC. */
155 /* FT_EXPORT_DEF( return_type ) */
157 /* is used in a function declaration, as in */
159 /* FT_EXPORT_DEF( FT_Error ) */
160 /* FT_Init_FreeType( FT_Library* alibrary ); */
163 /* FT_EXPORT_FUNC( return_type ) */
165 /* is used in a function definition, as in */
167 /* FT_EXPORT_FUNC( FT_Error ) */
168 /* FT_Init_FreeType( FT_Library* alibrary ) */
170 /* ... some code ... */
171 /* return FT_Err_Ok; */
174 /* You can provide your own implementation of FT_EXPORT_DEF and */
175 /* FT_EXPORT_FUNC here if you want. If you leave them undefined, they */
176 /* will be later automatically defined as `extern return_type' to */
177 /* allow normal compilation. */
180 #undef FT_EXPORT_FUNC
183 /*************************************************************************/
187 /* FreeType can be compiled in debug or trace mode. In debug mode, */
188 /* errors are reported through the `ftdebug' component. In trace */
189 /* mode, additional messages are sent to the standard output during */
192 /* Define FT_DEBUG_LEVEL_ERROR to build the library in debug mode. */
193 /* Define FT_DEBUG_LEVEL_TRACE to build it in trace mode. */
195 /* Don't define any of these macros to compile in `release' mode! */
197 #define FT_DEBUG_LEVEL_ERROR
198 #define FT_DEBUG_LEVEL_TRACE
201 /*************************************************************************/
203 /* Computation Algorithms */
205 /* Used for debugging, this configuration macro should disappear */
208 #define FT_CONFIG_OPTION_OLD_CALCS
211 /*************************************************************************/
213 /* The size in bytes of the render pool used by the scan-line converter */
214 /* to do all of its work. */
216 /* This must be greater than 4kByte. */
218 #define FT_RENDER_POOL_SIZE 16384
221 /*************************************************************************/
225 /* The maximum number of modules that can be registered in a single */
226 /* FreeType library object. 16 is the default. */
228 #define FT_MAX_MODULES 16
231 /*************************************************************************/
233 /* FT_MAX_EXTENSIONS */
235 /* The maximum number of extensions that can be registered in a single */
236 /* font driver. 8 is the default. */
238 /* If you don't know what this means, you certainly do not need to */
239 /* change this value. */
241 #define FT_MAX_EXTENSIONS 8
244 /*************************************************************************/
245 /*************************************************************************/
247 /**** S F N T D R I V E R C O N F I G U R A T I O N ****/
249 /*************************************************************************/
250 /*************************************************************************/
253 /*************************************************************************/
255 /* Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support */
256 /* embedded bitmaps in all formats using the SFNT module (namely */
257 /* TrueType & OpenType). */
259 #define TT_CONFIG_OPTION_EMBEDDED_BITMAPS
262 /*************************************************************************/
264 /* Define TT_CONFIG_OPTION_POSTSCRIPT_NAMES if you want to be able to */
265 /* load and enumerate the glyph Postscript names in a TrueType or */
268 /* Note that when you do not compile the `PSNames' module by undefining */
269 /* the above FT_CONFIG_OPTION_POSTSCRIPT_NAMES, the `sfnt' module will */
270 /* contain additional code used to read the PS Names table from a font. */
272 /* (By default, the module uses `PSNames' to extract glyph names.) */
274 #define TT_CONFIG_OPTION_POSTSCRIPT_NAMES
277 /*************************************************************************/
279 /* Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to */
280 /* access the internal name table in a SFNT-based format like TrueType */
281 /* or OpenType. The name table contains various strings used to */
282 /* describe the font, like family name, copyright, version, etc. It */
283 /* does not contain any glyph name though. */
285 /* Accessing SFNT names is done through the functions declared in */
286 /* `freetype/ftnames.h'. */
288 #define TT_CONFIG_OPTION_SFNT_NAMES
291 /*************************************************************************/
292 /*************************************************************************/
294 /**** T R U E T Y P E D R I V E R C O N F I G U R A T I O N ****/
296 /*************************************************************************/
297 /*************************************************************************/
299 /*************************************************************************/
301 /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile */
302 /* a bytecode interpreter in the TrueType driver. Note that there are */
303 /* important patent issues related to the use of the interpreter. */
305 /* By undefining this, you will only compile the code necessary to load */
306 /* TrueType glyphs without hinting. */
308 #undef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
311 /*************************************************************************/
313 /* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType */
314 /* bytecode interpreter with a huge switch statement, rather than a call */
315 /* table. This results in smaller and faster code for a number of */
318 /* Note however that on some compiler/processor combinations, undefining */
319 /* this macro will generate faster, though larger, code. */
321 #define TT_CONFIG_OPTION_INTERPRETER_SWITCH
324 /*************************************************************************/
325 /*************************************************************************/
327 /**** T Y P E 1 D R I V E R C O N F I G U R A T I O N ****/
329 /*************************************************************************/
330 /*************************************************************************/
333 /*************************************************************************/
335 /* T1_MAX_STACK_DEPTH is the maximal depth of the token stack used by */
336 /* the Type 1 parser (see t1load.c). A minimum of 16 is required. */
338 #define T1_MAX_STACK_DEPTH 16
341 /*************************************************************************/
343 /* T1_MAX_DICT_DEPTH is the maximal depth of nest dictionaries and */
344 /* arrays in the Type 1 stream (see t1load.c). A minimum of 4 is */
347 #define T1_MAX_DICT_DEPTH 5
350 /*************************************************************************/
352 /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine */
353 /* calls during glyph loading. */
355 #define T1_MAX_SUBRS_CALLS 8
358 /*************************************************************************/
360 /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity. */
362 #define T1_MAX_CHARSTRINGS_OPERANDS 32
365 /*************************************************************************/
367 /* Define T1_CONFIG_OPTION_DISABLE_HINTER if you want to generate a */
368 /* driver with no hinter. This can be useful to debug the parser. */
370 #undef T1_CONFIG_OPTION_DISABLE_HINTER
373 /*************************************************************************/
375 /* Define this configuration macro if you want to prevent the */
376 /* compilation of `t1afm', which is in charge of reading Type 1 AFM */
377 /* files into an existing face. Note that if set, the T1 driver will be */
378 /* unable to produce kerning distances. */
380 #undef T1_CONFIG_OPTION_NO_AFM
383 /*************************************************************************/
385 /* Define this configuration macro if you want to prevent the */
386 /* compilation of the Multiple Masters font support in the Type 1 */
389 #undef T1_CONFIG_OPTION_NO_MM_SUPPORT
392 #endif /* FTOPTION_H */