vrshoot

annotate libs/ft2static/freetype/config/ftoption.h @ 0:b2f14e535253

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 01 Feb 2014 19:58:19 +0200
parents
children
rev   line source
nuclear@0 1 /***************************************************************************/
nuclear@0 2 /* */
nuclear@0 3 /* ftoption.h */
nuclear@0 4 /* */
nuclear@0 5 /* User-selectable configuration macros (specification only). */
nuclear@0 6 /* */
nuclear@0 7 /* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
nuclear@0 8 /* 2010 by */
nuclear@0 9 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
nuclear@0 10 /* */
nuclear@0 11 /* This file is part of the FreeType project, and may only be used, */
nuclear@0 12 /* modified, and distributed under the terms of the FreeType project */
nuclear@0 13 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
nuclear@0 14 /* this file you indicate that you have read the license and */
nuclear@0 15 /* understand and accept it fully. */
nuclear@0 16 /* */
nuclear@0 17 /***************************************************************************/
nuclear@0 18
nuclear@0 19
nuclear@0 20 #ifndef __FTOPTION_H__
nuclear@0 21 #define __FTOPTION_H__
nuclear@0 22
nuclear@0 23
nuclear@0 24 #include <ft2build.h>
nuclear@0 25
nuclear@0 26
nuclear@0 27 FT_BEGIN_HEADER
nuclear@0 28
nuclear@0 29 /*************************************************************************/
nuclear@0 30 /* */
nuclear@0 31 /* USER-SELECTABLE CONFIGURATION MACROS */
nuclear@0 32 /* */
nuclear@0 33 /* This file contains the default configuration macro definitions for */
nuclear@0 34 /* a standard build of the FreeType library. There are three ways to */
nuclear@0 35 /* use this file to build project-specific versions of the library: */
nuclear@0 36 /* */
nuclear@0 37 /* - You can modify this file by hand, but this is not recommended in */
nuclear@0 38 /* cases where you would like to build several versions of the */
nuclear@0 39 /* library from a single source directory. */
nuclear@0 40 /* */
nuclear@0 41 /* - You can put a copy of this file in your build directory, more */
nuclear@0 42 /* precisely in `$BUILD/freetype/config/ftoption.h', where `$BUILD' */
nuclear@0 43 /* is the name of a directory that is included _before_ the FreeType */
nuclear@0 44 /* include path during compilation. */
nuclear@0 45 /* */
nuclear@0 46 /* The default FreeType Makefiles and Jamfiles use the build */
nuclear@0 47 /* directory `builds/<system>' by default, but you can easily change */
nuclear@0 48 /* that for your own projects. */
nuclear@0 49 /* */
nuclear@0 50 /* - Copy the file <ft2build.h> to `$BUILD/ft2build.h' and modify it */
nuclear@0 51 /* slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to */
nuclear@0 52 /* locate this file during the build. For example, */
nuclear@0 53 /* */
nuclear@0 54 /* #define FT_CONFIG_OPTIONS_H <myftoptions.h> */
nuclear@0 55 /* #include <freetype/config/ftheader.h> */
nuclear@0 56 /* */
nuclear@0 57 /* will use `$BUILD/myftoptions.h' instead of this file for macro */
nuclear@0 58 /* definitions. */
nuclear@0 59 /* */
nuclear@0 60 /* Note also that you can similarly pre-define the macro */
nuclear@0 61 /* FT_CONFIG_MODULES_H used to locate the file listing of the modules */
nuclear@0 62 /* that are statically linked to the library at compile time. By */
nuclear@0 63 /* default, this file is <freetype/config/ftmodule.h>. */
nuclear@0 64 /* */
nuclear@0 65 /* We highly recommend using the third method whenever possible. */
nuclear@0 66 /* */
nuclear@0 67 /*************************************************************************/
nuclear@0 68
nuclear@0 69
nuclear@0 70 /*************************************************************************/
nuclear@0 71 /*************************************************************************/
nuclear@0 72 /**** ****/
nuclear@0 73 /**** 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 ****/
nuclear@0 74 /**** ****/
nuclear@0 75 /*************************************************************************/
nuclear@0 76 /*************************************************************************/
nuclear@0 77
nuclear@0 78
nuclear@0 79 /*************************************************************************/
nuclear@0 80 /* */
nuclear@0 81 /* Uncomment the line below if you want to activate sub-pixel rendering */
nuclear@0 82 /* (a.k.a. LCD rendering, or ClearType) in this build of the library. */
nuclear@0 83 /* */
nuclear@0 84 /* Note that this feature is covered by several Microsoft patents */
nuclear@0 85 /* and should not be activated in any default build of the library. */
nuclear@0 86 /* */
nuclear@0 87 /* This macro has no impact on the FreeType API, only on its */
nuclear@0 88 /* _implementation_. For example, using FT_RENDER_MODE_LCD when calling */
nuclear@0 89 /* FT_Render_Glyph still generates a bitmap that is 3 times wider than */
nuclear@0 90 /* the original size in case this macro isn't defined; however, each */
nuclear@0 91 /* triplet of subpixels has R=G=B. */
nuclear@0 92 /* */
nuclear@0 93 /* This is done to allow FreeType clients to run unmodified, forcing */
nuclear@0 94 /* them to display normal gray-level anti-aliased glyphs. */
nuclear@0 95 /* */
nuclear@0 96 /* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
nuclear@0 97
nuclear@0 98
nuclear@0 99 /*************************************************************************/
nuclear@0 100 /* */
nuclear@0 101 /* Many compilers provide a non-ANSI 64-bit data type that can be used */
nuclear@0 102 /* by FreeType to speed up some computations. However, this will create */
nuclear@0 103 /* some problems when compiling the library in strict ANSI mode. */
nuclear@0 104 /* */
nuclear@0 105 /* For this reason, the use of 64-bit integers is normally disabled when */
nuclear@0 106 /* the __STDC__ macro is defined. You can however disable this by */
nuclear@0 107 /* defining the macro FT_CONFIG_OPTION_FORCE_INT64 here. */
nuclear@0 108 /* */
nuclear@0 109 /* For most compilers, this will only create compilation warnings when */
nuclear@0 110 /* building the library. */
nuclear@0 111 /* */
nuclear@0 112 /* ObNote: The compiler-specific 64-bit integers are detected in the */
nuclear@0 113 /* file `ftconfig.h' either statically or through the */
nuclear@0 114 /* `configure' script on supported platforms. */
nuclear@0 115 /* */
nuclear@0 116 #undef FT_CONFIG_OPTION_FORCE_INT64
nuclear@0 117
nuclear@0 118
nuclear@0 119 /*************************************************************************/
nuclear@0 120 /* */
nuclear@0 121 /* If this macro is defined, do not try to use an assembler version of */
nuclear@0 122 /* performance-critical functions (e.g. FT_MulFix). You should only do */
nuclear@0 123 /* that to verify that the assembler function works properly, or to */
nuclear@0 124 /* execute benchmark tests of the various implementations. */
nuclear@0 125 /* #define FT_CONFIG_OPTION_NO_ASSEMBLER */
nuclear@0 126
nuclear@0 127
nuclear@0 128 /*************************************************************************/
nuclear@0 129 /* */
nuclear@0 130 /* If this macro is defined, try to use an inlined assembler version of */
nuclear@0 131 /* the `FT_MulFix' function, which is a `hotspot' when loading and */
nuclear@0 132 /* hinting glyphs, and which should be executed as fast as possible. */
nuclear@0 133 /* */
nuclear@0 134 /* Note that if your compiler or CPU is not supported, this will default */
nuclear@0 135 /* to the standard and portable implementation found in `ftcalc.c'. */
nuclear@0 136 /* */
nuclear@0 137 #define FT_CONFIG_OPTION_INLINE_MULFIX
nuclear@0 138
nuclear@0 139
nuclear@0 140 /*************************************************************************/
nuclear@0 141 /* */
nuclear@0 142 /* LZW-compressed file support. */
nuclear@0 143 /* */
nuclear@0 144 /* FreeType now handles font files that have been compressed with the */
nuclear@0 145 /* `compress' program. This is mostly used to parse many of the PCF */
nuclear@0 146 /* files that come with various X11 distributions. The implementation */
nuclear@0 147 /* uses NetBSD's `zopen' to partially uncompress the file on the fly */
nuclear@0 148 /* (see src/lzw/ftgzip.c). */
nuclear@0 149 /* */
nuclear@0 150 /* Define this macro if you want to enable this `feature'. */
nuclear@0 151 /* */
nuclear@0 152 #define FT_CONFIG_OPTION_USE_LZW
nuclear@0 153
nuclear@0 154
nuclear@0 155 /*************************************************************************/
nuclear@0 156 /* */
nuclear@0 157 /* Gzip-compressed file support. */
nuclear@0 158 /* */
nuclear@0 159 /* FreeType now handles font files that have been compressed with the */
nuclear@0 160 /* `gzip' program. This is mostly used to parse many of the PCF files */
nuclear@0 161 /* that come with XFree86. The implementation uses `zlib' to */
nuclear@0 162 /* partially uncompress the file on the fly (see src/gzip/ftgzip.c). */
nuclear@0 163 /* */
nuclear@0 164 /* Define this macro if you want to enable this `feature'. See also */
nuclear@0 165 /* the macro FT_CONFIG_OPTION_SYSTEM_ZLIB below. */
nuclear@0 166 /* */
nuclear@0 167 #define FT_CONFIG_OPTION_USE_ZLIB
nuclear@0 168
nuclear@0 169
nuclear@0 170 /*************************************************************************/
nuclear@0 171 /* */
nuclear@0 172 /* ZLib library selection */
nuclear@0 173 /* */
nuclear@0 174 /* This macro is only used when FT_CONFIG_OPTION_USE_ZLIB is defined. */
nuclear@0 175 /* It allows FreeType's `ftgzip' component to link to the system's */
nuclear@0 176 /* installation of the ZLib library. This is useful on systems like */
nuclear@0 177 /* Unix or VMS where it generally is already available. */
nuclear@0 178 /* */
nuclear@0 179 /* If you let it undefined, the component will use its own copy */
nuclear@0 180 /* of the zlib sources instead. These have been modified to be */
nuclear@0 181 /* included directly within the component and *not* export external */
nuclear@0 182 /* function names. This allows you to link any program with FreeType */
nuclear@0 183 /* _and_ ZLib without linking conflicts. */
nuclear@0 184 /* */
nuclear@0 185 /* Do not #undef this macro here since the build system might define */
nuclear@0 186 /* it for certain configurations only. */
nuclear@0 187 /* */
nuclear@0 188 /* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */
nuclear@0 189
nuclear@0 190
nuclear@0 191 /*************************************************************************/
nuclear@0 192 /* */
nuclear@0 193 /* DLL export compilation */
nuclear@0 194 /* */
nuclear@0 195 /* When compiling FreeType as a DLL, some systems/compilers need a */
nuclear@0 196 /* special keyword in front OR after the return type of function */
nuclear@0 197 /* declarations. */
nuclear@0 198 /* */
nuclear@0 199 /* Two macros are used within the FreeType source code to define */
nuclear@0 200 /* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */
nuclear@0 201 /* */
nuclear@0 202 /* FT_EXPORT( return_type ) */
nuclear@0 203 /* */
nuclear@0 204 /* is used in a function declaration, as in */
nuclear@0 205 /* */
nuclear@0 206 /* FT_EXPORT( FT_Error ) */
nuclear@0 207 /* FT_Init_FreeType( FT_Library* alibrary ); */
nuclear@0 208 /* */
nuclear@0 209 /* */
nuclear@0 210 /* FT_EXPORT_DEF( return_type ) */
nuclear@0 211 /* */
nuclear@0 212 /* is used in a function definition, as in */
nuclear@0 213 /* */
nuclear@0 214 /* FT_EXPORT_DEF( FT_Error ) */
nuclear@0 215 /* FT_Init_FreeType( FT_Library* alibrary ) */
nuclear@0 216 /* { */
nuclear@0 217 /* ... some code ... */
nuclear@0 218 /* return FT_Err_Ok; */
nuclear@0 219 /* } */
nuclear@0 220 /* */
nuclear@0 221 /* You can provide your own implementation of FT_EXPORT and */
nuclear@0 222 /* FT_EXPORT_DEF here if you want. If you leave them undefined, they */
nuclear@0 223 /* will be later automatically defined as `extern return_type' to */
nuclear@0 224 /* allow normal compilation. */
nuclear@0 225 /* */
nuclear@0 226 /* Do not #undef these macros here since the build system might define */
nuclear@0 227 /* them for certain configurations only. */
nuclear@0 228 /* */
nuclear@0 229 /* #define FT_EXPORT(x) extern x */
nuclear@0 230 /* #define FT_EXPORT_DEF(x) x */
nuclear@0 231
nuclear@0 232
nuclear@0 233 /*************************************************************************/
nuclear@0 234 /* */
nuclear@0 235 /* Glyph Postscript Names handling */
nuclear@0 236 /* */
nuclear@0 237 /* By default, FreeType 2 is compiled with the `psnames' module. This */
nuclear@0 238 /* module is in charge of converting a glyph name string into a */
nuclear@0 239 /* Unicode value, or return a Macintosh standard glyph name for the */
nuclear@0 240 /* use with the TrueType `post' table. */
nuclear@0 241 /* */
nuclear@0 242 /* Undefine this macro if you do not want `psnames' compiled in your */
nuclear@0 243 /* build of FreeType. This has the following effects: */
nuclear@0 244 /* */
nuclear@0 245 /* - The TrueType driver will provide its own set of glyph names, */
nuclear@0 246 /* if you build it to support postscript names in the TrueType */
nuclear@0 247 /* `post' table. */
nuclear@0 248 /* */
nuclear@0 249 /* - The Type 1 driver will not be able to synthesize a Unicode */
nuclear@0 250 /* charmap out of the glyphs found in the fonts. */
nuclear@0 251 /* */
nuclear@0 252 /* You would normally undefine this configuration macro when building */
nuclear@0 253 /* a version of FreeType that doesn't contain a Type 1 or CFF driver. */
nuclear@0 254 /* */
nuclear@0 255 #define FT_CONFIG_OPTION_POSTSCRIPT_NAMES
nuclear@0 256
nuclear@0 257
nuclear@0 258 /*************************************************************************/
nuclear@0 259 /* */
nuclear@0 260 /* Postscript Names to Unicode Values support */
nuclear@0 261 /* */
nuclear@0 262 /* By default, FreeType 2 is built with the `PSNames' module compiled */
nuclear@0 263 /* in. Among other things, the module is used to convert a glyph name */
nuclear@0 264 /* into a Unicode value. This is especially useful in order to */
nuclear@0 265 /* synthesize on the fly a Unicode charmap from the CFF/Type 1 driver */
nuclear@0 266 /* through a big table named the `Adobe Glyph List' (AGL). */
nuclear@0 267 /* */
nuclear@0 268 /* Undefine this macro if you do not want the Adobe Glyph List */
nuclear@0 269 /* compiled in your `PSNames' module. The Type 1 driver will not be */
nuclear@0 270 /* able to synthesize a Unicode charmap out of the glyphs found in the */
nuclear@0 271 /* fonts. */
nuclear@0 272 /* */
nuclear@0 273 #define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
nuclear@0 274
nuclear@0 275
nuclear@0 276 /*************************************************************************/
nuclear@0 277 /* */
nuclear@0 278 /* Support for Mac fonts */
nuclear@0 279 /* */
nuclear@0 280 /* Define this macro if you want support for outline fonts in Mac */
nuclear@0 281 /* format (mac dfont, mac resource, macbinary containing a mac */
nuclear@0 282 /* resource) on non-Mac platforms. */
nuclear@0 283 /* */
nuclear@0 284 /* Note that the `FOND' resource isn't checked. */
nuclear@0 285 /* */
nuclear@0 286 #define FT_CONFIG_OPTION_MAC_FONTS
nuclear@0 287
nuclear@0 288
nuclear@0 289 /*************************************************************************/
nuclear@0 290 /* */
nuclear@0 291 /* Guessing methods to access embedded resource forks */
nuclear@0 292 /* */
nuclear@0 293 /* Enable extra Mac fonts support on non-Mac platforms (e.g. */
nuclear@0 294 /* GNU/Linux). */
nuclear@0 295 /* */
nuclear@0 296 /* Resource forks which include fonts data are stored sometimes in */
nuclear@0 297 /* locations which users or developers don't expected. In some cases, */
nuclear@0 298 /* resource forks start with some offset from the head of a file. In */
nuclear@0 299 /* other cases, the actual resource fork is stored in file different */
nuclear@0 300 /* from what the user specifies. If this option is activated, */
nuclear@0 301 /* FreeType tries to guess whether such offsets or different file */
nuclear@0 302 /* names must be used. */
nuclear@0 303 /* */
nuclear@0 304 /* Note that normal, direct access of resource forks is controlled via */
nuclear@0 305 /* the FT_CONFIG_OPTION_MAC_FONTS option. */
nuclear@0 306 /* */
nuclear@0 307 #ifdef FT_CONFIG_OPTION_MAC_FONTS
nuclear@0 308 #define FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK
nuclear@0 309 #endif
nuclear@0 310
nuclear@0 311
nuclear@0 312 /*************************************************************************/
nuclear@0 313 /* */
nuclear@0 314 /* Allow the use of FT_Incremental_Interface to load typefaces that */
nuclear@0 315 /* contain no glyph data, but supply it via a callback function. */
nuclear@0 316 /* This is required by clients supporting document formats which */
nuclear@0 317 /* supply font data incrementally as the document is parsed, such */
nuclear@0 318 /* as the Ghostscript interpreter for the PostScript language. */
nuclear@0 319 /* */
nuclear@0 320 #define FT_CONFIG_OPTION_INCREMENTAL
nuclear@0 321
nuclear@0 322
nuclear@0 323 /*************************************************************************/
nuclear@0 324 /* */
nuclear@0 325 /* The size in bytes of the render pool used by the scan-line converter */
nuclear@0 326 /* to do all of its work. */
nuclear@0 327 /* */
nuclear@0 328 /* This must be greater than 4KByte if you use FreeType to rasterize */
nuclear@0 329 /* glyphs; otherwise, you may set it to zero to avoid unnecessary */
nuclear@0 330 /* allocation of the render pool. */
nuclear@0 331 /* */
nuclear@0 332 #define FT_RENDER_POOL_SIZE 16384L
nuclear@0 333
nuclear@0 334
nuclear@0 335 /*************************************************************************/
nuclear@0 336 /* */
nuclear@0 337 /* FT_MAX_MODULES */
nuclear@0 338 /* */
nuclear@0 339 /* The maximum number of modules that can be registered in a single */
nuclear@0 340 /* FreeType library object. 32 is the default. */
nuclear@0 341 /* */
nuclear@0 342 #define FT_MAX_MODULES 32
nuclear@0 343
nuclear@0 344
nuclear@0 345 /*************************************************************************/
nuclear@0 346 /* */
nuclear@0 347 /* Debug level */
nuclear@0 348 /* */
nuclear@0 349 /* FreeType can be compiled in debug or trace mode. In debug mode, */
nuclear@0 350 /* errors are reported through the `ftdebug' component. In trace */
nuclear@0 351 /* mode, additional messages are sent to the standard output during */
nuclear@0 352 /* execution. */
nuclear@0 353 /* */
nuclear@0 354 /* Define FT_DEBUG_LEVEL_ERROR to build the library in debug mode. */
nuclear@0 355 /* Define FT_DEBUG_LEVEL_TRACE to build it in trace mode. */
nuclear@0 356 /* */
nuclear@0 357 /* Don't define any of these macros to compile in `release' mode! */
nuclear@0 358 /* */
nuclear@0 359 /* Do not #undef these macros here since the build system might define */
nuclear@0 360 /* them for certain configurations only. */
nuclear@0 361 /* */
nuclear@0 362 /* #define FT_DEBUG_LEVEL_ERROR */
nuclear@0 363 /* #define FT_DEBUG_LEVEL_TRACE */
nuclear@0 364
nuclear@0 365
nuclear@0 366 /*************************************************************************/
nuclear@0 367 /* */
nuclear@0 368 /* Memory Debugging */
nuclear@0 369 /* */
nuclear@0 370 /* FreeType now comes with an integrated memory debugger that is */
nuclear@0 371 /* capable of detecting simple errors like memory leaks or double */
nuclear@0 372 /* deletes. To compile it within your build of the library, you */
nuclear@0 373 /* should define FT_DEBUG_MEMORY here. */
nuclear@0 374 /* */
nuclear@0 375 /* Note that the memory debugger is only activated at runtime when */
nuclear@0 376 /* when the _environment_ variable `FT2_DEBUG_MEMORY' is defined also! */
nuclear@0 377 /* */
nuclear@0 378 /* Do not #undef this macro here since the build system might define */
nuclear@0 379 /* it for certain configurations only. */
nuclear@0 380 /* */
nuclear@0 381 /* #define FT_DEBUG_MEMORY */
nuclear@0 382
nuclear@0 383
nuclear@0 384 /*************************************************************************/
nuclear@0 385 /* */
nuclear@0 386 /* Module errors */
nuclear@0 387 /* */
nuclear@0 388 /* If this macro is set (which is _not_ the default), the higher byte */
nuclear@0 389 /* of an error code gives the module in which the error has occurred, */
nuclear@0 390 /* while the lower byte is the real error code. */
nuclear@0 391 /* */
nuclear@0 392 /* Setting this macro makes sense for debugging purposes only, since */
nuclear@0 393 /* it would break source compatibility of certain programs that use */
nuclear@0 394 /* FreeType 2. */
nuclear@0 395 /* */
nuclear@0 396 /* More details can be found in the files ftmoderr.h and fterrors.h. */
nuclear@0 397 /* */
nuclear@0 398 #undef FT_CONFIG_OPTION_USE_MODULE_ERRORS
nuclear@0 399
nuclear@0 400
nuclear@0 401 /*************************************************************************/
nuclear@0 402 /* */
nuclear@0 403 /* Position Independent Code */
nuclear@0 404 /* */
nuclear@0 405 /* If this macro is set (which is _not_ the default), FreeType2 will */
nuclear@0 406 /* avoid creating constants that require address fixups. Instead the */
nuclear@0 407 /* constants will be moved into a struct and additional intialization */
nuclear@0 408 /* code will be used. */
nuclear@0 409 /* */
nuclear@0 410 /* Setting this macro is needed for systems that prohibit address */
nuclear@0 411 /* fixups, such as BREW. */
nuclear@0 412 /* */
nuclear@0 413 /* #define FT_CONFIG_OPTION_PIC */
nuclear@0 414
nuclear@0 415
nuclear@0 416 /*************************************************************************/
nuclear@0 417 /*************************************************************************/
nuclear@0 418 /**** ****/
nuclear@0 419 /**** S F N T D R I V E R C O N F I G U R A T I O N ****/
nuclear@0 420 /**** ****/
nuclear@0 421 /*************************************************************************/
nuclear@0 422 /*************************************************************************/
nuclear@0 423
nuclear@0 424
nuclear@0 425 /*************************************************************************/
nuclear@0 426 /* */
nuclear@0 427 /* Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support */
nuclear@0 428 /* embedded bitmaps in all formats using the SFNT module (namely */
nuclear@0 429 /* TrueType & OpenType). */
nuclear@0 430 /* */
nuclear@0 431 #define TT_CONFIG_OPTION_EMBEDDED_BITMAPS
nuclear@0 432
nuclear@0 433
nuclear@0 434 /*************************************************************************/
nuclear@0 435 /* */
nuclear@0 436 /* Define TT_CONFIG_OPTION_POSTSCRIPT_NAMES if you want to be able to */
nuclear@0 437 /* load and enumerate the glyph Postscript names in a TrueType or */
nuclear@0 438 /* OpenType file. */
nuclear@0 439 /* */
nuclear@0 440 /* Note that when you do not compile the `PSNames' module by undefining */
nuclear@0 441 /* the above FT_CONFIG_OPTION_POSTSCRIPT_NAMES, the `sfnt' module will */
nuclear@0 442 /* contain additional code used to read the PS Names table from a font. */
nuclear@0 443 /* */
nuclear@0 444 /* (By default, the module uses `PSNames' to extract glyph names.) */
nuclear@0 445 /* */
nuclear@0 446 #define TT_CONFIG_OPTION_POSTSCRIPT_NAMES
nuclear@0 447
nuclear@0 448
nuclear@0 449 /*************************************************************************/
nuclear@0 450 /* */
nuclear@0 451 /* Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to */
nuclear@0 452 /* access the internal name table in a SFNT-based format like TrueType */
nuclear@0 453 /* or OpenType. The name table contains various strings used to */
nuclear@0 454 /* describe the font, like family name, copyright, version, etc. It */
nuclear@0 455 /* does not contain any glyph name though. */
nuclear@0 456 /* */
nuclear@0 457 /* Accessing SFNT names is done through the functions declared in */
nuclear@0 458 /* `freetype/ftsnames.h'. */
nuclear@0 459 /* */
nuclear@0 460 #define TT_CONFIG_OPTION_SFNT_NAMES
nuclear@0 461
nuclear@0 462
nuclear@0 463 /*************************************************************************/
nuclear@0 464 /* */
nuclear@0 465 /* TrueType CMap support */
nuclear@0 466 /* */
nuclear@0 467 /* Here you can fine-tune which TrueType CMap table format shall be */
nuclear@0 468 /* supported. */
nuclear@0 469 #define TT_CONFIG_CMAP_FORMAT_0
nuclear@0 470 #define TT_CONFIG_CMAP_FORMAT_2
nuclear@0 471 #define TT_CONFIG_CMAP_FORMAT_4
nuclear@0 472 #define TT_CONFIG_CMAP_FORMAT_6
nuclear@0 473 #define TT_CONFIG_CMAP_FORMAT_8
nuclear@0 474 #define TT_CONFIG_CMAP_FORMAT_10
nuclear@0 475 #define TT_CONFIG_CMAP_FORMAT_12
nuclear@0 476 #define TT_CONFIG_CMAP_FORMAT_13
nuclear@0 477 #define TT_CONFIG_CMAP_FORMAT_14
nuclear@0 478
nuclear@0 479
nuclear@0 480 /*************************************************************************/
nuclear@0 481 /*************************************************************************/
nuclear@0 482 /**** ****/
nuclear@0 483 /**** 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 ****/
nuclear@0 484 /**** ****/
nuclear@0 485 /*************************************************************************/
nuclear@0 486 /*************************************************************************/
nuclear@0 487
nuclear@0 488 /*************************************************************************/
nuclear@0 489 /* */
nuclear@0 490 /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile */
nuclear@0 491 /* a bytecode interpreter in the TrueType driver. */
nuclear@0 492 /* */
nuclear@0 493 /* By undefining this, you will only compile the code necessary to load */
nuclear@0 494 /* TrueType glyphs without hinting. */
nuclear@0 495 /* */
nuclear@0 496 /* Do not #undef this macro here, since the build system might */
nuclear@0 497 /* define it for certain configurations only. */
nuclear@0 498 /* */
nuclear@0 499 #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
nuclear@0 500
nuclear@0 501
nuclear@0 502 /*************************************************************************/
nuclear@0 503 /* */
nuclear@0 504 /* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */
nuclear@0 505 /* of the TrueType bytecode interpreter is used that doesn't implement */
nuclear@0 506 /* any of the patented opcodes and algorithms. The patents related to */
nuclear@0 507 /* TrueType hinting have expired worldwide since May 2010; this option */
nuclear@0 508 /* is now deprecated. */
nuclear@0 509 /* */
nuclear@0 510 /* Note that the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* */
nuclear@0 511 /* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, */
nuclear@0 512 /* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */
nuclear@0 513 /* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time. */
nuclear@0 514 /* */
nuclear@0 515 /* This macro is only useful for a small number of font files (mostly */
nuclear@0 516 /* for Asian scripts) that require bytecode interpretation to properly */
nuclear@0 517 /* load glyphs. For all other fonts, this produces unpleasant results, */
nuclear@0 518 /* thus the unpatented interpreter is never used to load glyphs from */
nuclear@0 519 /* TrueType fonts unless one of the following two options is used. */
nuclear@0 520 /* */
nuclear@0 521 /* - The unpatented interpreter is explicitly activated by the user */
nuclear@0 522 /* through the FT_PARAM_TAG_UNPATENTED_HINTING parameter tag */
nuclear@0 523 /* when opening the FT_Face. */
nuclear@0 524 /* */
nuclear@0 525 /* - FreeType detects that the FT_Face corresponds to one of the */
nuclear@0 526 /* `trick' fonts (e.g., `Mingliu') it knows about. The font engine */
nuclear@0 527 /* contains a hard-coded list of font names and other matching */
nuclear@0 528 /* parameters (see function `tt_face_init' in file */
nuclear@0 529 /* `src/truetype/ttobjs.c'). */
nuclear@0 530 /* */
nuclear@0 531 /* Here a sample code snippet for using FT_PARAM_TAG_UNPATENTED_HINTING. */
nuclear@0 532 /* */
nuclear@0 533 /* { */
nuclear@0 534 /* FT_Parameter parameter; */
nuclear@0 535 /* FT_Open_Args open_args; */
nuclear@0 536 /* */
nuclear@0 537 /* */
nuclear@0 538 /* parameter.tag = FT_PARAM_TAG_UNPATENTED_HINTING; */
nuclear@0 539 /* */
nuclear@0 540 /* open_args.flags = FT_OPEN_PATHNAME | FT_OPEN_PARAMS; */
nuclear@0 541 /* open_args.pathname = my_font_pathname; */
nuclear@0 542 /* open_args.num_params = 1; */
nuclear@0 543 /* open_args.params = &parameter; */
nuclear@0 544 /* */
nuclear@0 545 /* error = FT_Open_Face( library, &open_args, index, &face ); */
nuclear@0 546 /* ... */
nuclear@0 547 /* } */
nuclear@0 548 /* */
nuclear@0 549 /* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */
nuclear@0 550
nuclear@0 551
nuclear@0 552 /*************************************************************************/
nuclear@0 553 /* */
nuclear@0 554 /* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType */
nuclear@0 555 /* bytecode interpreter with a huge switch statement, rather than a call */
nuclear@0 556 /* table. This results in smaller and faster code for a number of */
nuclear@0 557 /* architectures. */
nuclear@0 558 /* */
nuclear@0 559 /* Note however that on some compiler/processor combinations, undefining */
nuclear@0 560 /* this macro will generate faster, though larger, code. */
nuclear@0 561 /* */
nuclear@0 562 #define TT_CONFIG_OPTION_INTERPRETER_SWITCH
nuclear@0 563
nuclear@0 564
nuclear@0 565 /*************************************************************************/
nuclear@0 566 /* */
nuclear@0 567 /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the */
nuclear@0 568 /* TrueType glyph loader to use Apple's definition of how to handle */
nuclear@0 569 /* component offsets in composite glyphs. */
nuclear@0 570 /* */
nuclear@0 571 /* Apple and MS disagree on the default behavior of component offsets */
nuclear@0 572 /* in composites. Apple says that they should be scaled by the scaling */
nuclear@0 573 /* factors in the transformation matrix (roughly, it's more complex) */
nuclear@0 574 /* while MS says they should not. OpenType defines two bits in the */
nuclear@0 575 /* composite flags array which can be used to disambiguate, but old */
nuclear@0 576 /* fonts will not have them. */
nuclear@0 577 /* */
nuclear@0 578 /* http://partners.adobe.com/asn/developer/opentype/glyf.html */
nuclear@0 579 /* http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html */
nuclear@0 580 /* */
nuclear@0 581 #undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
nuclear@0 582
nuclear@0 583
nuclear@0 584 /*************************************************************************/
nuclear@0 585 /* */
nuclear@0 586 /* Define TT_CONFIG_OPTION_GX_VAR_SUPPORT if you want to include */
nuclear@0 587 /* support for Apple's distortable font technology (fvar, gvar, cvar, */
nuclear@0 588 /* and avar tables). This has many similarities to Type 1 Multiple */
nuclear@0 589 /* Masters support. */
nuclear@0 590 /* */
nuclear@0 591 #define TT_CONFIG_OPTION_GX_VAR_SUPPORT
nuclear@0 592
nuclear@0 593
nuclear@0 594 /*************************************************************************/
nuclear@0 595 /* */
nuclear@0 596 /* Define TT_CONFIG_OPTION_BDF if you want to include support for */
nuclear@0 597 /* an embedded `BDF ' table within SFNT-based bitmap formats. */
nuclear@0 598 /* */
nuclear@0 599 #define TT_CONFIG_OPTION_BDF
nuclear@0 600
nuclear@0 601
nuclear@0 602 /*************************************************************************/
nuclear@0 603 /*************************************************************************/
nuclear@0 604 /**** ****/
nuclear@0 605 /**** T Y P E 1 D R I V E R C O N F I G U R A T I O N ****/
nuclear@0 606 /**** ****/
nuclear@0 607 /*************************************************************************/
nuclear@0 608 /*************************************************************************/
nuclear@0 609
nuclear@0 610
nuclear@0 611 /*************************************************************************/
nuclear@0 612 /* */
nuclear@0 613 /* T1_MAX_DICT_DEPTH is the maximal depth of nest dictionaries and */
nuclear@0 614 /* arrays in the Type 1 stream (see t1load.c). A minimum of 4 is */
nuclear@0 615 /* required. */
nuclear@0 616 /* */
nuclear@0 617 #define T1_MAX_DICT_DEPTH 5
nuclear@0 618
nuclear@0 619
nuclear@0 620 /*************************************************************************/
nuclear@0 621 /* */
nuclear@0 622 /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine */
nuclear@0 623 /* calls during glyph loading. */
nuclear@0 624 /* */
nuclear@0 625 #define T1_MAX_SUBRS_CALLS 16
nuclear@0 626
nuclear@0 627
nuclear@0 628 /*************************************************************************/
nuclear@0 629 /* */
nuclear@0 630 /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity. A */
nuclear@0 631 /* minimum of 16 is required. */
nuclear@0 632 /* */
nuclear@0 633 /* The Chinese font MingTiEG-Medium (CNS 11643 character set) needs 256. */
nuclear@0 634 /* */
nuclear@0 635 #define T1_MAX_CHARSTRINGS_OPERANDS 256
nuclear@0 636
nuclear@0 637
nuclear@0 638 /*************************************************************************/
nuclear@0 639 /* */
nuclear@0 640 /* Define this configuration macro if you want to prevent the */
nuclear@0 641 /* compilation of `t1afm', which is in charge of reading Type 1 AFM */
nuclear@0 642 /* files into an existing face. Note that if set, the T1 driver will be */
nuclear@0 643 /* unable to produce kerning distances. */
nuclear@0 644 /* */
nuclear@0 645 #undef T1_CONFIG_OPTION_NO_AFM
nuclear@0 646
nuclear@0 647
nuclear@0 648 /*************************************************************************/
nuclear@0 649 /* */
nuclear@0 650 /* Define this configuration macro if you want to prevent the */
nuclear@0 651 /* compilation of the Multiple Masters font support in the Type 1 */
nuclear@0 652 /* driver. */
nuclear@0 653 /* */
nuclear@0 654 #undef T1_CONFIG_OPTION_NO_MM_SUPPORT
nuclear@0 655
nuclear@0 656
nuclear@0 657 /*************************************************************************/
nuclear@0 658 /*************************************************************************/
nuclear@0 659 /**** ****/
nuclear@0 660 /**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/
nuclear@0 661 /**** ****/
nuclear@0 662 /*************************************************************************/
nuclear@0 663 /*************************************************************************/
nuclear@0 664
nuclear@0 665
nuclear@0 666 /*************************************************************************/
nuclear@0 667 /* */
nuclear@0 668 /* Compile autofit module with CJK (Chinese, Japanese, Korean) script */
nuclear@0 669 /* support. */
nuclear@0 670 /* */
nuclear@0 671 #define AF_CONFIG_OPTION_CJK
nuclear@0 672
nuclear@0 673 /*************************************************************************/
nuclear@0 674 /* */
nuclear@0 675 /* Compile autofit module with Indic script support. */
nuclear@0 676 /* */
nuclear@0 677 #define AF_CONFIG_OPTION_INDIC
nuclear@0 678
nuclear@0 679 /* */
nuclear@0 680
nuclear@0 681
nuclear@0 682 /*
nuclear@0 683 * Define this variable if you want to keep the layout of internal
nuclear@0 684 * structures that was used prior to FreeType 2.2. This also compiles in
nuclear@0 685 * a few obsolete functions to avoid linking problems on typical Unix
nuclear@0 686 * distributions.
nuclear@0 687 *
nuclear@0 688 * For embedded systems or building a new distribution from scratch, it
nuclear@0 689 * is recommended to disable the macro since it reduces the library's code
nuclear@0 690 * size and activates a few memory-saving optimizations as well.
nuclear@0 691 */
nuclear@0 692 #define FT_CONFIG_OPTION_OLD_INTERNALS
nuclear@0 693
nuclear@0 694
nuclear@0 695 /*
nuclear@0 696 * To detect legacy cache-lookup call from a rogue client (<= 2.1.7),
nuclear@0 697 * we restrict the number of charmaps in a font. The current API of
nuclear@0 698 * FTC_CMapCache_Lookup() takes cmap_index & charcode, but old API
nuclear@0 699 * takes charcode only. To determine the passed value is for cmap_index
nuclear@0 700 * or charcode, the possible cmap_index is restricted not to exceed
nuclear@0 701 * the minimum possible charcode by a rogue client. It is also very
nuclear@0 702 * unlikely that a rogue client is interested in Unicode values 0 to 15.
nuclear@0 703 *
nuclear@0 704 * NOTE: The original threshold was 4 deduced from popular number of
nuclear@0 705 * cmap subtables in UCS-4 TrueType fonts, but now it is not
nuclear@0 706 * irregular for OpenType fonts to have more than 4 subtables,
nuclear@0 707 * because variation selector subtables are available for Apple
nuclear@0 708 * and Microsoft platforms.
nuclear@0 709 */
nuclear@0 710
nuclear@0 711 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
nuclear@0 712 #define FT_MAX_CHARMAP_CACHEABLE 15
nuclear@0 713 #endif
nuclear@0 714
nuclear@0 715
nuclear@0 716 /*
nuclear@0 717 * This macro is defined if either unpatented or native TrueType
nuclear@0 718 * hinting is requested by the definitions above.
nuclear@0 719 */
nuclear@0 720 #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
nuclear@0 721 #define TT_USE_BYTECODE_INTERPRETER
nuclear@0 722 #undef TT_CONFIG_OPTION_UNPATENTED_HINTING
nuclear@0 723 #elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING
nuclear@0 724 #define TT_USE_BYTECODE_INTERPRETER
nuclear@0 725 #endif
nuclear@0 726
nuclear@0 727 FT_END_HEADER
nuclear@0 728
nuclear@0 729
nuclear@0 730 #endif /* __FTOPTION_H__ */
nuclear@0 731
nuclear@0 732
nuclear@0 733 /* END */