The BIG graph update
[rrdtool.git] / libraries / freetype-2.0.5 / include / freetype / config / ftoption.h
1 /***************************************************************************/
2 /*                                                                         */
3 /*  ftoption.h                                                             */
4 /*                                                                         */
5 /*    User-selectable configuration macros (specification only).           */
6 /*                                                                         */
7 /*  Copyright 1996-2001 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 __FTOPTION_H__
20 #define __FTOPTION_H__
21
22
23 #include <ft2build.h>
24
25
26 FT_BEGIN_HEADER
27
28
29   /*************************************************************************/
30   /*                                                                       */
31   /*                 USER-SELECTABLE CONFIGURATION MACROS                  */
32   /*                                                                       */
33   /* These macros can be toggled by developers to enable or disable        */
34   /* certain aspects of FreeType.  This is a default file, where all major */
35   /* options are enabled.                                                  */
36   /*                                                                       */
37   /* Note that if some modifications are required for your build, we       */
38   /* advise you to put a modified copy of this file in your build          */
39   /* directory, rather than modifying it in-place.                         */
40   /*                                                                       */
41   /* The build directory is normally `freetype/builds/<system>' and        */
42   /* contains build or system-specific files that are included in          */
43   /* priority when building the library.                                   */
44   /*                                                                       */
45   /*************************************************************************/
46
47
48   /*************************************************************************/
49   /*************************************************************************/
50   /****                                                                 ****/
51   /**** 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 ****/
52   /****                                                                 ****/
53   /*************************************************************************/
54   /*************************************************************************/
55
56
57   /*************************************************************************/
58   /*                                                                       */
59   /* Convenience functions support                                         */
60   /*                                                                       */
61   /*   Some functions of the FreeType 2 API are provided as a convenience  */
62   /*   for client applications and developers. However,  they are not      */
63   /*   required to build and run the library itself.                       */
64   /*                                                                       */
65   /*   By defining this configuration macro, you'll disable the            */
66   /*   compilation of these functions at build time.  This can be useful   */
67   /*   to reduce the library's code size when you don't need any of        */
68   /*   these functions.                                                    */
69   /*                                                                       */
70   /*   All convenience functions are declared as such in their             */
71   /*   documentation.                                                      */
72   /*                                                                       */
73 #undef FT_CONFIG_OPTION_NO_CONVENIENCE_FUNCS
74
75
76   /*************************************************************************/
77   /*                                                                       */
78   /* Module errors                                                         */
79   /*                                                                       */
80   /*   If this macro is set (which is _not_ the default), the higher byte  */
81   /*   of an error code gives the module in which the error has occurred,  */
82   /*   while the lower byte is the real error code.                        */
83   /*                                                                       */
84   /*   Setting this macro makes sense for debugging purposes only, since   */
85   /*   it would break source compatibility of certain programs that use    */
86   /*   FreeType 2.                                                         */
87   /*                                                                       */
88   /*   More details can be found in the files ftmoderr.h and fterrors.h.   */
89   /*                                                                       */
90 #undef  FT_CONFIG_OPTION_USE_MODULE_ERRORS
91
92
93   /*************************************************************************/
94   /*                                                                       */
95   /* Alternate Glyph Image Format support                                  */
96   /*                                                                       */
97   /*   By default, the glyph images returned by the FreeType glyph loader  */
98   /*   can either be a pixmap or a vectorial outline defined through       */
99   /*   Bezier control points.  When defining the following configuration   */
100   /*   macro, some font drivers will be able to register alternate         */
101   /*   glyph image formats.                                                */
102   /*                                                                       */
103   /*   Unset this macro if you are sure that you will never use a font     */
104   /*   driver with an alternate glyph format; this will reduce the size of */
105   /*   the base layer code.                                                */
106   /*                                                                       */
107   /*   Note that a few Type 1 fonts, as well as Windows `vector' fonts     */
108   /*   use a vector `plotter' format that isn't supported when this        */
109   /*   macro is undefined.                                                 */
110   /*                                                                       */
111 #define FT_CONFIG_OPTION_ALTERNATE_GLYPH_FORMATS
112
113
114   /*************************************************************************/
115   /*                                                                       */
116   /* Glyph Postscript Names handling                                       */
117   /*                                                                       */
118   /*   By default, FreeType 2 is compiled with the `PSNames' module.  This */
119   /*   This module is in charge of converting a glyph name string into a   */
120   /*   Unicode value, or return a Macintosh standard glyph name for the    */
121   /*   use with the TrueType `post' table.                                 */
122   /*                                                                       */
123   /*   Undefine this macro if you do not want `PSNames' compiled in your   */
124   /*   build of FreeType.  This has the following effects:                 */
125   /*                                                                       */
126   /*   - The TrueType driver will provide its own set of glyph names,      */
127   /*     if you build it to support postscript names in the TrueType       */
128   /*     `post' table.                                                     */
129   /*                                                                       */
130   /*   - The Type 1 driver will not be able to synthetize a Unicode        */
131   /*     charmap out of the glyphs found in the fonts.                     */
132   /*                                                                       */
133   /*   You would normally undefine this configuration macro when building  */
134   /*   a version of FreeType that doesn't contain a Type 1 or CFF driver.  */
135   /*                                                                       */
136 #define FT_CONFIG_OPTION_POSTSCRIPT_NAMES
137
138
139   /*************************************************************************/
140   /*                                                                       */
141   /* Postscript Names to Unicode Values support                            */
142   /*                                                                       */
143   /*   By default, FreeType 2 is built with the `PSNames' module compiled  */
144   /*   in.  Among other things, the module is used to convert a glyph name */
145   /*   into a Unicode value.  This is especially useful in order to        */
146   /*   synthetize on the fly a Unicode charmap from the CFF/Type 1 driver  */
147   /*   through a big table named the `Adobe Glyph List' (AGL).             */
148   /*                                                                       */
149   /*   Undefine this macro if you do not want the Adobe Glyph List         */
150   /*   compiled in your `PSNames' module.  The Type 1 driver will not be   */
151   /*   able to synthetize a Unicode charmap out of the glyphs found in the */
152   /*   fonts.                                                              */
153   /*                                                                       */
154 #define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
155
156
157   /*************************************************************************/
158   /*                                                                       */
159   /* Many compilers provide a non-ANSI 64-bit data type that can be used   */
160   /* by FreeType to speed up some computations.  However, this will create */
161   /* some problems when compiling the library in strict ANSI mode.         */
162   /*                                                                       */
163   /* For this reason, the use of 64-bit ints is normally disabled when     */
164   /* the __STDC__ macro is defined.  You can however disable this by       */
165   /* defining here the macro FT_CONFIG_OPTION_FORCE_INT64.                 */
166   /*                                                                       */
167   /* For most compilers, this will only create compilation warnings        */
168   /* when building the library.                                            */
169   /*                                                                       */
170   /* ObNote: The compiler-specific 64-bit integers are detected in the     */
171   /*         file "ftconfig.h" either statically, or through Autoconf      */
172   /*         on platforms that support it.                                 */
173   /*                                                                       */
174 #define  FT_CONFIG_OPTION_FORCE_INT64
175
176
177   /*************************************************************************/
178   /*                                                                       */
179   /* DLL export compilation                                                */
180   /*                                                                       */
181   /*   When compiling FreeType as a DLL, some systems/compilers need a     */
182   /*   special keyword in front OR after the return type of function       */
183   /*   declarations.                                                       */
184   /*                                                                       */
185   /*   Two macros are used within the FreeType source code to define       */
186   /*   exported library functions: FT_EXPORT and FT_EXPORT_DEF.            */
187   /*                                                                       */
188   /*     FT_EXPORT( return_type )                                          */
189   /*                                                                       */
190   /*       is used in a function declaration, as in                        */
191   /*                                                                       */
192   /*         FT_EXPORT( FT_Error )                                         */
193   /*         FT_Init_FreeType( FT_Library*  alibrary );                    */
194   /*                                                                       */
195   /*                                                                       */
196   /*     FT_EXPORT_DEF( return_type )                                      */
197   /*                                                                       */
198   /*       is used in a function definition, as in                         */
199   /*                                                                       */
200   /*         FT_EXPORT_DEF( FT_Error )                                     */
201   /*         FT_Init_FreeType( FT_Library*  alibrary )                     */
202   /*         {                                                             */
203   /*           ... some code ...                                           */
204   /*           return FT_Err_Ok;                                           */
205   /*         }                                                             */
206   /*                                                                       */
207   /*   You can provide your own implementation of FT_EXPORT and            */
208   /*   FT_EXPORT_DEF here if you want.  If you leave them undefined, they  */
209   /*   will be later automatically defined as `extern return_type' to      */
210   /*   allow normal compilation.                                           */
211   /*                                                                       */
212 #undef FT_EXPORT
213 #undef FT_EXPORT_DEF
214
215
216   /*************************************************************************/
217   /*                                                                       */
218   /* Debug level                                                           */
219   /*                                                                       */
220   /*   FreeType can be compiled in debug or trace mode.  In debug mode,    */
221   /*   errors are reported through the `ftdebug' component.  In trace      */
222   /*   mode, additional messages are sent to the standard output during    */
223   /*   execution.                                                          */
224   /*                                                                       */
225   /*   Define FT_DEBUG_LEVEL_ERROR to build the library in debug mode.     */
226   /*   Define FT_DEBUG_LEVEL_TRACE to build it in trace mode.              */
227   /*                                                                       */
228   /*   Don't define any of these macros to compile in `release' mode!      */
229   /*                                                                       */
230 /* #define  FT_DEBUG_LEVEL_ERROR */
231 /* #define  FT_DEBUG_LEVEL_TRACE */
232
233
234   /*************************************************************************/
235   /*                                                                       */
236   /* Computation Algorithms                                                */
237   /*                                                                       */
238   /*   Used for debugging, this configuration macro should disappear       */
239   /*   soon.                                                               */
240   /*                                                                       */
241 #undef  FT_CONFIG_OPTION_OLD_CALCS
242
243
244   /*************************************************************************/
245   /*                                                                       */
246   /* The size in bytes of the render pool used by the scan-line converter  */
247   /* to do all of its work.                                                */
248   /*                                                                       */
249   /* This must be greater than 4kByte.                                     */
250   /*                                                                       */
251 #define FT_RENDER_POOL_SIZE  32768L
252
253
254   /*************************************************************************/
255   /*                                                                       */
256   /* FT_MAX_MODULES                                                        */
257   /*                                                                       */
258   /*   The maximum number of modules that can be registered in a single    */
259   /*   FreeType library object.  16 is the default.                        */
260   /*                                                                       */
261 #define FT_MAX_MODULES  16
262
263
264   /*************************************************************************/
265   /*                                                                       */
266   /* FT_MAX_EXTENSIONS                                                     */
267   /*                                                                       */
268   /*   The maximum number of extensions that can be registered in a single */
269   /*   font driver.  8 is the default.                                     */
270   /*                                                                       */
271   /*   If you don't know what this means, you certainly do not need to     */
272   /*   change this value.                                                  */
273   /*                                                                       */
274 #define FT_MAX_EXTENSIONS  8
275
276
277   /*************************************************************************/
278   /*************************************************************************/
279   /****                                                                 ****/
280   /****        S F N T   D R I V E R    C O N F I G U R A T I O N       ****/
281   /****                                                                 ****/
282   /*************************************************************************/
283   /*************************************************************************/
284
285
286   /*************************************************************************/
287   /*                                                                       */
288   /* Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support       */
289   /* embedded bitmaps in all formats using the SFNT module (namely         */
290   /* TrueType & OpenType).                                                 */
291   /*                                                                       */
292 #define TT_CONFIG_OPTION_EMBEDDED_BITMAPS
293
294
295   /*************************************************************************/
296   /*                                                                       */
297   /* Define TT_CONFIG_OPTION_POSTSCRIPT_NAMES if you want to be able to    */
298   /* load and enumerate the glyph Postscript names in a TrueType or        */
299   /* OpenType file.                                                        */
300   /*                                                                       */
301   /* Note that when you do not compile the `PSNames' module by undefining  */
302   /* the above FT_CONFIG_OPTION_POSTSCRIPT_NAMES, the `sfnt' module will   */
303   /* contain additional code used to read the PS Names table from a font.  */
304   /*                                                                       */
305   /* (By default, the module uses `PSNames' to extract glyph names.)       */
306   /*                                                                       */
307 #define TT_CONFIG_OPTION_POSTSCRIPT_NAMES
308
309
310   /*************************************************************************/
311   /*                                                                       */
312   /* Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to       */
313   /* access the internal name table in a SFNT-based format like TrueType   */
314   /* or OpenType.  The name table contains various strings used to         */
315   /* describe the font, like family name, copyright, version, etc.  It     */
316   /* does not contain any glyph name though.                               */
317   /*                                                                       */
318   /* Accessing SFNT names is done through the functions declared in        */
319   /* `freetype/ftnames.h'.                                                 */
320   /*                                                                       */
321 #define TT_CONFIG_OPTION_SFNT_NAMES
322
323
324   /*************************************************************************/
325   /*************************************************************************/
326   /****                                                                 ****/
327   /****    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   ****/
328   /****                                                                 ****/
329   /*************************************************************************/
330   /*************************************************************************/
331
332   /*************************************************************************/
333   /*                                                                       */
334   /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile   */
335   /* a bytecode interpreter in the TrueType driver.  Note that there are   */
336   /* important patent issues related to the use of the interpreter.        */
337   /*                                                                       */
338   /* By undefining this, you will only compile the code necessary to load  */
339   /* TrueType glyphs without hinting.                                      */
340   /*                                                                       */
341 #undef  TT_CONFIG_OPTION_BYTECODE_INTERPRETER
342
343
344   /*************************************************************************/
345   /*                                                                       */
346   /* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType    */
347   /* bytecode interpreter with a huge switch statement, rather than a call */
348   /* table.  This results in smaller and faster code for a number of       */
349   /* architectures.                                                        */
350   /*                                                                       */
351   /* Note however that on some compiler/processor combinations, undefining */
352   /* this macro will generate faster, though larger, code.                 */
353   /*                                                                       */
354 #define TT_CONFIG_OPTION_INTERPRETER_SWITCH
355
356
357   /*************************************************************************/
358   /*************************************************************************/
359   /****                                                                 ****/
360   /****      T Y P E 1   D R I V E R    C O N F I G U R A T I O N       ****/
361   /****                                                                 ****/
362   /*************************************************************************/
363   /*************************************************************************/
364
365
366   /*************************************************************************/
367   /*                                                                       */
368   /* T1_MAX_DICT_DEPTH is the maximal depth of nest dictionaries and       */
369   /* arrays in the Type 1 stream (see t1load.c).  A minimum of 4 is        */
370   /* required.                                                             */
371   /*                                                                       */
372 #define T1_MAX_DICT_DEPTH  5
373
374
375   /*************************************************************************/
376   /*                                                                       */
377   /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine   */
378   /* calls during glyph loading.                                           */
379   /*                                                                       */
380 #define T1_MAX_SUBRS_CALLS  16
381
382
383   /*************************************************************************/
384   /*                                                                       */
385   /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity.  A     */
386   /* minimum of 16 is required.                                            */
387   /*                                                                       */
388   /* The Chinese font MingTiEG-Medium (CNS 11643 character set) needs 256. */
389   /*                                                                       */
390 #define T1_MAX_CHARSTRINGS_OPERANDS  256
391
392
393   /*************************************************************************/
394   /*                                                                       */
395   /* Define T1_CONFIG_OPTION_DISABLE_HINTER if you want to generate a      */
396   /* driver with no hinter.  This can be useful to debug the parser.       */
397   /*                                                                       */
398 #undef T1_CONFIG_OPTION_DISABLE_HINTER
399
400
401   /*************************************************************************/
402   /*                                                                       */
403   /* Define this configuration macro if you want to prevent the            */
404   /* compilation of `t1afm', which is in charge of reading Type 1 AFM      */
405   /* files into an existing face.  Note that if set, the T1 driver will be */
406   /* unable to produce kerning distances.                                  */
407   /*                                                                       */
408 #undef T1_CONFIG_OPTION_NO_AFM
409
410
411   /*************************************************************************/
412   /*                                                                       */
413   /* Define this configuration macro if you want to prevent the            */
414   /* compilation of the Multiple Masters font support in the Type 1        */
415   /* driver.                                                               */
416   /*                                                                       */
417 #undef T1_CONFIG_OPTION_NO_MM_SUPPORT
418
419
420 FT_END_HEADER
421
422
423 #endif /* __FTOPTION_H__ */
424
425
426 /* END */