ftoption.h revision 0a9d06e2b5cf75c3d6ba958026bfdf4745f576d6
12cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor/***************************************************************************/
22cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor/*                                                                         */
32cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor/*  ftoption.h                                                             */
42cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor/*                                                                         */
52cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor/*    User-selectable configuration macros (specification only).           */
62cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor/*                                                                         */
72cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by       */
82cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
92cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor/*                                                                         */
102cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor/*  This file is part of the FreeType project, and may only be used,       */
112cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor/*  modified, and distributed under the terms of the FreeType project      */
122cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
132cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor/*  this file you indicate that you have read the license and              */
142cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor/*  understand and accept it fully.                                        */
15e7785040107266d01ebdcc066365f70b7ace371fDouglas Gregor/*                                                                         */
161eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump/***************************************************************************/
172cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor
182cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor
192cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor#ifndef __FTOPTION_H__
200b7489194f9f89fac39d57211c1e7953ae50251fDouglas Gregor#define __FTOPTION_H__
212cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor
22a1ee0c548b8aa4aaf93d1917e304e3da13171a08John McCall
237c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner#include <ft2build.h>
247c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner
2583d63c78810556d26b62ac4cbae2eda6cdd2570cSteve Naroff
2614f79002e58556798e86168c63e48d533287eda5Douglas GregorFT_BEGIN_HEADER
273251ceb90b3fec68e86d6dcfa58836e20a7205c3Douglas Gregor
2814f79002e58556798e86168c63e48d533287eda5Douglas Gregor  /*************************************************************************/
29bd94500d3aa60092fb0f1e90f53fb0d03fa502a8Douglas Gregor  /*                                                                       */
302bec0410d268779f601bd509e0302a500af7ac6aDouglas Gregor  /*                 USER-SELECTABLE CONFIGURATION MACROS                  */
31ab41e63821dc60ad144d0684df8d79a9eef86b75Douglas Gregor  /*                                                                       */
3217fc223395d51be582fc666bb6ea21bd1dff26dcDouglas Gregor  /* This file contains the default configuration macro definitions for    */
3317fc223395d51be582fc666bb6ea21bd1dff26dcDouglas Gregor  /* a standard build of the FreeType library.  There are three ways to    */
342596e429a61602312bdd149786045b8a90cd2d10Daniel Dunbar  /* use this file to build project-specific versions of the library:      */
352cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
3614f79002e58556798e86168c63e48d533287eda5Douglas Gregor  /*  - You can modify this file by hand, but this is not recommended in   */
37b64c19365deab788753d29c9bc881253c3f16f37Douglas Gregor  /*    cases where you would like to build several versions of the        */
383c304bd9ec2b4611572d4cbae9e1727bbecb5dc9Chris Lattner  /*    library from a single source directory.                            */
392cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
402cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*  - You can put a copy of this file in your build directory, more      */
412cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*    precisely in `$BUILD/freetype/config/ftoption.h', where `$BUILD'   */
422cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*    is the name of a directory that is included _before_ the FreeType  */
432cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*    include path during compilation.                                   */
4412b1c7615d4f9a2edc544be499f895f16ac100edChris Lattner  /*                                                                       */
452cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*    The default FreeType Makefiles and Jamfiles use the build          */
46bd21828179a61bd0954b082825cfb8a93345f602Benjamin Kramer  /*    directory `builds/<system>' by default, but you can easily change  */
472cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*    that for your own projects.                                        */
482cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
492cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*  - Copy the file <ft2build.h> to `$BUILD/ft2build.h' and modify it    */
502cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*    slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to       */
512cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*    locate this file during the build.  For example,                   */
522cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
532cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*      #define FT_CONFIG_OPTIONS_H  <myftoptions.h>                     */
541eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump  /*      #include <freetype/config/ftheader.h>                            */
554fed3f47f6b9e31d603c5c2d1f6d8ec2e1241e57Douglas Gregor  /*                                                                       */
562cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*    will use `$BUILD/myftoptions.h' instead of this file for macro     */
572cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*    definitions.                                                       */
582cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
592cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*    Note also that you can similarly pre-define the macro              */
602cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*    FT_CONFIG_MODULES_H used to locate the file listing of the modules */
612cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*    that are statically linked to the library at compile time.  By     */
622cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*    default, this file is <freetype/config/ftmodule.h>.                */
632cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
642cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*  We highly recommend using the third method whenever possible.        */
652cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
662cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*************************************************************************/
672cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor
682cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor
692cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*************************************************************************/
702cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*************************************************************************/
712cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /****                                                                 ****/
722cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /**** 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 ****/
732cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /****                                                                 ****/
742cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*************************************************************************/
752cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*************************************************************************/
762cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor
772cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor
782cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*************************************************************************/
792cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
802cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /* Uncomment the line below if you want to activate sub-pixel rendering  */
812cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /* (a.k.a. LCD rendering, or ClearType) in this build of the library.    */
822cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
832cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /* Note that this feature is covered by several Microsoft patents        */
842cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /* and should not be activated in any default build of the library.      */
852cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
862cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /* This macro has no impact on the FreeType API, only on its             */
872cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /* _implementation_.  For example, using FT_RENDER_MODE_LCD when calling */
882cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /* FT_Render_Glyph still generates a bitmap that is 3 times larger than  */
891eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump  /* the original size; the difference will be that each triplet of        */
902cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /* subpixels has R=G=B.                                                  */
912cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
922cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /* This is done to allow FreeType clients to run unmodified, forcing     */
932cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /* them to display normal gray-level anti-aliased glyphs.                */
942cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
952cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
962cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor
972cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor
982cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*************************************************************************/
992cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
1002cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /* Many compilers provide a non-ANSI 64-bit data type that can be used   */
1012cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /* by FreeType to speed up some computations.  However, this will create */
1022cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /* some problems when compiling the library in strict ANSI mode.         */
1032cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
1041eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump  /* For this reason, the use of 64-bit integers is normally disabled when */
1051eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump  /* the __STDC__ macro is defined.  You can however disable this by       */
1062cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /* defining the macro FT_CONFIG_OPTION_FORCE_INT64 here.                 */
1072cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
1082cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /* For most compilers, this will only create compilation warnings when   */
1092cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /* building the library.                                                 */
1102cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
1112cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /* ObNote: The compiler-specific 64-bit integers are detected in the     */
1120953e767ff7817f97b3ab20896b229891eeff45bJohn McCall  /*         file `ftconfig.h' either statically or through the            */
1132cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*         `configure' script on supported platforms.                    */
1142cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
1152cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor#undef FT_CONFIG_OPTION_FORCE_INT64
1162cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor
1172cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor
1182cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*************************************************************************/
1192cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
1202cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /* If this macro is defined, do not try to use an assembler version of   */
1212cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /* performance-critical functions (e.g. FT_MulFix).  You should only do  */
1222cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /* that to verify that the assembler function works properly, or to      */
1232cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /* execute benchmark tests of the various implementations.               */
1242cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor/* #define FT_CONFIG_OPTION_NO_ASSEMBLER */
1252cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor
1262cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor
1272cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*************************************************************************/
1287e7eb3da052a6d80ddf2377cab0384c798f73f75Douglas Gregor  /*                                                                       */
1297e7eb3da052a6d80ddf2377cab0384c798f73f75Douglas Gregor  /* If this macro is defined, try to use an inlined assembler version of  */
130c9490c000f515c29f200a1215328d8ab9a0f3818Douglas Gregor  /* the `FT_MulFix' function, which is a `hotspot' when loading and       */
1312cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /* hinting glyphs, and which should be executed as fast as possible.     */
1322cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
1332cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /* Note that if your compiler or CPU is not supported, this will default */
1342cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /* to the standard and portable implementation found in `ftcalc.c'.      */
1352cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
1362cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor#define FT_CONFIG_OPTION_INLINE_MULFIX
1372cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor
1382cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor
1392cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*************************************************************************/
1402cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
1412cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /* LZW-compressed file support.                                          */
1422cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
1432cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   FreeType now handles font files that have been compressed with the  */
1442cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   `compress' program.  This is mostly used to parse many of the PCF   */
1452cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   files that come with various X11 distributions.  The implementation */
1462cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   uses NetBSD's `zopen' to partially uncompress the file on the fly   */
1472cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   (see src/lzw/ftgzip.c).                                             */
1482cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
1492cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   Define this macro if you want to enable this `feature'.             */
1502cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
1512cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor#define FT_CONFIG_OPTION_USE_LZW
1522cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor
1532cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor
1542cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*************************************************************************/
1552cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
1562cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /* Gzip-compressed file support.                                         */
1572cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
1582cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   FreeType now handles font files that have been compressed with the  */
1592cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   `gzip' program.  This is mostly used to parse many of the PCF files */
1602cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   that come with XFree86.  The implementation uses `zlib' to          */
161465226e23a3008bd68973513dda1f9e3cd27dbddSebastian Redl  /*   partially uncompress the file on the fly (see src/gzip/ftgzip.c).   */
162465226e23a3008bd68973513dda1f9e3cd27dbddSebastian Redl  /*                                                                       */
163465226e23a3008bd68973513dda1f9e3cd27dbddSebastian Redl  /*   Define this macro if you want to enable this `feature'.  See also   */
164465226e23a3008bd68973513dda1f9e3cd27dbddSebastian Redl  /*   the macro FT_CONFIG_OPTION_SYSTEM_ZLIB below.                       */
165465226e23a3008bd68973513dda1f9e3cd27dbddSebastian Redl  /*                                                                       */
1662cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor#define FT_CONFIG_OPTION_USE_ZLIB
1672cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor
1682cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor
1692cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*************************************************************************/
1702cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
1712cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /* ZLib library selection                                                */
1722cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
1732cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   This macro is only used when FT_CONFIG_OPTION_USE_ZLIB is defined.  */
1742cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   It allows FreeType's `ftgzip' component to link to the system's     */
175c9490c000f515c29f200a1215328d8ab9a0f3818Douglas Gregor  /*   installation of the ZLib library.  This is useful on systems like   */
1762cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   Unix or VMS where it generally is already available.                */
1772cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
1782cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   If you let it undefined, the component will use its own copy        */
1792cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   of the zlib sources instead.  These have been modified to be        */
1802cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   included directly within the component and *not* export external    */
1812cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   function names.  This allows you to link any program with FreeType  */
1822cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   _and_ ZLib without linking conflicts.                               */
1832cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
184395b475a4474f1c7574d927ad142ca0c7997cbcaAnders Carlsson  /*   Do not #undef this macro here since the build system might define   */
185395b475a4474f1c7574d927ad142ca0c7997cbcaAnders Carlsson  /*   it for certain configurations only.                                 */
186395b475a4474f1c7574d927ad142ca0c7997cbcaAnders Carlsson  /*                                                                       */
187395b475a4474f1c7574d927ad142ca0c7997cbcaAnders Carlsson/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */
188395b475a4474f1c7574d927ad142ca0c7997cbcaAnders Carlsson
1892cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor
1902cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*************************************************************************/
1911eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump  /*                                                                       */
1922cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /* DLL export compilation                                                */
1932cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
1942cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   When compiling FreeType as a DLL, some systems/compilers need a     */
1952cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   special keyword in front OR after the return type of function       */
1962cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   declarations.                                                       */
1972cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
1982cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   Two macros are used within the FreeType source code to define       */
1992cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   exported library functions: FT_EXPORT and FT_EXPORT_DEF.            */
2002cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
2012cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*     FT_EXPORT( return_type )                                          */
2022cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
2032cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*       is used in a function declaration, as in                        */
2042cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
2057da2431c23ef1ee8acb114e39692246e1801afc2John McCall  /*         FT_EXPORT( FT_Error )                                         */
2067da2431c23ef1ee8acb114e39692246e1801afc2John McCall  /*         FT_Init_FreeType( FT_Library*  alibrary );                    */
2077da2431c23ef1ee8acb114e39692246e1801afc2John McCall  /*                                                                       */
2087da2431c23ef1ee8acb114e39692246e1801afc2John McCall  /*                                                                       */
2097da2431c23ef1ee8acb114e39692246e1801afc2John McCall  /*     FT_EXPORT_DEF( return_type )                                      */
2107da2431c23ef1ee8acb114e39692246e1801afc2John McCall  /*                                                                       */
2111eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump  /*       is used in a function definition, as in                         */
21249a832bd499d6f61c23655f1fac99f0dd229756eJohn McCall  /*                                                                       */
21349a832bd499d6f61c23655f1fac99f0dd229756eJohn McCall  /*         FT_EXPORT_DEF( FT_Error )                                     */
21449a832bd499d6f61c23655f1fac99f0dd229756eJohn McCall  /*         FT_Init_FreeType( FT_Library*  alibrary )                     */
21549a832bd499d6f61c23655f1fac99f0dd229756eJohn McCall  /*         {                                                             */
21649a832bd499d6f61c23655f1fac99f0dd229756eJohn McCall  /*           ... some code ...                                           */
21749a832bd499d6f61c23655f1fac99f0dd229756eJohn McCall  /*           return FT_Err_Ok;                                           */
21849a832bd499d6f61c23655f1fac99f0dd229756eJohn McCall  /*         }                                                             */
21949a832bd499d6f61c23655f1fac99f0dd229756eJohn McCall  /*                                                                       */
2202cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   You can provide your own implementation of FT_EXPORT and            */
2212cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   FT_EXPORT_DEF here if you want.  If you leave them undefined, they  */
2226a2bfb2ead4489db37e80b696a6d7cc073c76fd7Douglas Gregor  /*   will be later automatically defined as `extern return_type' to      */
2232cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   allow normal compilation.                                           */
2242cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
2252cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   Do not #undef these macros here since the build system might define */
2262cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   them for certain configurations only.                               */
2276a2bfb2ead4489db37e80b696a6d7cc073c76fd7Douglas Gregor  /*                                                                       */
2282cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor/* #define FT_EXPORT(x)      extern x */
2292cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor/* #define FT_EXPORT_DEF(x)  x */
2302cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor
2312cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor
2322cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*************************************************************************/
2332cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
234446ee4eb4fc4c705a59365252df7a5c253daafa1Steve Naroff  /* Glyph Postscript Names handling                                       */
235446ee4eb4fc4c705a59365252df7a5c253daafa1Steve Naroff  /*                                                                       */
236446ee4eb4fc4c705a59365252df7a5c253daafa1Steve Naroff  /*   By default, FreeType 2 is compiled with the `psnames' module.  This */
237c15cb2af27514ecc879daba9aa01389c5203685dSteve Naroff  /*   module is in charge of converting a glyph name string into a        */
2382cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   Unicode value, or return a Macintosh standard glyph name for the    */
2392cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   use with the TrueType `post' table.                                 */
240d1b3c2dd5bc1f3103bee6137957aa7c5f8f2f0bcSteve Naroff  /*                                                                       */
241d1b3c2dd5bc1f3103bee6137957aa7c5f8f2f0bcSteve Naroff  /*   Undefine this macro if you do not want `psnames' compiled in your   */
2421eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump  /*   build of FreeType.  This has the following effects:                 */
2432cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*                                                                       */
244d1b3c2dd5bc1f3103bee6137957aa7c5f8f2f0bcSteve Naroff  /*   - The TrueType driver will provide its own set of glyph names,      */
245446ee4eb4fc4c705a59365252df7a5c253daafa1Steve Naroff  /*     if you build it to support postscript names in the TrueType       */
246446ee4eb4fc4c705a59365252df7a5c253daafa1Steve Naroff  /*     `post' table.                                                     */
247d1b3c2dd5bc1f3103bee6137957aa7c5f8f2f0bcSteve Naroff  /*                                                                       */
2482cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*   - The Type 1 driver will not be able to synthesize a Unicode        */
2492cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*     charmap out of the glyphs found in the fonts.                     */
250a1ee0c548b8aa4aaf93d1917e304e3da13171a08John McCall  /*                                                                       */
251a1ee0c548b8aa4aaf93d1917e304e3da13171a08John McCall  /*   You would normally undefine this configuration macro when building  */
252a1ee0c548b8aa4aaf93d1917e304e3da13171a08John McCall  /*   a version of FreeType that doesn't contain a Type 1 or CFF driver.  */
253a1ee0c548b8aa4aaf93d1917e304e3da13171a08John McCall  /*                                                                       */
254a1ee0c548b8aa4aaf93d1917e304e3da13171a08John McCall#define FT_CONFIG_OPTION_POSTSCRIPT_NAMES
255a1ee0c548b8aa4aaf93d1917e304e3da13171a08John McCall
256a1ee0c548b8aa4aaf93d1917e304e3da13171a08John McCall
257a1ee0c548b8aa4aaf93d1917e304e3da13171a08John McCall  /*************************************************************************/
258a1ee0c548b8aa4aaf93d1917e304e3da13171a08John McCall  /*                                                                       */
259a1ee0c548b8aa4aaf93d1917e304e3da13171a08John McCall  /* Postscript Names to Unicode Values support                            */
26051bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*                                                                       */
261a1ee0c548b8aa4aaf93d1917e304e3da13171a08John McCall  /*   By default, FreeType 2 is built with the `PSNames' module compiled  */
26251bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   in.  Among other things, the module is used to convert a glyph name */
263a1ee0c548b8aa4aaf93d1917e304e3da13171a08John McCall  /*   into a Unicode value.  This is especially useful in order to        */
264a1ee0c548b8aa4aaf93d1917e304e3da13171a08John McCall  /*   synthesize on the fly a Unicode charmap from the CFF/Type 1 driver  */
26551bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   through a big table named the `Adobe Glyph List' (AGL).             */
26651bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*                                                                       */
267a1ee0c548b8aa4aaf93d1917e304e3da13171a08John McCall  /*   Undefine this macro if you do not want the Adobe Glyph List         */
268a1ee0c548b8aa4aaf93d1917e304e3da13171a08John McCall  /*   compiled in your `PSNames' module.  The Type 1 driver will not be   */
269a1ee0c548b8aa4aaf93d1917e304e3da13171a08John McCall  /*   able to synthesize a Unicode charmap out of the glyphs found in the */
270a1ee0c548b8aa4aaf93d1917e304e3da13171a08John McCall  /*   fonts.                                                              */
27151bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*                                                                       */
27251bd803fbdade51d674598ed45da3d54190a656cJohn McCall#define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
27351bd803fbdade51d674598ed45da3d54190a656cJohn McCall
27451bd803fbdade51d674598ed45da3d54190a656cJohn McCall
27551bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*************************************************************************/
27651bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*                                                                       */
27751bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /* Support for Mac fonts                                                 */
27851bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*                                                                       */
27951bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   Define this macro if you want support for outline fonts in Mac      */
28051bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   format (mac dfont, mac resource, macbinary containing a mac         */
28151bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   resource) on non-Mac platforms.                                     */
28251bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*                                                                       */
28351bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   Note that the `FOND' resource isn't checked.                        */
28451bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*                                                                       */
28551bd803fbdade51d674598ed45da3d54190a656cJohn McCall#define FT_CONFIG_OPTION_MAC_FONTS
28651bd803fbdade51d674598ed45da3d54190a656cJohn McCall
28751bd803fbdade51d674598ed45da3d54190a656cJohn McCall
28851bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*************************************************************************/
28951bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*                                                                       */
29051bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /* Guessing methods to access embedded resource forks                    */
29151bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*                                                                       */
29251bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   Enable extra Mac fonts support on non-Mac platforms (e.g.           */
29351bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   GNU/Linux).                                                         */
29451bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*                                                                       */
29551bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   Resource forks which include fonts data are stored sometimes in     */
29651bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   locations which users or developers don't expected.  In some cases, */
29751bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   resource forks start with some offset from the head of a file.  In  */
29851bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   other cases, the actual resource fork is stored in file different   */
29951bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   from what the user specifies.  If this option is activated,         */
30051bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   FreeType tries to guess whether such offsets or different file      */
30151bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   names must be used.                                                 */
30251bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*                                                                       */
30351bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   Note that normal, direct access of resource forks is controlled via */
30451bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   the FT_CONFIG_OPTION_MAC_FONTS option.                              */
30551bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*                                                                       */
30651bd803fbdade51d674598ed45da3d54190a656cJohn McCall#ifdef FT_CONFIG_OPTION_MAC_FONTS
30751bd803fbdade51d674598ed45da3d54190a656cJohn McCall#define FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK
30851bd803fbdade51d674598ed45da3d54190a656cJohn McCall#endif
30951bd803fbdade51d674598ed45da3d54190a656cJohn McCall
31051bd803fbdade51d674598ed45da3d54190a656cJohn McCall
31151bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*************************************************************************/
31251bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*                                                                       */
31351bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /* Allow the use of FT_Incremental_Interface to load typefaces that      */
31451bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /* contain no glyph data, but supply it via a callback function.         */
31551bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /* This allows FreeType to be used with the PostScript language, using   */
31651bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /* the GhostScript interpreter.                                          */
31751bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*                                                                       */
31851bd803fbdade51d674598ed45da3d54190a656cJohn McCall/* #define FT_CONFIG_OPTION_INCREMENTAL */
31951bd803fbdade51d674598ed45da3d54190a656cJohn McCall
32051bd803fbdade51d674598ed45da3d54190a656cJohn McCall
32151bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*************************************************************************/
32251bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*                                                                       */
32351bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /* The size in bytes of the render pool used by the scan-line converter  */
32451bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /* to do all of its work.                                                */
32551bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*                                                                       */
32651bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /* This must be greater than 4KByte if you use FreeType to rasterize     */
32751bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /* glyphs; otherwise, you may set it to zero to avoid unnecessary        */
32851bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /* allocation of the render pool.                                        */
32951bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*                                                                       */
33051bd803fbdade51d674598ed45da3d54190a656cJohn McCall#define FT_RENDER_POOL_SIZE  16384L
33151bd803fbdade51d674598ed45da3d54190a656cJohn McCall
33251bd803fbdade51d674598ed45da3d54190a656cJohn McCall
33351bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*************************************************************************/
33451bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*                                                                       */
33551bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /* FT_MAX_MODULES                                                        */
33651bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*                                                                       */
33751bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   The maximum number of modules that can be registered in a single    */
33851bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   FreeType library object.  32 is the default.                        */
33951bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*                                                                       */
34051bd803fbdade51d674598ed45da3d54190a656cJohn McCall#define FT_MAX_MODULES  32
34151bd803fbdade51d674598ed45da3d54190a656cJohn McCall
34251bd803fbdade51d674598ed45da3d54190a656cJohn McCall
34351bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*************************************************************************/
34451bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*                                                                       */
34551bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /* Debug level                                                           */
34651bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*                                                                       */
34751bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   FreeType can be compiled in debug or trace mode.  In debug mode,    */
34851bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   errors are reported through the `ftdebug' component.  In trace      */
34951bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   mode, additional messages are sent to the standard output during    */
35051bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   execution.                                                          */
351a1ee0c548b8aa4aaf93d1917e304e3da13171a08John McCall  /*                                                                       */
35251bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   Define FT_DEBUG_LEVEL_ERROR to build the library in debug mode.     */
35351bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   Define FT_DEBUG_LEVEL_TRACE to build it in trace mode.              */
354a1ee0c548b8aa4aaf93d1917e304e3da13171a08John McCall  /*                                                                       */
35551bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   Don't define any of these macros to compile in `release' mode!      */
35651bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*                                                                       */
357a1ee0c548b8aa4aaf93d1917e304e3da13171a08John McCall  /*   Do not #undef these macros here since the build system might define */
35851bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   them for certain configurations only.                               */
35951bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*                                                                       */
360a1ee0c548b8aa4aaf93d1917e304e3da13171a08John McCall/* #define FT_DEBUG_LEVEL_ERROR */
36151bd803fbdade51d674598ed45da3d54190a656cJohn McCall/* #define FT_DEBUG_LEVEL_TRACE */
36251bd803fbdade51d674598ed45da3d54190a656cJohn McCall
363a1ee0c548b8aa4aaf93d1917e304e3da13171a08John McCall
36449a832bd499d6f61c23655f1fac99f0dd229756eJohn McCall  /*************************************************************************/
36549a832bd499d6f61c23655f1fac99f0dd229756eJohn McCall  /*                                                                       */
36649a832bd499d6f61c23655f1fac99f0dd229756eJohn McCall  /* Memory Debugging                                                      */
36749a832bd499d6f61c23655f1fac99f0dd229756eJohn McCall  /*                                                                       */
36851bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   FreeType now comes with an integrated memory debugger that is       */
36951bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   capable of detecting simple errors like memory leaks or double      */
370833ca991c1bfc967f0995974ca86f66ba1f666b5John McCall  /*   deletes.  To compile it within your build of the library, you       */
371833ca991c1bfc967f0995974ca86f66ba1f666b5John McCall  /*   should define FT_DEBUG_MEMORY here.                                 */
372833ca991c1bfc967f0995974ca86f66ba1f666b5John McCall  /*                                                                       */
373833ca991c1bfc967f0995974ca86f66ba1f666b5John McCall  /*   Note that the memory debugger is only activated at runtime when     */
374833ca991c1bfc967f0995974ca86f66ba1f666b5John McCall  /*   when the _environment_ variable `FT2_DEBUG_MEMORY' is defined also! */
375a1ee0c548b8aa4aaf93d1917e304e3da13171a08John McCall  /*                                                                       */
37651bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   Do not #undef this macro here since the build system might define   */
37751bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   it for certain configurations only.                                 */
378a1ee0c548b8aa4aaf93d1917e304e3da13171a08John McCall  /*                                                                       */
37951bd803fbdade51d674598ed45da3d54190a656cJohn McCall/* #define FT_DEBUG_MEMORY */
38051bd803fbdade51d674598ed45da3d54190a656cJohn McCall
381a1ee0c548b8aa4aaf93d1917e304e3da13171a08John McCall
38251bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*************************************************************************/
38351bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*                                                                       */
38454e14c4db764c0636160d26c5bbf491637c83a76John McCall  /* Module errors                                                         */
38554e14c4db764c0636160d26c5bbf491637c83a76John McCall  /*                                                                       */
38654e14c4db764c0636160d26c5bbf491637c83a76John McCall  /*   If this macro is set (which is _not_ the default), the higher byte  */
38754e14c4db764c0636160d26c5bbf491637c83a76John McCall  /*   of an error code gives the module in which the error has occurred,  */
388a1ee0c548b8aa4aaf93d1917e304e3da13171a08John McCall  /*   while the lower byte is the real error code.                        */
38951bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*                                                                       */
39051bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   Setting this macro makes sense for debugging purposes only, since   */
39151bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   it would break source compatibility of certain programs that use    */
39251bd803fbdade51d674598ed45da3d54190a656cJohn McCall  /*   FreeType 2.                                                         */
39354e14c4db764c0636160d26c5bbf491637c83a76John McCall  /*                                                                       */
39454e14c4db764c0636160d26c5bbf491637c83a76John McCall  /*   More details can be found in the files ftmoderr.h and fterrors.h.   */
39554e14c4db764c0636160d26c5bbf491637c83a76John McCall  /*                                                                       */
39654e14c4db764c0636160d26c5bbf491637c83a76John McCall#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS
39754e14c4db764c0636160d26c5bbf491637c83a76John McCall
398a1ee0c548b8aa4aaf93d1917e304e3da13171a08John McCall
399a1ee0c548b8aa4aaf93d1917e304e3da13171a08John McCall
4004dcf151a555ff51e4d643e8e6eeb80f121d11d1bChris Lattner  /*************************************************************************/
4012cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /*************************************************************************/
4022cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /****                                                                 ****/
4032cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  /****        S F N T   D R I V E R    C O N F I G U R A T I O N       ****/
404b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /****                                                                 ****/
405b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*************************************************************************/
406b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*************************************************************************/
407b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner
408b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner
409b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*************************************************************************/
410b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*                                                                       */
411b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support       */
412b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* embedded bitmaps in all formats using the SFNT module (namely         */
413b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* TrueType & OpenType).                                                 */
414b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*                                                                       */
415b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS
416b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner
417b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner
418b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*************************************************************************/
419b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*                                                                       */
420b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* Define TT_CONFIG_OPTION_POSTSCRIPT_NAMES if you want to be able to    */
421b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* load and enumerate the glyph Postscript names in a TrueType or        */
422b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* OpenType file.                                                        */
423b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*                                                                       */
424b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* Note that when you do not compile the `PSNames' module by undefining  */
425b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* the above FT_CONFIG_OPTION_POSTSCRIPT_NAMES, the `sfnt' module will   */
426b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* contain additional code used to read the PS Names table from a font.  */
4270558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /*                                                                       */
4280558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /* (By default, the module uses `PSNames' to extract glyph names.)       */
4290558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /*                                                                       */
4300558df2da807646e65d4fa290f4e92114af1a746Chris Lattner#define TT_CONFIG_OPTION_POSTSCRIPT_NAMES
4310558df2da807646e65d4fa290f4e92114af1a746Chris Lattner
4320558df2da807646e65d4fa290f4e92114af1a746Chris Lattner
4330558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /*************************************************************************/
4340558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /*                                                                       */
4350558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /* Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to       */
4360558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /* access the internal name table in a SFNT-based format like TrueType   */
4370558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /* or OpenType.  The name table contains various strings used to         */
4380558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /* describe the font, like family name, copyright, version, etc.  It     */
4390558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /* does not contain any glyph name though.                               */
4400558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /*                                                                       */
4410558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /* Accessing SFNT names is done through the functions declared in        */
4420558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /* `freetype/ftnames.h'.                                                 */
4430558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /*                                                                       */
4440558df2da807646e65d4fa290f4e92114af1a746Chris Lattner#define TT_CONFIG_OPTION_SFNT_NAMES
4450558df2da807646e65d4fa290f4e92114af1a746Chris Lattner
4460558df2da807646e65d4fa290f4e92114af1a746Chris Lattner
4470558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /*************************************************************************/
4480558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /*                                                                       */
4490558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /* TrueType CMap support                                                 */
4500558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /*                                                                       */
4510558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /*   Here you can fine-tune which TrueType CMap table format shall be    */
4520558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /*   supported.                                                          */
4530558df2da807646e65d4fa290f4e92114af1a746Chris Lattner#define TT_CONFIG_CMAP_FORMAT_0
4540558df2da807646e65d4fa290f4e92114af1a746Chris Lattner#define TT_CONFIG_CMAP_FORMAT_2
4550558df2da807646e65d4fa290f4e92114af1a746Chris Lattner#define TT_CONFIG_CMAP_FORMAT_4
4560558df2da807646e65d4fa290f4e92114af1a746Chris Lattner#define TT_CONFIG_CMAP_FORMAT_6
4570558df2da807646e65d4fa290f4e92114af1a746Chris Lattner#define TT_CONFIG_CMAP_FORMAT_8
4580558df2da807646e65d4fa290f4e92114af1a746Chris Lattner#define TT_CONFIG_CMAP_FORMAT_10
4590558df2da807646e65d4fa290f4e92114af1a746Chris Lattner#define TT_CONFIG_CMAP_FORMAT_12
4600558df2da807646e65d4fa290f4e92114af1a746Chris Lattner#define TT_CONFIG_CMAP_FORMAT_14
4610558df2da807646e65d4fa290f4e92114af1a746Chris Lattner
4620558df2da807646e65d4fa290f4e92114af1a746Chris Lattner
4630558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /*************************************************************************/
4640558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /*************************************************************************/
4650558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /****                                                                 ****/
4660558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /****    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   ****/
4670558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /****                                                                 ****/
4680558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /*************************************************************************/
4690558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /*************************************************************************/
4700558df2da807646e65d4fa290f4e92114af1a746Chris Lattner
4710558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /*************************************************************************/
4720558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /*                                                                       */
4730558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile   */
4740558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /* a bytecode interpreter in the TrueType driver.  Note that there are   */
4750558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /* important patent issues related to the use of the interpreter.        */
4760558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /*                                                                       */
4770558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /* By undefining this, you will only compile the code necessary to load  */
4780558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /* TrueType glyphs without hinting.                                      */
4790558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /*                                                                       */
4800558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /*   Do not #undef this macro here, since the build system might         */
4810558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /*   define it for certain configurations only.                          */
4820558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /*                                                                       */
4830558df2da807646e65d4fa290f4e92114af1a746Chris Lattner/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
4840558df2da807646e65d4fa290f4e92114af1a746Chris Lattner
4850558df2da807646e65d4fa290f4e92114af1a746Chris Lattner
4860558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /*************************************************************************/
4870558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /*                                                                       */
4880558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version  */
4890558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /* of the TrueType bytecode interpreter is used that doesn't implement   */
4900558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /* any of the patented opcodes and algorithms.  Note that the            */
4910558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /* TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* if you define  */
4920558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, either define  */
4930558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER or                              */
4940558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time.    */
4950558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /*                                                                       */
4960558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /* This macro is only useful for a small number of font files (mostly    */
4970558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /* for Asian scripts) that require bytecode interpretation to properly   */
4980558df2da807646e65d4fa290f4e92114af1a746Chris Lattner  /* load glyphs.  For all other fonts, this produces unpleasant results,  */
499b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* thus the unpatented interpreter is never used to load glyphs from     */
5001eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump  /* TrueType fonts unless one of the following two options is used.       */
501b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*                                                                       */
502b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*   - The unpatented interpreter is explicitly activated by the user    */
503b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*     through the FT_PARAM_TAG_UNPATENTED_HINTING parameter tag         */
5041eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump  /*     when opening the FT_Face.                                         */
5052f4efd10c805cb779618c1a22a35eb07b5043c4eChris Lattner  /*                                                                       */
506b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*   - FreeType detects that the FT_Face corresponds to one of the       */
5071eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump  /*     `trick' fonts (e.g., `Mingliu') it knows about.  The font engine  */
508b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*     contains a hard-coded list of font names and other matching       */
5092f4efd10c805cb779618c1a22a35eb07b5043c4eChris Lattner  /*     parameters (see function `tt_face_init' in file                   */
51051e774d42269e3b22d746184c0b9076fc13b32e6Zhongxing Xu  /*     `src/truetype/ttobjs.c').                                         */
511b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*                                                                       */
512b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* Here a sample code snippet for using FT_PARAM_TAG_UNPATENTED_HINTING. */
513b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*                                                                       */
514ab41e63821dc60ad144d0684df8d79a9eef86b75Douglas Gregor  /*   {                                                                   */
515b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*     FT_Parameter  parameter;                                          */
516b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*     FT_Open_Args  open_args;                                          */
517b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*                                                                       */
518b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*                                                                       */
519b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*     parameter.tag = FT_PARAM_TAG_UNPATENTED_HINTING;                  */
520b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*                                                                       */
521b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*     open_args.flags      = FT_OPEN_PATHNAME | FT_OPEN_PARAMS;         */
522b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*     open_args.pathname   = my_font_pathname;                          */
523b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*     open_args.num_params = 1;                                         */
524b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*     open_args.params     = &parameter;                                */
5257f94b0b0c6791013d2f72ced9b4bedd3b23673a6Douglas Gregor  /*                                                                       */
5267f94b0b0c6791013d2f72ced9b4bedd3b23673a6Douglas Gregor  /*     error = FT_Open_Face( library, &open_args, index, &face );        */
5274fed3f47f6b9e31d603c5c2d1f6d8ec2e1241e57Douglas Gregor  /*     ...                                                               */
528b81c17092039f39be60e9656a37cffbdf2e2c783Douglas Gregor  /*   }                                                                   */
5292e22253e03e175144aeb9d13350a12fd83f858beDouglas Gregor  /*                                                                       */
530445e23e9b909ec8e21303c7dd82c90b72fc09ac4Douglas Gregor#define TT_CONFIG_OPTION_UNPATENTED_HINTING
531445e23e9b909ec8e21303c7dd82c90b72fc09ac4Douglas Gregor
532b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner
5332f4efd10c805cb779618c1a22a35eb07b5043c4eChris Lattner  /*************************************************************************/
534b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*                                                                       */
535b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType    */
536b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* bytecode interpreter with a huge switch statement, rather than a call */
537b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* table.  This results in smaller and faster code for a number of       */
538b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* architectures.                                                        */
539b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*                                                                       */
5401eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump  /* Note however that on some compiler/processor combinations, undefining */
541b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* this macro will generate faster, though larger, code.                 */
5422f4efd10c805cb779618c1a22a35eb07b5043c4eChris Lattner  /*                                                                       */
543b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner#define TT_CONFIG_OPTION_INTERPRETER_SWITCH
544b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner
545b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner
546b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*************************************************************************/
54761d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor  /*                                                                       */
54861d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor  /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the        */
549b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* TrueType glyph loader to use Apple's definition of how to handle      */
550b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* component offsets in composite glyphs.                                */
551b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*                                                                       */
552b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* Apple and MS disagree on the default behavior of component offsets    */
553b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* in composites.  Apple says that they should be scaled by the scaling  */
554b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* factors in the transformation matrix (roughly, it's more complex)     */
555b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* while MS says they should not.  OpenType defines two bits in the      */
556b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* composite flags array which can be used to disambiguate, but old      */
557b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* fonts will not have them.                                             */
558b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*                                                                       */
559b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*   http://partners.adobe.com/asn/developer/opentype/glyf.html          */
560b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*   http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html                 */
561b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*                                                                       */
562b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
563b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner
564b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner
565b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*************************************************************************/
566b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*                                                                       */
567b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* Define TT_CONFIG_OPTION_GX_VAR_SUPPORT if you want to include         */
568b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* support for Apple's distortable font technology (fvar, gvar, cvar,    */
569b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* and avar tables).  This has many similarities to Type 1 Multiple      */
570d1b3c2dd5bc1f3103bee6137957aa7c5f8f2f0bcSteve Naroff  /* Masters support.                                                      */
5710ff8cda4442cff571aba1be91dd16f64a0bf16aaChris Lattner  /*                                                                       */
5720ff8cda4442cff571aba1be91dd16f64a0bf16aaChris Lattner#define TT_CONFIG_OPTION_GX_VAR_SUPPORT
5730ff8cda4442cff571aba1be91dd16f64a0bf16aaChris Lattner
5740ff8cda4442cff571aba1be91dd16f64a0bf16aaChris Lattner
5750ff8cda4442cff571aba1be91dd16f64a0bf16aaChris Lattner  /*************************************************************************/
5760ff8cda4442cff571aba1be91dd16f64a0bf16aaChris Lattner  /*                                                                       */
5770ff8cda4442cff571aba1be91dd16f64a0bf16aaChris Lattner  /* Define TT_CONFIG_OPTION_BDF if you want to include support for        */
5780ff8cda4442cff571aba1be91dd16f64a0bf16aaChris Lattner  /* an embedded `BDF ' table within SFNT-based bitmap formats.            */
5790ff8cda4442cff571aba1be91dd16f64a0bf16aaChris Lattner  /*                                                                       */
5800ff8cda4442cff571aba1be91dd16f64a0bf16aaChris Lattner#define TT_CONFIG_OPTION_BDF
5810ff8cda4442cff571aba1be91dd16f64a0bf16aaChris Lattner
5820ff8cda4442cff571aba1be91dd16f64a0bf16aaChris Lattner
5830ff8cda4442cff571aba1be91dd16f64a0bf16aaChris Lattner  /*************************************************************************/
5840ff8cda4442cff571aba1be91dd16f64a0bf16aaChris Lattner  /*************************************************************************/
5850ff8cda4442cff571aba1be91dd16f64a0bf16aaChris Lattner  /****                                                                 ****/
5860ff8cda4442cff571aba1be91dd16f64a0bf16aaChris Lattner  /****      T Y P E 1   D R I V E R    C O N F I G U R A T I O N       ****/
5870ff8cda4442cff571aba1be91dd16f64a0bf16aaChris Lattner  /****                                                                 ****/
5880ff8cda4442cff571aba1be91dd16f64a0bf16aaChris Lattner  /*************************************************************************/
5890ff8cda4442cff571aba1be91dd16f64a0bf16aaChris Lattner  /*************************************************************************/
5900ff8cda4442cff571aba1be91dd16f64a0bf16aaChris Lattner
591b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner
592b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*************************************************************************/
5930ff8cda4442cff571aba1be91dd16f64a0bf16aaChris Lattner  /*                                                                       */
594b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* T1_MAX_DICT_DEPTH is the maximal depth of nest dictionaries and       */
5950ff8cda4442cff571aba1be91dd16f64a0bf16aaChris Lattner  /* arrays in the Type 1 stream (see t1load.c).  A minimum of 4 is        */
5960ff8cda4442cff571aba1be91dd16f64a0bf16aaChris Lattner  /* required.                                                             */
5970ff8cda4442cff571aba1be91dd16f64a0bf16aaChris Lattner  /*                                                                       */
5980ff8cda4442cff571aba1be91dd16f64a0bf16aaChris Lattner#define T1_MAX_DICT_DEPTH  5
59961d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor
6000558df2da807646e65d4fa290f4e92114af1a746Chris Lattner
601b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*************************************************************************/
602b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*                                                                       */
603b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine   */
604b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /* calls during glyph loading.                                           */
605b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /*                                                                       */
606e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor#define T1_MAX_SUBRS_CALLS  16
607e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor
6081eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump
609e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /*************************************************************************/
610e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /*                                                                       */
611e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity.  A     */
612e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /* minimum of 16 is required.                                            */
613e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /*                                                                       */
614e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /* The Chinese font MingTiEG-Medium (CNS 11643 character set) needs 256. */
615e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /*                                                                       */
6161eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump#define T1_MAX_CHARSTRINGS_OPERANDS  256
617e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor
618e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor
6191eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump  /*************************************************************************/
620e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /*                                                                       */
621e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /* Define this configuration macro if you want to prevent the            */
6221eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump  /* compilation of `t1afm', which is in charge of reading Type 1 AFM      */
623e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /* files into an existing face.  Note that if set, the T1 driver will be */
624e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /* unable to produce kerning distances.                                  */
625e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /*                                                                       */
626e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor#undef T1_CONFIG_OPTION_NO_AFM
627e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor
6281eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump
629e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /*************************************************************************/
630e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /*                                                                       */
631e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /* Define this configuration macro if you want to prevent the            */
6321eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump  /* compilation of the Multiple Masters font support in the Type 1        */
633e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /* driver.                                                               */
634e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /*                                                                       */
635e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor#undef T1_CONFIG_OPTION_NO_MM_SUPPORT
636e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor
637e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor
6381eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump  /*************************************************************************/
639e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /*************************************************************************/
640e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /****                                                                 ****/
641b145b1e9de866e79fb386e4a074dc0b41853acf3Chris Lattner  /****    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     ****/
642ab41e63821dc60ad144d0684df8d79a9eef86b75Douglas Gregor  /****                                                                 ****/
643e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /*************************************************************************/
6442bec0410d268779f601bd509e0302a500af7ac6aDouglas Gregor  /*************************************************************************/
645b64c19365deab788753d29c9bc881253c3f16f37Douglas Gregor
646e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor
647e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /*************************************************************************/
648e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /*                                                                       */
649e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /* Compile autofit module with CJK (Chinese, Japanese, Korean) script    */
650e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /* support.                                                              */
651e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /*                                                                       */
652e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor#define AF_CONFIG_OPTION_CJK
653e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor
654e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /*************************************************************************/
655e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /*                                                                       */
656e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /* Compile autofit module with Indic script support.                     */
6571eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump  /*                                                                       */
658e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor#define AF_CONFIG_OPTION_INDIC
659e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor
660e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /* */
661e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor
662e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor
663e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor  /*
664e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor   * Define this variable if you want to keep the layout of internal
6651752ee4849f4c37f5e03193e658be92650b0e65aDaniel Dunbar   * structures that was used prior to FreeType 2.2.  This also compiles in
666ec312a1f0557b1d27f3eb6cf49acbf7e72696422Daniel Dunbar   * a few obsolete functions to avoid linking problems on typical Unix
6671eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump   * distributions.
668b64c19365deab788753d29c9bc881253c3f16f37Douglas Gregor   *
669b64c19365deab788753d29c9bc881253c3f16f37Douglas Gregor   * For embedded systems or building a new distribution from scratch, it
670b64c19365deab788753d29c9bc881253c3f16f37Douglas Gregor   * is recommended to disable the macro since it reduces the library's code
671b64c19365deab788753d29c9bc881253c3f16f37Douglas Gregor   * size and activates a few memory-saving optimizations as well.
672b64c19365deab788753d29c9bc881253c3f16f37Douglas Gregor   */
673b64c19365deab788753d29c9bc881253c3f16f37Douglas Gregor#define FT_CONFIG_OPTION_OLD_INTERNALS
674b64c19365deab788753d29c9bc881253c3f16f37Douglas Gregor
675b64c19365deab788753d29c9bc881253c3f16f37Douglas Gregor
676b64c19365deab788753d29c9bc881253c3f16f37Douglas Gregor  /*
677b64c19365deab788753d29c9bc881253c3f16f37Douglas Gregor   * This macro is defined if either unpatented or native TrueType
6781eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump   * hinting is requested by the definitions above.
679b64c19365deab788753d29c9bc881253c3f16f37Douglas Gregor   */
680b64c19365deab788753d29c9bc881253c3f16f37Douglas Gregor#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
681d57a7ef9252964bc6c8471451d7bd395b0520cb8Chris Lattner#define  TT_USE_BYTECODE_INTERPRETER
682d57a7ef9252964bc6c8471451d7bd395b0520cb8Chris Lattner#undef   TT_CONFIG_OPTION_UNPATENTED_HINTING
683b64c19365deab788753d29c9bc881253c3f16f37Douglas Gregor#elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING
684d57a7ef9252964bc6c8471451d7bd395b0520cb8Chris Lattner#define  TT_USE_BYTECODE_INTERPRETER
685b64c19365deab788753d29c9bc881253c3f16f37Douglas Gregor#endif
686b64c19365deab788753d29c9bc881253c3f16f37Douglas Gregor
687e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas GregorFT_END_HEADER
6881eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump
689e650c8c3bca2f58cad8ffa8aab63126d26e890cdDouglas Gregor
690b64c19365deab788753d29c9bc881253c3f16f37Douglas Gregor#endif /* __FTOPTION_H__ */
691b64c19365deab788753d29c9bc881253c3f16f37Douglas Gregor
692ec312a1f0557b1d27f3eb6cf49acbf7e72696422Daniel Dunbar
693b64c19365deab788753d29c9bc881253c3f16f37Douglas Gregor/* END */
694445e23e9b909ec8e21303c7dd82c90b72fc09ac4Douglas Gregor