ftoption.h 32.2 KB
Newer Older
1
2
3
4
/***************************************************************************/
/*                                                                         */
/*  ftoption.h                                                             */
/*                                                                         */
Werner Lemberg's avatar
   
Werner Lemberg committed
5
/*    User-selectable configuration macros (specification only).           */
6
/*                                                                         */
7
/*  Copyright 1996-2001, 2002, 2003 by                                     */
8
9
/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
/*                                                                         */
Werner Lemberg's avatar
   
Werner Lemberg committed
10
11
/*  This file is part of the FreeType project, and may only be used,       */
/*  modified, and distributed under the terms of the FreeType project      */
12
13
14
15
16
17
/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
/*  this file you indicate that you have read the license and              */
/*  understand and accept it fully.                                        */
/*                                                                         */
/***************************************************************************/

Werner Lemberg's avatar
   
Werner Lemberg committed
18

19
20
#ifndef __FTOPTION_H__
#define __FTOPTION_H__
David Turner's avatar
David Turner committed
21

Werner Lemberg's avatar
   
Werner Lemberg committed
22

23
24
25
26
#include <ft2build.h>


FT_BEGIN_HEADER
Werner Lemberg's avatar
   
Werner Lemberg committed
27

David Turner's avatar
David Turner committed
28
29
30
31
  /*************************************************************************/
  /*                                                                       */
  /*                 USER-SELECTABLE CONFIGURATION MACROS                  */
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
32
33
  /* This file contains the default configuration macro definitions for    */
  /* a standard build of the FreeType library.  There are three ways to    */
34
  /* use this file to build project-specific versions of the library:      */
35
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
36
37
38
  /*  - You can modify this file by hand, but this is not recommended in   */
  /*    cases where you would like to build several versions of the        */
  /*    library from a single source directory.                            */
39
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
40
  /*  - You can put a copy of this file in your build directory, more      */
41
  /*    precisely in "$BUILD/freetype/config/ftoption.h", where "$BUILD"   */
Werner Lemberg's avatar
   
Werner Lemberg committed
42
43
  /*    is the name of a directory that is included _before_ the FreeType  */
  /*    include path during compilation.                                   */
44
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
45
  /*    The default FreeType Makefiles and Jamfiles use the build          */
46
  /*    directory "builds/<system>" by default, but you can easily change  */
Werner Lemberg's avatar
   
Werner Lemberg committed
47
  /*    that for your own projects.                                        */
48
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
49
50
51
  /*  - Copy the file <ft2build.h> to "$BUILD/ft2build.h" and modify it    */
  /*    slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to       */
  /*    locate this file during the build.  For example,                   */
52
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
53
54
  /*      #define FT_CONFIG_OPTIONS_H  <myftoptions.h>                     */
  /*      #include <freetype/config/ftheader.h>                            */
55
56
57
58
  /*                                                                       */
  /*    will use "$BUILD/myftoptions.h" instead of this file for macro     */
  /*    definitions.                                                       */
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
59
60
61
62
  /*    Note also that you can similarly pre-define the macro              */
  /*    FT_CONFIG_MODULES_H used to locate the file listing of the modules */
  /*    that are statically linked to the library at compile time.  By     */
  /*    default, this file is <freetype/config/ftmodule.h>.                */
63
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
64
  /*  We highly recommend using the third method whenever possible.        */
David Turner's avatar
David Turner committed
65
66
67
  /*                                                                       */
  /*************************************************************************/

Werner Lemberg's avatar
   
Werner Lemberg committed
68

69
70
71
72
73
74
75
  /*************************************************************************/
  /*************************************************************************/
  /****                                                                 ****/
  /**** 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 ****/
  /****                                                                 ****/
  /*************************************************************************/
  /*************************************************************************/
David Turner's avatar
David Turner committed
76

Werner Lemberg's avatar
   
Werner Lemberg committed
77

Werner Lemberg's avatar
   
