vrshoot

diff 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
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/libs/ft2static/freetype/config/ftoption.h	Sat Feb 01 19:58:19 2014 +0200
     1.3 @@ -0,0 +1,733 @@
     1.4 +/***************************************************************************/
     1.5 +/*                                                                         */
     1.6 +/*  ftoption.h                                                             */
     1.7 +/*                                                                         */
     1.8 +/*    User-selectable configuration macros (specification only).           */
     1.9 +/*                                                                         */
    1.10 +/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,   */
    1.11 +/*            2010 by                                                      */
    1.12 +/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
    1.13 +/*                                                                         */
    1.14 +/*  This file is part of the FreeType project, and may only be used,       */
    1.15 +/*  modified, and distributed under the terms of the FreeType project      */
    1.16 +/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
    1.17 +/*  this file you indicate that you have read the license and              */
    1.18 +/*  understand and accept it fully.                                        */
    1.19 +/*                                                                         */
    1.20 +/***************************************************************************/
    1.21 +
    1.22 +
    1.23 +#ifndef __FTOPTION_H__
    1.24 +#define __FTOPTION_H__
    1.25 +
    1.26 +
    1.27 +#include <ft2build.h>
    1.28 +
    1.29 +
    1.30 +FT_BEGIN_HEADER
    1.31 +
    1.32 +  /*************************************************************************/
    1.33 +  /*                                                                       */
    1.34 +  /*                 USER-SELECTABLE CONFIGURATION MACROS                  */
    1.35 +  /*                                                                       */
    1.36 +  /* This file contains the default configuration macro definitions for    */
    1.37 +  /* a standard build of the FreeType library.  There are three ways to    */
    1.38 +  /* use this file to build project-specific versions of the library:      */
    1.39 +  /*                                                                       */
    1.40 +  /*  - You can modify this file by hand, but this is not recommended in   */
    1.41 +  /*    cases where you would like to build several versions of the        */
    1.42 +  /*    library from a single source directory.                            */
    1.43 +  /*                                                                       */
    1.44 +  /*  - You can put a copy of this file in your build directory, more      */
    1.45 +  /*    precisely in `$BUILD/freetype/config/ftoption.h', where `$BUILD'   */
    1.46 +  /*    is the name of a directory that is included _before_ the FreeType  */
    1.47 +  /*    include path during compilation.                                   */
    1.48 +  /*                                                                       */
    1.49 +  /*    The default FreeType Makefiles and Jamfiles use the build          */
    1.50 +  /*    directory `builds/<system>' by default, but you can easily change  */
    1.51 +  /*    that for your own projects.                                        */
    1.52 +  /*                                                                       */
    1.53 +  /*  - Copy the file <ft2build.h> to `$BUILD/ft2build.h' and modify it    */
    1.54 +  /*    slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to       */
    1.55 +  /*    locate this file during the build.  For example,                   */
    1.56 +  /*                                                                       */
    1.57 +  /*      #define FT_CONFIG_OPTIONS_H  <myftoptions.h>                     */
    1.58 +  /*      #include <freetype/config/ftheader.h>                            */
    1.59 +  /*                                                                       */
    1.60 +  /*    will use `$BUILD/myftoptions.h' instead of this file for macro     */
    1.61 +  /*    definitions.                                                       */
    1.62 +  /*                                                                       */
    1.63 +  /*    Note also that you can similarly pre-define the macro              */
    1.64 +  /*    FT_CONFIG_MODULES_H used to locate the file listing of the modules */
    1.65 +  /*    that are statically linked to the library at compile time.  By     */
    1.66 +  /*    default, this file is <freetype/config/ftmodule.h>.                */
    1.67 +  /*                                                                       */
    1.68 +  /*  We highly recommend using the third method whenever possible.        */
    1.69 +  /*                                                                       */
    1.70 +  /*************************************************************************/
    1.71 +
    1.72 +
    1.73 +  /*************************************************************************/
    1.74 +  /*************************************************************************/
    1.75 +  /****                                                                 ****/
    1.76 +  /**** 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 ****/
    1.77 +  /****                                                                 ****/
    1.78 +  /*************************************************************************/
    1.79 +  /*************************************************************************/
    1.80 +
    1.81 +
    1.82 +  /*************************************************************************/
    1.83 +  /*                                                                       */
    1.84 +  /* Uncomment the line below if you want to activate sub-pixel rendering  */
    1.85 +  /* (a.k.a. LCD rendering, or ClearType) in this build of the library.    */
    1.86 +  /*                                                                       */
    1.87 +  /* Note that this feature is covered by several Microsoft patents        */
    1.88 +  /* and should not be activated in any default build of the library.      */
    1.89 +  /*                                                                       */
    1.90 +  /* This macro has no impact on the FreeType API, only on its             */
    1.91 +  /* _implementation_.  For example, using FT_RENDER_MODE_LCD when calling */
    1.92 +  /* FT_Render_Glyph still generates a bitmap that is 3 times wider than   */
    1.93 +  /* the original size in case this macro isn't defined; however, each     */
    1.94 +  /* triplet of subpixels has R=G=B.                                       */
    1.95 +  /*                                                                       */
    1.96 +  /* This is done to allow FreeType clients to run unmodified, forcing     */
    1.97 +  /* them to display normal gray-level anti-aliased glyphs.                */
    1.98 +  /*                                                                       */
    1.99 +/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
   1.100 +
   1.101 +
   1.102 +  /*************************************************************************/
   1.103 +  /*                                                                       */
   1.104 +  /* Many compilers provide a non-ANSI 64-bit data type that can be used   */
   1.105 +  /* by FreeType to speed up some computations.  However, this will create */
   1.106 +  /* some problems when compiling the library in strict ANSI mode.         */
   1.107 +  /*                                                                       */
   1.108 +  /* For this reason, the use of 64-bit integers is normally disabled when */
   1.109 +  /* the __STDC__ macro is defined.  You can however disable this by       */
   1.110 +  /* defining the macro FT_CONFIG_OPTION_FORCE_INT64 here.                 */
   1.111 +  /*                                                                       */
   1.112 +  /* For most compilers, this will only create compilation warnings when   */
   1.113 +  /* building the library.                                                 */
   1.114 +  /*                                                                       */
   1.115 +  /* ObNote: The compiler-specific 64-bit integers are detected in the     */
   1.116 +  /*         file `ftconfig.h' either statically or through the            */
   1.117 +  /*         `configure' script on supported platforms.                    */
   1.118 +  /*                                                                       */
   1.119 +#undef FT_CONFIG_OPTION_FORCE_INT64
   1.120 +
   1.121 +
   1.122 +  /*************************************************************************/
   1.123 +  /*                                                                       */
   1.124 +  /* If this macro is defined, do not try to use an assembler version of   */
   1.125 +  /* performance-critical functions (e.g. FT_MulFix).  You should only do  */
   1.126 +  /* that to verify that the assembler function works properly, or to      */
   1.127 +  /* execute benchmark tests of the various implementations.               */
   1.128 +/* #define FT_CONFIG_OPTION_NO_ASSEMBLER */
   1.129 +
   1.130 +
   1.131 +  /*************************************************************************/
   1.132 +  /*                                                                       */
   1.133 +  /* If this macro is defined, try to use an inlined assembler version of  */
   1.134 +  /* the `FT_MulFix' function, which is a `hotspot' when loading and       */
   1.135 +  /* hinting glyphs, and which should be executed as fast as possible.     */
   1.136 +  /*                                                                       */
   1.137 +  /* Note that if your compiler or CPU is not supported, this will default */
   1.138 +  /* to the standard and portable implementation found in `ftcalc.c'.      */
   1.139 +  /*                                                                       */
   1.140 +#define FT_CONFIG_OPTION_INLINE_MULFIX
   1.141 +
   1.142 +
   1.143 +  /*************************************************************************/
   1.144 +  /*                                                                       */
   1.145 +  /* LZW-compressed file support.                                          */
   1.146 +  /*                                                                       */
   1.147 +  /*   FreeType now handles font files that have been compressed with the  */
   1.148 +  /*   `compress' program.  This is mostly used to parse many of the PCF   */
   1.149 +  /*   files that come with various X11 distributions.  The implementation */
   1.150 +  /*   uses NetBSD's `zopen' to partially uncompress the file on the fly   */
   1.151 +  /*   (see src/lzw/ftgzip.c).                                             */
   1.152 +  /*                                                                       */
   1.153 +  /*   Define this macro if you want to enable this `feature'.             */
   1.154 +  /*                                                                       */
   1.155 +#define FT_CONFIG_OPTION_USE_LZW
   1.156 +
   1.157 +
   1.158 +  /*************************************************************************/
   1.159 +  /*                                                                       */
   1.160 +  /* Gzip-compressed file support.                                         */
   1.161 +  /*                                                                       */
   1.162 +  /*   FreeType now handles font files that have been compressed with the  */
   1.163 +  /*   `gzip' program.  This is mostly used to parse many of the PCF files */
   1.164 +  /*   that come with XFree86.  The implementation uses `zlib' to          */
   1.165 +  /*   partially uncompress the file on the fly (see src/gzip/ftgzip.c).   */
   1.166 +  /*                                                                       */
   1.167 +  /*   Define this macro if you want to enable this `feature'.  See also   */
   1.168 +  /*   the macro FT_CONFIG_OPTION_SYSTEM_ZLIB below.                       */
   1.169 +  /*                                                                       */
   1.170 +#define FT_CONFIG_OPTION_USE_ZLIB
   1.171 +
   1.172 +
   1.173 +  /*************************************************************************/
   1.174 +  /*                                                                       */
   1.175 +  /* ZLib library selection                                                */
   1.176 +  /*                                                                       */
   1.177 +  /*   This macro is only used when FT_CONFIG_OPTION_USE_ZLIB is defined.  */
   1.178 +  /*   It allows FreeType's `ftgzip' component to link to the system's     */
   1.179 +  /*   installation of the ZLib library.  This is useful on systems like   */
   1.180 +  /*   Unix or VMS where it generally is already available.                */
   1.181 +  /*                                                                       */
   1.182 +  /*   If you let it undefined, the component will use its own copy        */
   1.183 +  /*   of the zlib sources instead.  These have been modified to be        */
   1.184 +  /*   included directly within the component and *not* export external    */
   1.185 +  /*   function names.  This allows you to link any program with FreeType  */
   1.186 +  /*   _and_ ZLib without linking conflicts.                               */
   1.187 +  /*                                                                       */
   1.188 +  /*   Do not #undef this macro here since the build system might define   */
   1.189 +  /*   it for certain configurations only.                                 */
   1.190 +  /*                                                                       */
   1.191 +/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */
   1.192 +
   1.193 +
   1.194 +  /*************************************************************************/
   1.195 +  /*                                                                       */
   1.196 +  /* DLL export compilation                                                */
   1.197 +  /*                                                                       */
   1.198 +  /*   When compiling FreeType as a DLL, some systems/compilers need a     */
   1.199 +  /*   special keyword in front OR after the return type of function       */
   1.200 +  /*   declarations.                                                       */
   1.201 +  /*                                                                       */
   1.202 +  /*   Two macros are used within the FreeType source code to define       */
   1.203 +  /*   exported library functions: FT_EXPORT and FT_EXPORT_DEF.            */
   1.204 +  /*                                                                       */
   1.205 +  /*     FT_EXPORT( return_type )                                          */
   1.206 +  /*                                                                       */
   1.207 +  /*       is used in a function declaration, as in                        */
   1.208 +  /*                                                                       */
   1.209 +  /*         FT_EXPORT( FT_Error )                                         */
   1.210 +  /*         FT_Init_FreeType( FT_Library*  alibrary );                    */
   1.211 +  /*                                                                       */
   1.212 +  /*                                                                       */
   1.213 +  /*     FT_EXPORT_DEF( return_type )                                      */
   1.214 +  /*                                                                       */
   1.215 +  /*       is used in a function definition, as in                         */
   1.216 +  /*                                                                       */
   1.217 +  /*         FT_EXPORT_DEF( FT_Error )                                     */
   1.218 +  /*         FT_Init_FreeType( FT_Library*  alibrary )                     */
   1.219 +  /*         {                                                             */
   1.220 +  /*           ... some code ...                                           */
   1.221 +  /*           return FT_Err_Ok;                                           */
   1.222 +  /*         }                                                             */
   1.223 +  /*                                                                       */
   1.224 +  /*   You can provide your own implementation of FT_EXPORT and            */
   1.225 +  /*   FT_EXPORT_DEF here if you want.  If you leave them undefined, they  */
   1.226 +  /*   will be later automatically defined as `extern return_type' to      */
   1.227 +  /*   allow normal compilation.                                           */
   1.228 +  /*                                                                       */
   1.229 +  /*   Do not #undef these macros here since the build system might define */
   1.230 +  /*   them for certain configurations only.                               */
   1.231 +  /*                                                                       */
   1.232 +/* #define FT_EXPORT(x)      extern x */
   1.233 +/* #define FT_EXPORT_DEF(x)  x */
   1.234 +
   1.235 +
   1.236 +  /*************************************************************************/
   1.237 +  /*                                                                       */
   1.238 +  /* Glyph Postscript Names handling                                       */
   1.239 +  /*                                                                       */
   1.240 +  /*   By default, FreeType 2 is compiled with the `psnames' module.  This */
   1.241 +  /*   module is in charge of converting a glyph name string into a        */
   1.242 +  /*   Unicode value, or return a Macintosh standard glyph name for the    */
   1.243 +  /*   use with the TrueType `post' table.                                 */
   1.244 +  /*                                                                       */
   1.245 +  /*   Undefine this macro if you do not want `psnames' compiled in your   */
   1.246 +  /*   build of FreeType.  This has the following effects:                 */
   1.247 +  /*                                                                       */
   1.248 +  /*   - The TrueType driver will provide its own set of glyph names,      */
   1.249 +  /*     if you build it to support postscript names in the TrueType       */
   1.250 +  /*     `post' table.                                                     */
   1.251 +  /*                                                                       */
   1.252 +  /*   - The Type 1 driver will not be able to synthesize a Unicode        */
   1.253 +  /*     charmap out of the glyphs found in the fonts.                     */
   1.254 +  /*                                                                       */
   1.255 +  /*   You would normally undefine this configuration macro when building  */
   1.256 +  /*   a version of FreeType that doesn't contain a Type 1 or CFF driver.  */
   1.257 +  /*                                                                       */
   1.258 +#define FT_CONFIG_OPTION_POSTSCRIPT_NAMES
   1.259 +
   1.260 +
   1.261 +  /*************************************************************************/
   1.262 +  /*                                                                       */
   1.263 +  /* Postscript Names to Unicode Values support                            */
   1.264 +  /*                                                                       */
   1.265 +  /*   By default, FreeType 2 is built with the `PSNames' module compiled  */
   1.266 +  /*   in.  Among other things, the module is used to convert a glyph name */
   1.267 +  /*   into a Unicode value.  This is especially useful in order to        */
   1.268 +  /*   synthesize on the fly a Unicode charmap from the CFF/Type 1 driver  */
   1.269 +  /*   through a big table named the `Adobe Glyph List' (AGL).             */
   1.270 +  /*                                                                       */
   1.271 +  /*   Undefine this macro if you do not want the Adobe Glyph List         */
   1.272 +  /*   compiled in your `PSNames' module.  The Type 1 driver will not be   */
   1.273 +  /*   able to synthesize a Unicode charmap out of the glyphs found in the */
   1.274 +  /*   fonts.                                                              */
   1.275 +  /*                                                                       */
   1.276 +#define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
   1.277 +
   1.278 +
   1.279 +  /*************************************************************************/
   1.280 +  /*                                                                       */
   1.281 +  /* Support for Mac fonts                                                 */
   1.282 +  /*                                                                       */
   1.283 +  /*   Define this macro if you want support for outline fonts in Mac      */
   1.284 +  /*   format (mac dfont, mac resource, macbinary containing a mac         */
   1.285 +  /*   resource) on non-Mac platforms.                                     */
   1.286 +  /*                                                                       */
   1.287 +  /*   Note that the `FOND' resource isn't checked.                        */
   1.288 +  /*                                                                       */
   1.289 +#define FT_CONFIG_OPTION_MAC_FONTS
   1.290 +
   1.291 +
   1.292 +  /*************************************************************************/
   1.293 +  /*                                                                       */
   1.294 +  /* Guessing methods to access embedded resource forks                    */
   1.295 +  /*                                                                       */
   1.296 +  /*   Enable extra Mac fonts support on non-Mac platforms (e.g.           */
   1.297 +  /*   GNU/Linux).                                                         */
   1.298 +  /*                                                                       */
   1.299 +  /*   Resource forks which include fonts data are stored sometimes in     */
   1.300 +  /*   locations which users or developers don't expected.  In some cases, */
   1.301 +  /*   resource forks start with some offset from the head of a file.  In  */
   1.302 +  /*   other cases, the actual resource fork is stored in file different   */
   1.303 +  /*   from what the user specifies.  If this option is activated,         */
   1.304 +  /*   FreeType tries to guess whether such offsets or different file      */
   1.305 +  /*   names must be used.                                                 */
   1.306 +  /*                                                                       */
   1.307 +  /*   Note that normal, direct access of resource forks is controlled via */
   1.308 +  /*   the FT_CONFIG_OPTION_MAC_FONTS option.                              */
   1.309 +  /*                                                                       */
   1.310 +#ifdef FT_CONFIG_OPTION_MAC_FONTS
   1.311 +#define FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK
   1.312 +#endif
   1.313 +
   1.314 +
   1.315 +  /*************************************************************************/
   1.316 +  /*                                                                       */
   1.317 +  /* Allow the use of FT_Incremental_Interface to load typefaces that      */
   1.318 +  /* contain no glyph data, but supply it via a callback function.         */
   1.319 +  /* This is required by clients supporting document formats which         */
   1.320 +  /* supply font data incrementally as the document is parsed, such        */
   1.321 +  /* as the Ghostscript interpreter for the PostScript language.           */
   1.322 +  /*                                                                       */
   1.323 +#define FT_CONFIG_OPTION_INCREMENTAL
   1.324 +
   1.325 +
   1.326 +  /*************************************************************************/
   1.327 +  /*                                                                       */
   1.328 +  /* The size in bytes of the render pool used by the scan-line converter  */
   1.329 +  /* to do all of its work.                                                */
   1.330 +  /*                                                                       */
   1.331 +  /* This must be greater than 4KByte if you use FreeType to rasterize     */
   1.332 +  /* glyphs; otherwise, you may set it to zero to avoid unnecessary        */
   1.333 +  /* allocation of the render pool.                                        */
   1.334 +  /*                                                                       */
   1.335 +#define FT_RENDER_POOL_SIZE  16384L
   1.336 +
   1.337 +
   1.338 +  /*************************************************************************/
   1.339 +  /*                                                                       */
   1.340 +  /* FT_MAX_MODULES                                                        */
   1.341 +  /*                                                                       */
   1.342 +  /*   The maximum number of modules that can be registered in a single    */
   1.343 +  /*   FreeType library object.  32 is the default.                        */
   1.344 +  /*                                                                       */
   1.345 +#define FT_MAX_MODULES  32
   1.346 +
   1.347 +
   1.348 +  /*************************************************************************/
   1.349 +  /*                                                                       */
   1.350 +  /* Debug level                                                           */
   1.351 +  /*                                                                       */
   1.352 +  /*   FreeType can be compiled in debug or trace mode.  In debug mode,    */
   1.353 +  /*   errors are reported through the `ftdebug' component.  In trace      */
   1.354 +  /*   mode, additional messages are sent to the standard output during    */
   1.355 +  /*   execution.                                                          */
   1.356 +  /*                                                                       */
   1.357 +  /*   Define FT_DEBUG_LEVEL_ERROR to build the library in debug mode.     */
   1.358 +  /*   Define FT_DEBUG_LEVEL_TRACE to build it in trace mode.              */
   1.359 +  /*                                                                       */
   1.360 +  /*   Don't define any of these macros to compile in `release' mode!      */
   1.361 +  /*                                                                       */
   1.362 +  /*   Do not #undef these macros here since the build system might define */
   1.363 +  /*   them for certain configurations only.                               */
   1.364 +  /*                                                                       */
   1.365 +/* #define FT_DEBUG_LEVEL_ERROR */
   1.366 +/* #define FT_DEBUG_LEVEL_TRACE */
   1.367 +
   1.368 +
   1.369 +  /*************************************************************************/
   1.370 +  /*                                                                       */
   1.371 +  /* Memory Debugging                                                      */
   1.372 +  /*                                                                       */
   1.373 +  /*   FreeType now comes with an integrated memory debugger that is       */
   1.374 +  /*   capable of detecting simple errors like memory leaks or double      */
   1.375 +  /*   deletes.  To compile it within your build of the library, you       */
   1.376 +  /*   should define FT_DEBUG_MEMORY here.                                 */
   1.377 +  /*                                                                       */
   1.378 +  /*   Note that the memory debugger is only activated at runtime when     */
   1.379 +  /*   when the _environment_ variable `FT2_DEBUG_MEMORY' is defined also! */
   1.380 +  /*                                                                       */
   1.381 +  /*   Do not #undef this macro here since the build system might define   */
   1.382 +  /*   it for certain configurations only.                                 */
   1.383 +  /*                                                                       */
   1.384 +/* #define FT_DEBUG_MEMORY */
   1.385 +
   1.386 +
   1.387 +  /*************************************************************************/
   1.388 +  /*                                                                       */
   1.389 +  /* Module errors                                                         */
   1.390 +  /*                                                                       */
   1.391 +  /*   If this macro is set (which is _not_ the default), the higher byte  */
   1.392 +  /*   of an error code gives the module in which the error has occurred,  */
   1.393 +  /*   while the lower byte is the real error code.                        */
   1.394 +  /*                                                                       */
   1.395 +  /*   Setting this macro makes sense for debugging purposes only, since   */
   1.396 +  /*   it would break source compatibility of certain programs that use    */
   1.397 +  /*   FreeType 2.                                                         */
   1.398 +  /*                                                                       */
   1.399 +  /*   More details can be found in the files ftmoderr.h and fterrors.h.   */
   1.400 +  /*                                                                       */
   1.401 +#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS
   1.402 +
   1.403 +
   1.404 +  /*************************************************************************/
   1.405 +  /*                                                                       */
   1.406 +  /* Position Independent Code                                             */
   1.407 +  /*                                                                       */
   1.408 +  /*   If this macro is set (which is _not_ the default), FreeType2 will   */
   1.409 +  /*   avoid creating constants that require address fixups.  Instead the  */
   1.410 +  /*   constants will be moved into a struct and additional intialization  */
   1.411 +  /*   code will be used.                                                  */
   1.412 +  /*                                                                       */
   1.413 +  /*   Setting this macro is needed for systems that prohibit address      */
   1.414 +  /*   fixups, such as BREW.                                               */
   1.415 +  /*                                                                       */
   1.416 +/* #define FT_CONFIG_OPTION_PIC */
   1.417 +
   1.418 +
   1.419 +  /*************************************************************************/
   1.420 +  /*************************************************************************/
   1.421 +  /****                                                                 ****/
   1.422 +  /****        S F N T   D R I V E R    C O N F I G U R A T I O N       ****/
   1.423 +  /****                                                                 ****/
   1.424 +  /*************************************************************************/
   1.425 +  /*************************************************************************/
   1.426 +
   1.427 +
   1.428 +  /*************************************************************************/
   1.429 +  /*                                                                       */
   1.430 +  /* Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support       */
   1.431 +  /* embedded bitmaps in all formats using the SFNT module (namely         */
   1.432 +  /* TrueType & OpenType).                                                 */
   1.433 +  /*                                                                       */
   1.434 +#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS
   1.435 +
   1.436 +
   1.437 +  /*************************************************************************/
   1.438 +  /*                                                                       */
   1.439 +  /* Define TT_CONFIG_OPTION_POSTSCRIPT_NAMES if you want to be able to    */
   1.440 +  /* load and enumerate the glyph Postscript names in a TrueType or        */
   1.441 +  /* OpenType file.                                                        */
   1.442 +  /*                                                                       */
   1.443 +  /* Note that when you do not compile the `PSNames' module by undefining  */
   1.444 +  /* the above FT_CONFIG_OPTION_POSTSCRIPT_NAMES, the `sfnt' module will   */
   1.445 +  /* contain additional code used to read the PS Names table from a font.  */
   1.446 +  /*                                                                       */
   1.447 +  /* (By default, the module uses `PSNames' to extract glyph names.)       */
   1.448 +  /*                                                                       */
   1.449 +#define TT_CONFIG_OPTION_POSTSCRIPT_NAMES
   1.450 +
   1.451 +
   1.452 +  /*************************************************************************/
   1.453 +  /*                                                                       */
   1.454 +  /* Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to       */
   1.455 +  /* access the internal name table in a SFNT-based format like TrueType   */
   1.456 +  /* or OpenType.  The name table contains various strings used to         */
   1.457 +  /* describe the font, like family name, copyright, version, etc.  It     */
   1.458 +  /* does not contain any glyph name though.                               */
   1.459 +  /*                                                                       */
   1.460 +  /* Accessing SFNT names is done through the functions declared in        */
   1.461 +  /* `freetype/ftsnames.h'.                                                */
   1.462 +  /*                                                                       */
   1.463 +#define TT_CONFIG_OPTION_SFNT_NAMES
   1.464 +
   1.465 +
   1.466 +  /*************************************************************************/
   1.467 +  /*                                                                       */
   1.468 +  /* TrueType CMap support                                                 */
   1.469 +  /*                                                                       */
   1.470 +  /*   Here you can fine-tune which TrueType CMap table format shall be    */
   1.471 +  /*   supported.                                                          */
   1.472 +#define TT_CONFIG_CMAP_FORMAT_0
   1.473 +#define TT_CONFIG_CMAP_FORMAT_2
   1.474 +#define TT_CONFIG_CMAP_FORMAT_4
   1.475 +#define TT_CONFIG_CMAP_FORMAT_6
   1.476 +#define TT_CONFIG_CMAP_FORMAT_8
   1.477 +#define TT_CONFIG_CMAP_FORMAT_10
   1.478 +#define TT_CONFIG_CMAP_FORMAT_12
   1.479 +#define TT_CONFIG_CMAP_FORMAT_13
   1.480 +#define TT_CONFIG_CMAP_FORMAT_14
   1.481 +
   1.482 +
   1.483 +  /*************************************************************************/
   1.484 +  /*************************************************************************/
   1.485 +  /****                                                                 ****/
   1.486 +  /****    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   ****/
   1.487 +  /****                                                                 ****/
   1.488 +  /*************************************************************************/
   1.489 +  /*************************************************************************/
   1.490 +
   1.491 +  /*************************************************************************/
   1.492 +  /*                                                                       */
   1.493 +  /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile   */
   1.494 +  /* a bytecode interpreter in the TrueType driver.                        */
   1.495 +  /*                                                                       */
   1.496 +  /* By undefining this, you will only compile the code necessary to load  */
   1.497 +  /* TrueType glyphs without hinting.                                      */
   1.498 +  /*                                                                       */
   1.499 +  /*   Do not #undef this macro here, since the build system might         */
   1.500 +  /*   define it for certain configurations only.                          */
   1.501 +  /*                                                                       */
   1.502 +#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
   1.503 +
   1.504 +
   1.505 +  /*************************************************************************/
   1.506 +  /*                                                                       */
   1.507 +  /* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version  */
   1.508 +  /* of the TrueType bytecode interpreter is used that doesn't implement   */
   1.509 +  /* any of the patented opcodes and algorithms.  The patents related to   */
   1.510 +  /* TrueType hinting have expired worldwide since May 2010; this option   */
   1.511 +  /* is now deprecated.                                                    */
   1.512 +  /*                                                                       */
   1.513 +  /* Note that the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored*  */
   1.514 +  /* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words,  */
   1.515 +  /* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or                */
   1.516 +  /* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time.    */
   1.517 +  /*                                                                       */
   1.518 +  /* This macro is only useful for a small number of font files (mostly    */
   1.519 +  /* for Asian scripts) that require bytecode interpretation to properly   */
   1.520 +  /* load glyphs.  For all other fonts, this produces unpleasant results,  */
   1.521 +  /* thus the unpatented interpreter is never used to load glyphs from     */
   1.522 +  /* TrueType fonts unless one of the following two options is used.       */
   1.523 +  /*                                                                       */
   1.524 +  /*   - The unpatented interpreter is explicitly activated by the user    */
   1.525 +  /*     through the FT_PARAM_TAG_UNPATENTED_HINTING parameter tag         */
   1.526 +  /*     when opening the FT_Face.                                         */
   1.527 +  /*                                                                       */
   1.528 +  /*   - FreeType detects that the FT_Face corresponds to one of the       */
   1.529 +  /*     `trick' fonts (e.g., `Mingliu') it knows about.  The font engine  */
   1.530 +  /*     contains a hard-coded list of font names and other matching       */
   1.531 +  /*     parameters (see function `tt_face_init' in file                   */
   1.532 +  /*     `src/truetype/ttobjs.c').                                         */
   1.533 +  /*                                                                       */
   1.534 +  /* Here a sample code snippet for using FT_PARAM_TAG_UNPATENTED_HINTING. */
   1.535 +  /*                                                                       */
   1.536 +  /*   {                                                                   */
   1.537 +  /*     FT_Parameter  parameter;                                          */
   1.538 +  /*     FT_Open_Args  open_args;                                          */
   1.539 +  /*                                                                       */
   1.540 +  /*                                                                       */
   1.541 +  /*     parameter.tag = FT_PARAM_TAG_UNPATENTED_HINTING;                  */
   1.542 +  /*                                                                       */
   1.543 +  /*     open_args.flags      = FT_OPEN_PATHNAME | FT_OPEN_PARAMS;         */
   1.544 +  /*     open_args.pathname   = my_font_pathname;                          */
   1.545 +  /*     open_args.num_params = 1;                                         */
   1.546 +  /*     open_args.params     = &parameter;                                */
   1.547 +  /*                                                                       */
   1.548 +  /*     error = FT_Open_Face( library, &open_args, index, &face );        */
   1.549 +  /*     ...                                                               */
   1.550 +  /*   }                                                                   */
   1.551 +  /*                                                                       */
   1.552 +/* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */
   1.553 +
   1.554 +
   1.555 +  /*************************************************************************/
   1.556 +  /*                                                                       */
   1.557 +  /* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType    */
   1.558 +  /* bytecode interpreter with a huge switch statement, rather than a call */
   1.559 +  /* table.  This results in smaller and faster code for a number of       */
   1.560 +  /* architectures.                                                        */
   1.561 +  /*                                                                       */
   1.562 +  /* Note however that on some compiler/processor combinations, undefining */
   1.563 +  /* this macro will generate faster, though larger, code.                 */
   1.564 +  /*                                                                       */
   1.565 +#define TT_CONFIG_OPTION_INTERPRETER_SWITCH
   1.566 +
   1.567 +
   1.568 +  /*************************************************************************/
   1.569 +  /*                                                                       */
   1.570 +  /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the        */
   1.571 +  /* TrueType glyph loader to use Apple's definition of how to handle      */
   1.572 +  /* component offsets in composite glyphs.                                */
   1.573 +  /*                                                                       */
   1.574 +  /* Apple and MS disagree on the default behavior of component offsets    */
   1.575 +  /* in composites.  Apple says that they should be scaled by the scaling  */
   1.576 +  /* factors in the transformation matrix (roughly, it's more complex)     */
   1.577 +  /* while MS says they should not.  OpenType defines two bits in the      */
   1.578 +  /* composite flags array which can be used to disambiguate, but old      */
   1.579 +  /* fonts will not have them.                                             */
   1.580 +  /*                                                                       */
   1.581 +  /*   http://partners.adobe.com/asn/developer/opentype/glyf.html          */
   1.582 +  /*   http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html                 */
   1.583 +  /*                                                                       */
   1.584 +#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
   1.585 +
   1.586 +
   1.587 +  /*************************************************************************/
   1.588 +  /*                                                                       */
   1.589 +  /* Define TT_CONFIG_OPTION_GX_VAR_SUPPORT if you want to include         */
   1.590 +  /* support for Apple's distortable font technology (fvar, gvar, cvar,    */
   1.591 +  /* and avar tables).  This has many similarities to Type 1 Multiple      */
   1.592 +  /* Masters support.                                                      */
   1.593 +  /*                                                                       */
   1.594 +#define TT_CONFIG_OPTION_GX_VAR_SUPPORT
   1.595 +
   1.596 +
   1.597 +  /*************************************************************************/
   1.598 +  /*                                                                       */
   1.599 +  /* Define TT_CONFIG_OPTION_BDF if you want to include support for        */
   1.600 +  /* an embedded `BDF ' table within SFNT-based bitmap formats.            */
   1.601 +  /*                                                                       */
   1.602 +#define TT_CONFIG_OPTION_BDF
   1.603 +
   1.604 +
   1.605 +  /*************************************************************************/
   1.606 +  /*************************************************************************/
   1.607 +  /****                                                                 ****/
   1.608 +  /****      T Y P E 1   D R I V E R    C O N F I G U R A T I O N       ****/
   1.609 +  /****                                                                 ****/
   1.610 +  /*************************************************************************/
   1.611 +  /*************************************************************************/
   1.612 +
   1.613 +
   1.614 +  /*************************************************************************/
   1.615 +  /*                                                                       */
   1.616 +  /* T1_MAX_DICT_DEPTH is the maximal depth of nest dictionaries and       */
   1.617 +  /* arrays in the Type 1 stream (see t1load.c).  A minimum of 4 is        */
   1.618 +  /* required.                                                             */
   1.619 +  /*                                                                       */
   1.620 +#define T1_MAX_DICT_DEPTH  5
   1.621 +
   1.622 +
   1.623 +  /*************************************************************************/
   1.624 +  /*                                                                       */
   1.625 +  /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine   */
   1.626 +  /* calls during glyph loading.                                           */
   1.627 +  /*                                                                       */
   1.628 +#define T1_MAX_SUBRS_CALLS  16
   1.629 +
   1.630 +
   1.631 +  /*************************************************************************/
   1.632 +  /*                                                                       */
   1.633 +  /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity.  A     */
   1.634 +  /* minimum of 16 is required.                                            */
   1.635 +  /*                                                                       */
   1.636 +  /* The Chinese font MingTiEG-Medium (CNS 11643 character set) needs 256. */
   1.637 +  /*                                                                       */
   1.638 +#define T1_MAX_CHARSTRINGS_OPERANDS  256
   1.639 +
   1.640 +
   1.641 +  /*************************************************************************/
   1.642 +  /*                                                                       */
   1.643 +  /* Define this configuration macro if you want to prevent the            */
   1.644 +  /* compilation of `t1afm', which is in charge of reading Type 1 AFM      */
   1.645 +  /* files into an existing face.  Note that if set, the T1 driver will be */
   1.646 +  /* unable to produce kerning distances.                                  */
   1.647 +  /*                                                                       */
   1.648 +#undef T1_CONFIG_OPTION_NO_AFM
   1.649 +
   1.650 +
   1.651 +  /*************************************************************************/
   1.652 +  /*                                                                       */
   1.653 +  /* Define this configuration macro if you want to prevent the            */
   1.654 +  /* compilation of the Multiple Masters font support in the Type 1        */
   1.655 +  /* driver.                                                               */
   1.656 +  /*                                                                       */
   1.657 +#undef T1_CONFIG_OPTION_NO_MM_SUPPORT
   1.658 +
   1.659 +
   1.660 +  /*************************************************************************/
   1.661 +  /*************************************************************************/
   1.662 +  /****                                                                 ****/
   1.663 +  /****    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     ****/
   1.664 +  /****                                                                 ****/
   1.665 +  /*************************************************************************/
   1.666 +  /*************************************************************************/
   1.667 +
   1.668 +
   1.669 +  /*************************************************************************/
   1.670 +  /*                                                                       */
   1.671 +  /* Compile autofit module with CJK (Chinese, Japanese, Korean) script    */
   1.672 +  /* support.                                                              */
   1.673 +  /*                                                                       */
   1.674 +#define AF_CONFIG_OPTION_CJK
   1.675 +
   1.676 +  /*************************************************************************/
   1.677 +  /*                                                                       */
   1.678 +  /* Compile autofit module with Indic script support.                     */
   1.679 +  /*                                                                       */
   1.680 +#define AF_CONFIG_OPTION_INDIC
   1.681 +
   1.682 +  /* */
   1.683 +
   1.684 +
   1.685 +  /*
   1.686 +   * Define this variable if you want to keep the layout of internal
   1.687 +   * structures that was used prior to FreeType 2.2.  This also compiles in
   1.688 +   * a few obsolete functions to avoid linking problems on typical Unix
   1.689 +   * distributions.
   1.690 +   *
   1.691 +   * For embedded systems or building a new distribution from scratch, it
   1.692 +   * is recommended to disable the macro since it reduces the library's code
   1.693 +   * size and activates a few memory-saving optimizations as well.
   1.694 +   */
   1.695 +#define FT_CONFIG_OPTION_OLD_INTERNALS
   1.696 +
   1.697 +
   1.698 +  /*
   1.699 +   *  To detect legacy cache-lookup call from a rogue client (<= 2.1.7),
   1.700 +   *  we restrict the number of charmaps in a font.  The current API of
   1.701 +   *  FTC_CMapCache_Lookup() takes cmap_index & charcode, but old API
   1.702 +   *  takes charcode only.  To determine the passed value is for cmap_index
   1.703 +   *  or charcode, the possible cmap_index is restricted not to exceed
   1.704 +   *  the minimum possible charcode by a rogue client.  It is also very
   1.705 +   *  unlikely that a rogue client is interested in Unicode values 0 to 15.
   1.706 +   *
   1.707 +   *  NOTE: The original threshold was 4 deduced from popular number of
   1.708 +   *        cmap subtables in UCS-4 TrueType fonts, but now it is not
   1.709 +   *        irregular for OpenType fonts to have more than 4 subtables,
   1.710 +   *        because variation selector subtables are available for Apple
   1.711 +   *        and Microsoft platforms.
   1.712 +   */
   1.713 +
   1.714 +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
   1.715 +#define FT_MAX_CHARMAP_CACHEABLE 15
   1.716 +#endif
   1.717 +
   1.718 +
   1.719 +  /*
   1.720 +   * This macro is defined if either unpatented or native TrueType
   1.721 +   * hinting is requested by the definitions above.
   1.722 +   */
   1.723 +#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
   1.724 +#define  TT_USE_BYTECODE_INTERPRETER
   1.725 +#undef   TT_CONFIG_OPTION_UNPATENTED_HINTING
   1.726 +#elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING
   1.727 +#define  TT_USE_BYTECODE_INTERPRETER
   1.728 +#endif
   1.729 +
   1.730 +FT_END_HEADER
   1.731 +
   1.732 +
   1.733 +#endif /* __FTOPTION_H__ */
   1.734 +
   1.735 +
   1.736 +/* END */