modules/freetype2/devel/ftoption.h

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

mercurial