Werner Lemberg committed
78
79
  /*************************************************************************/
  /*                                                                       */
80
81
82
83
  /* Many compilers provide a non-ANSI 64-bit data type that can be used   */
  /* by FreeType to speed up some computations.  However, this will create */
  /* some problems when compiling the library in strict ANSI mode.         */
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
84
  /* For this reason, the use of 64-bit integers is normally disabled when */
85
  /* the __STDC__ macro is defined.  You can however disable this by       */
Werner Lemberg's avatar
   
Werner Lemberg committed
86
  /* defining the macro FT_CONFIG_OPTION_FORCE_INT64 here.                 */
Werner Lemberg's avatar
   
Werner Lemberg committed
87
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
88
89
  /* For most compilers, this will only create compilation warnings when   */
  /* building the library.                                                 */
Werner Lemberg's avatar
   
Werner Lemberg committed
90
  /*                                                                       */
91
  /* ObNote: The compiler-specific 64-bit integers are detected in the     */
Werner Lemberg's avatar
   
Werner Lemberg committed
92
93
  /*         file "ftconfig.h" either statically or through the            */
  /*         `configure' script on supported platforms.                    */
94
  /*                                                                       */
95
#undef  FT_CONFIG_OPTION_FORCE_INT64
Werner Lemberg's avatar
   
Werner Lemberg committed
96

97

David Turner's avatar
David Turner committed
98
99
  /*************************************************************************/
  /*                                                                       */
100
  /* Gzip-compressed file support.                                         */
David Turner's avatar
David Turner committed
101
  /*                                                                       */
102
  /*   FreeType now handles font files that have been compressed with the  */
Werner Lemberg's avatar
   
Werner Lemberg committed
103
104
  /*   'gzip' program.  This is mostly used to parse many of the PCF files */
  /*   that come with XFree86.  The implementation uses `zlib' to          */
105
  /*   partially uncompress the file on the fly (see src/base/ftgzip.c).   */
David Turner's avatar
David Turner committed
106
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
107
  /*   Define this macro if you want to enable this "feature".  Note that  */
108
109
  /*   this will however force you to link the zlib to any program that    */
  /*   also uses FreeType.                                                 */
David Turner's avatar
David Turner committed
110
  /*                                                                       */
111
#define FT_CONFIG_OPTION_USE_ZLIB
David Turner's avatar
David Turner committed
112

113
114
115
116
117
118
119

  /*************************************************************************/
  /*                                                                       */
  /* ZLib library selection                                                */
  /*                                                                       */
  /*   This macro is only used when FT_CONFIG_OPTION_USE_ZLIB is defined.  */
  /*   It allows FreeType's "ftgzip" component to link to the system's     */
Werner Lemberg's avatar
   
Werner Lemberg committed
120
  /*   installation of the ZLib library.  This is useful on systems like   */
121
122
123
  /*   Unix or VMS where it generally is already available.                */
  /*                                                                       */
  /*   If you let it undefined, the component will use its own copy        */
Werner Lemberg's avatar
   
Werner Lemberg committed
124
  /*   of the zlib sources instead.  These have been modified to be        */
125
  /*   included directly within the component and *not* export external    */
Werner Lemberg's avatar
   
Werner Lemberg committed
126
  /*   function names.  This allows you to link any program with FreeType  */
127
128
  /*   _and_ ZLib without linking conflicts.                               */
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
129
130
  /*   Do not #undef this macro here since the build system might define   */
  /*   it for certain configurations only.                                 */
131
132
133
134
  /*                                                                       */
/* #define  FT_CONFIG_OPTION_SYSTEM_ZLIB */


135
136
  /*************************************************************************/
  /*                                                                       */
137
  /* DLL export compilation                                                */
138
  /*                                                                       */
139
140
141
  /*   When compiling FreeType as a DLL, some systems/compilers need a     */
  /*   special keyword in front OR after the return type of function       */
  /*   declarations.                                                       */
142
  /*                                                                       */
143
144
  /*   Two macros are used within the FreeType source code to define       */
  /*   exported library functions: FT_EXPORT and FT_EXPORT_DEF.            */
145
  /*                                                                       */
146
  /*     FT_EXPORT( return_type )                                          */
147
  /*                                                                       */
148
  /*       is used in a function declaration, as in                        */
David Turner's avatar
David Turner committed
149
  /*                                                                       */
150
151
  /*         FT_EXPORT( FT_Error )                                         */
  /*         FT_Init_FreeType( FT_Library*  alibrary );                    */
David Turner's avatar
David Turner committed
152
153
  /*                                                                       */
  /*                                                                       */
154
155
156
157
158
159
160
161
162
163
  /*     FT_EXPORT_DEF( return_type )                                      */
  /*                                                                       */
  /*       is used in a function definition, as in                         */
  /*                                                                       */
  /*         FT_EXPORT_DEF( FT_Error )                                     */
  /*         FT_Init_FreeType( FT_Library*  alibrary )                     */
  /*         {                                                             */
  /*           ... some code ...                                           */
  /*           return FT_Err_Ok;                                           */
  /*         }                                                             */
David Turner's avatar
David Turner committed
164
  /*                                                                       */
165
166
167
168
  /*   You can provide your own implementation of FT_EXPORT and            */
  /*   FT_EXPORT_DEF here if you want.  If you leave them undefined, they  */
  /*   will be later automatically defined as `extern return_type' to      */
  /*   allow normal compilation.                                           */
169
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
170
171
172
  /*   Do not #undef these macros here since the build system might define */
  /*   them for certain configurations only.                               */
  /*                                                                       */
173
174
/* #define  FT_EXPORT(x)       extern x */
/* #define  FT_EXPORT_DEF(x)   x */
David Turner's avatar
David Turner committed
175

176

David Turner's avatar
David Turner committed
177
178
179
180
  /*************************************************************************/
  /*                                                                       */
  /* Glyph Postscript Names handling                                       */
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
181
  /*   By default, FreeType 2 is compiled with the `PSNames' module.  This */
Werner Lemberg's avatar
   
Werner Lemberg committed
182
  /*   module is in charge of converting a glyph name string into a        */
Werner Lemberg's avatar
   
Werner Lemberg committed
183
184
  /*   Unicode value, or return a Macintosh standard glyph name for the    */
  /*   use with the TrueType `post' table.                                 */
David Turner's avatar
David Turner committed
185
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
186
187
  /*   Undefine this macro if you do not want `PSNames' compiled in your   */
  /*   build of FreeType.  This has the following effects:                 */
David Turner's avatar
David Turner committed
188
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
189
  /*   - The TrueType driver will provide its own set of glyph names,      */
David Turner's avatar
David Turner committed
190
  /*     if you build it to support postscript names in the TrueType       */
Werner Lemberg's avatar
   
Werner Lemberg committed
191
  /*     `post' table.                                                     */
David Turner's avatar
David Turner committed
192
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
193
194
  /*   - The Type 1 driver will not be able to synthetize a Unicode        */
  /*     charmap out of the glyphs found in the fonts.                     */
David Turner's avatar
David Turner committed
195
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
196
197
  /*   You would normally undefine this configuration macro when building  */
  /*   a version of FreeType that doesn't contain a Type 1 or CFF driver.  */
David Turner's avatar
David Turner committed
198
199
200
  /*                                                                       */
#define FT_CONFIG_OPTION_POSTSCRIPT_NAMES

201

David Turner's avatar
David Turner committed
202
203
204
205
  /*************************************************************************/
  /*                                                                       */
  /* Postscript Names to Unicode Values support                            */
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
206
207
208
  /*   By default, FreeType 2 is built with the `PSNames' module compiled  */
  /*   in.  Among other things, the module is used to convert a glyph name */
  /*   into a Unicode value.  This is especially useful in order to        */
David Turner's avatar
David Turner committed
209
  /*   synthetize on the fly a Unicode charmap from the CFF/Type 1 driver  */
Werner Lemberg's avatar
   
Werner Lemberg committed
210
  /*   through a big table named the `Adobe Glyph List' (AGL).             */
David Turner's avatar
David Turner committed
211
212
  /*                                                                       */
  /*   Undefine this macro if you do not want the Adobe Glyph List         */
Werner Lemberg's avatar
   
Werner Lemberg committed
213
214
215
  /*   compiled in your `PSNames' module.  The Type 1 driver will not be   */
  /*   able to synthetize a Unicode charmap out of the glyphs found in the */
  /*   fonts.                                                              */
David Turner's avatar
David Turner committed
216
217
218
  /*                                                                       */
#define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST

219

Werner Lemberg's avatar
   
Werner Lemberg committed
220
221
222
223
224
225
226
227
228
229
230
231
232
  /*************************************************************************/
  /*                                                                       */
  /* Support for Mac fonts                                                 */
  /*                                                                       */
  /*   Define this macro if you want support for outline fonts in Mac      */
  /*   format (mac dfont, mac resource, macbinary containing a mac         */
  /*   resource) on non-Mac platforms.                                     */
  /*                                                                       */
  /*   Note that the `FOND' resource isn't checked.                        */
  /*                                                                       */
#define FT_CONFIG_OPTION_MAC_FONTS


233
234
235
236
237
238
239
  /*************************************************************************/
  /*                                                                       */
  /* Allow the use of FT_Incremental_Interface to load typefaces that      */
  /* contain no glyph data, but supply it via a callback function.         */
  /* This allows FreeType to be used with the PostScript language, using   */
  /* the GhostScript interpreter.                                          */
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
240
/* #define FT_CONFIG_OPTION_INCREMENTAL */
241
242


David Turner's avatar
David Turner committed
243
244
  /*************************************************************************/
  /*                                                                       */
245
246
  /* The size in bytes of the render pool used by the scan-line converter  */
  /* to do all of its work.                                                */
David Turner's avatar
David Turner committed
247
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
248
  /* This must be greater than 4KByte.                                     */
David Turner's avatar
David Turner committed
249
  /*                                                                       */
250
251
252
253
#define FT_RENDER_POOL_SIZE  16384L


  /*************************************************************************/
254
  /*                                                                       */
255
  /* FT_MAX_MODULES                                                        */
256
  /*                                                                       */
257
258
  /*   The maximum number of modules that can be registered in a single    */
  /*   FreeType library object.  32 is the default.                        */
David Turner's avatar
David Turner committed
259
  /*                                                                       */
260
261
#define FT_MAX_MODULES  32

David Turner's avatar
David Turner committed
262
263
264
265
266
267
268
269
270
271
272
273
274

  /*************************************************************************/
  /*                                                                       */
  /* Debug level                                                           */
  /*                                                                       */
  /*   FreeType can be compiled in debug or trace mode.  In debug mode,    */
  /*   errors are reported through the `ftdebug' component.  In trace      */
  /*   mode, additional messages are sent to the standard output during    */
  /*   execution.                                                          */
  /*                                                                       */
  /*   Define FT_DEBUG_LEVEL_ERROR to build the library in debug mode.     */
  /*   Define FT_DEBUG_LEVEL_TRACE to build it in trace mode.              */
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
275
  /*   Don't define any of these macros to compile in `release' mode!      */
David Turner's avatar
David Turner committed
276
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
277
278
279
280
281
  /*   Do not #undef these macros here since the build system might define */
  /*   them for certain configurations only.                               */
  /*                                                                       */
/* #define FT_DEBUG_LEVEL_ERROR */
/* #define FT_DEBUG_LEVEL_TRACE */
Werner Lemberg's avatar
   
Werner Lemberg committed
282

David Turner's avatar
David Turner committed
283

284
285
286
287
288
289
  /*************************************************************************/
  /*                                                                       */
  /* Memory Debugging                                                      */
  /*                                                                       */
  /*   FreeType now comes with an integrated memory debugger that is       */
  /*   capable of detecting simple errors like memory leaks or double      */
Werner Lemberg's avatar
   
Werner Lemberg committed
290
291
  /*   deletes.  To compile it within your build of the library, you       */
  /*   should define FT_DEBUG_MEMORY here.                                 */
292
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
293
  /*   Note that the memory debugger is only activated at runtime when     */
Werner Lemberg's avatar
   
Werner Lemberg committed
294
  /*   when the _environment_ variable "FT2_DEBUG_MEMORY" is defined also! */
295
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
296
297
298
299
  /*   Do not #undef this macro here since the build system might define   */
  /*   it for certain configurations only.                                 */
  /*                                                                       */
/* #define FT_DEBUG_MEMORY */
Werner Lemberg's avatar
   
Werner Lemberg committed
300

301

David Turner's avatar
David Turner committed
302
303
  /*************************************************************************/
  /*                                                                       */
304
  /* Module errors                                                         */
David Turner's avatar
David Turner committed
305
  /*                                                                       */
306
307
308
  /*   If this macro is set (which is _not_ the default), the higher byte  */
  /*   of an error code gives the module in which the error has occurred,  */
  /*   while the lower byte is the real error code.                        */
David Turner's avatar
David Turner committed
309
  /*                                                                       */
310
311
312
  /*   Setting this macro makes sense for debugging purposes only, since   */
  /*   it would break source compatibility of certain programs that use    */
  /*   FreeType 2.                                                         */
David Turner's avatar
David Turner committed
313
  /*                                                                       */
314
  /*   More details can be found in the files ftmoderr.h and fterrors.h.   */
David Turner's avatar
David Turner committed
315
  /*                                                                       */
316
317
#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS

David Turner's avatar
David Turner committed
318
319


320
321
322
323
324
325
326
327
  /*************************************************************************/
  /*************************************************************************/
  /****                                                                 ****/
  /****        S F N T   D R I V E R    C O N F I G U R A T I O N       ****/
  /****                                                                 ****/
  /*************************************************************************/
  /*************************************************************************/

Werner Lemberg's avatar
   
Werner Lemberg committed
328

329
330
331
332
333
334
  /*************************************************************************/
  /*                                                                       */
  /* Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support       */
  /* embedded bitmaps in all formats using the SFNT module (namely         */
  /* TrueType & OpenType).                                                 */
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
335
#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS
336
337
338
339
340
341
342
343


  /*************************************************************************/
  /*                                                                       */
  /* Define TT_CONFIG_OPTION_POSTSCRIPT_NAMES if you want to be able to    */
  /* load and enumerate the glyph Postscript names in a TrueType or        */
  /* OpenType file.                                                        */
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
344
345
  /* Note that when you do not compile the `PSNames' module by undefining  */
  /* the above FT_CONFIG_OPTION_POSTSCRIPT_NAMES, the `sfnt' module will   */
346
347
  /* contain additional code used to read the PS Names table from a font.  */
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
348
  /* (By default, the module uses `PSNames' to extract glyph names.)       */
349
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
350
#define TT_CONFIG_OPTION_POSTSCRIPT_NAMES
351
352


353
354
355
356
  /*************************************************************************/
  /*                                                                       */
  /* Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to       */
  /* access the internal name table in a SFNT-based format like TrueType   */
Werner Lemberg's avatar
   
Werner Lemberg committed
357
358
359
  /* or OpenType.  The name table contains various strings used to         */
  /* describe the font, like family name, copyright, version, etc.  It     */
  /* does not contain any glyph name though.                               */
360
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
361
362
  /* Accessing SFNT names is done through the functions declared in        */
  /* `freetype/ftnames.h'.                                                 */
363
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
364
365
#define TT_CONFIG_OPTION_SFNT_NAMES

366

Werner Lemberg's avatar
   
Werner Lemberg committed
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
  /*************************************************************************/
  /*                                                                       */
  /* TrueType CMap support                                                 */
  /*                                                                       */
  /*   Here you can fine-tune which TrueType CMap table format shall be    */
  /*   supported.                                                          */
#define TT_CONFIG_CMAP_FORMAT_0
#define TT_CONFIG_CMAP_FORMAT_2
#define TT_CONFIG_CMAP_FORMAT_4
#define TT_CONFIG_CMAP_FORMAT_6
#define TT_CONFIG_CMAP_FORMAT_8
#define TT_CONFIG_CMAP_FORMAT_10
#define TT_CONFIG_CMAP_FORMAT_12


382
383
384
385
386
387
388
389
390
391
392
  /*************************************************************************/
  /*************************************************************************/
  /****                                                                 ****/
  /****    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   ****/
  /****                                                                 ****/
  /*************************************************************************/
  /*************************************************************************/

  /*************************************************************************/
  /*                                                                       */
  /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile   */
Werner Lemberg's avatar
   
Werner Lemberg committed
393
  /* a bytecode interpreter in the TrueType driver.  Note that there are   */
394
395
  /* important patent issues related to the use of the interpreter.        */
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
396
397
  /* By undefining this, you will only compile the code necessary to load  */
  /* TrueType glyphs without hinting.                                      */
398
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
399
400
  /*   Do not #undef this macro here, since the build system might         */
  /*   define it for certain configurations only.                          */
401
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
402
#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
Werner Lemberg's avatar
   
Werner Lemberg committed
403

404

405
406
  /*************************************************************************/
  /*                                                                       */
407
  /* Define TT_CONFIG_OPTION_UNPATENTED_HINTING (in addition to            */
Werner Lemberg's avatar
   
Werner Lemberg committed
408
  /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER) to compile the unpatented      */
409
410
411
412
  /* work-around hinting system.  Note that for the moment, the algorithm  */
  /* is only used when selected at runtime through the parameter tag       */
  /* FT_PARAM_TAG_UNPATENTED_HINTING; or when the debug hook               */
  /* FT_DEBUG_HOOK_UNPATENTED_HINTING is globally actived                  */
413
  /*                                                                       */
414
#define TT_CONFIG_OPTION_UNPATENTED_HINTING
415
416


417
418
419
  /*************************************************************************/
  /*                                                                       */
  /* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType    */
Werner Lemberg's avatar
   
Werner Lemberg committed
420
421
  /* bytecode interpreter with a huge switch statement, rather than a call */
  /* table.  This results in smaller and faster code for a number of       */
422
423
424
  /* architectures.                                                        */
  /*                                                                       */
  /* Note however that on some compiler/processor combinations, undefining */
Werner Lemberg's avatar
   
Werner Lemberg committed
425
  /* this macro will generate faster, though larger, code.                 */
426
427
428
429
  /*                                                                       */
#define TT_CONFIG_OPTION_INTERPRETER_SWITCH


Werner Lemberg's avatar
   
Werner Lemberg committed
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
  /*************************************************************************/
  /*                                                                       */
  /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the        */
  /* TrueType glyph loader to use Apple's definition of how to handle      */
  /* component offsets in composite glyphs.                                */
  /*                                                                       */
  /* Apple and MS disagree on the default behavior of component offsets    */
  /* in composites.  Apple says that they should be scaled by the scale    */
  /* factors in the transformation matrix (roughly, it's more complex)     */
  /* while MS says they should not.  OpenType defines two bits in the      */
  /* composite flags array which can be used to disambiguate, but old      */
  /* fonts will not have them.                                             */
  /*                                                                       */
  /*   http://partners.adobe.com/asn/developer/opentype/glyf.html          */
  /*   http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html                 */
  /*                                                                       */
#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED


449
450
451
452
453
454
455
456
  /*************************************************************************/
  /*************************************************************************/
  /****                                                                 ****/
  /****      T Y P E 1   D R I V E R    C O N F I G U R A T I O N       ****/
  /****                                                                 ****/
  /*************************************************************************/
  /*************************************************************************/

Werner Lemberg's avatar
   
Werner Lemberg committed
457
458
459
460
461
462
463
464
465

  /*************************************************************************/
  /*                                                                       */
  /* T1_MAX_DICT_DEPTH is the maximal depth of nest dictionaries and       */
  /* arrays in the Type 1 stream (see t1load.c).  A minimum of 4 is        */
  /* required.                                                             */
  /*                                                                       */
#define T1_MAX_DICT_DEPTH  5

466

Werner Lemberg's avatar
   
Werner Lemberg committed
467
468
469
470
471
  /*************************************************************************/
  /*                                                                       */
  /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine   */
  /* calls during glyph loading.                                           */
  /*                                                                       */
472
#define T1_MAX_SUBRS_CALLS  16
Werner Lemberg's avatar
   
Werner Lemberg committed
473

Werner Lemberg's avatar
   
Werner Lemberg committed
474

Werner Lemberg's avatar
   
Werner Lemberg committed
475
476
  /*************************************************************************/
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
477
478
  /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity.  A     */
  /* minimum of 16 is required.                                            */
Werner Lemberg's avatar
   
Werner Lemberg committed
479
  /*                                                                       */
Werner Lemberg's avatar
   
Werner Lemberg committed
480
481
482
  /* The Chinese font MingTiEG-Medium (CNS 11643 character set) needs 256. */
  /*                                                                       */
#define T1_MAX_CHARSTRINGS_OPERANDS  256
483

Werner Lemberg's avatar
   
Werner Lemberg committed
484

Werner Lemberg's avatar
   
Werner Lemberg committed
485
486
487
488
489
490
491
492
493
  /*************************************************************************/
  /*                                                                       */
  /* Define this configuration macro if you want to prevent the            */
  /* compilation of `t1afm', which is in charge of reading Type 1 AFM      */
  /* files into an existing face.  Note that if set, the T1 driver will be */
  /* unable to produce kerning distances.                                  */
  /*                                                                       */
#undef T1_CONFIG_OPTION_NO_AFM

Werner Lemberg's avatar
   
Werner Lemberg committed
494

Werner Lemberg's avatar
   
Werner Lemberg committed
495
496
497
498
499
500
501
502
  /*************************************************************************/
  /*                                                                       */
  /* Define this configuration macro if you want to prevent the            */
  /* compilation of the Multiple Masters font support in the Type 1        */
  /* driver.                                                               */
  /*                                                                       */
#undef T1_CONFIG_OPTION_NO_MM_SUPPORT

503
 /* */
504

505
/*
Werner Lemberg's avatar
   
Werner Lemberg committed
506
507
508
509
 * The FT_CONFIG_OPTION_CHESTER_XXXX macros are used to toggle some recent
 * improvements to the auto-hinter contributed by David Chester.  They will
 * most likely disappear completely in the next release.  For now, you
 * should always keep them defined.
510
511
 *
 */
David Turner's avatar
David Turner committed
512
#define  FT_CONFIG_OPTION_CHESTER_HINTS
513
514
515

#ifdef   FT_CONFIG_OPTION_CHESTER_HINTS

Werner Lemberg's avatar
   
Werner Lemberg committed
516
517
518
519
520
#define  FT_CONFIG_CHESTER_SMALL_F
#define  FT_CONFIG_CHESTER_ASCENDER
#define  FT_CONFIG_CHESTER_SERIF
#define  FT_CONFIG_CHESTER_STEM
#define  FT_CONFIG_CHESTER_BLUE_SCALE
521
522
523

#endif /* FT_CONFIG_OPTION_CHESTER_HINTS */

524
FT_END_HEADER
Werner Lemberg's avatar
   
Werner Lemberg committed
525
526


527
#endif /* __FTOPTION_H__ */
Werner Lemberg's avatar
   
Werner Lemberg committed
528
529
530


/* END */