ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

ftoption.h
Go to the documentation of this file.
00001 /***************************************************************************/
00002 /*                                                                         */
00003 /*  ftoption.h (for development)                                           */
00004 /*                                                                         */
00005 /*    User-selectable configuration macros (specification only).           */
00006 /*                                                                         */
00007 /*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,   */
00008 /*            2010 by                                                      */
00009 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
00010 /*                                                                         */
00011 /*  This file is part of the FreeType project, and may only be used,       */
00012 /*  modified, and distributed under the terms of the FreeType project      */
00013 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
00014 /*  this file you indicate that you have read the license and              */
00015 /*  understand and accept it fully.                                        */
00016 /*                                                                         */
00017 /***************************************************************************/
00018 
00019 
00020 #ifndef __FTOPTION_H__
00021 #define __FTOPTION_H__
00022 
00023 
00024 #include <ft2build.h>
00025 
00026 
00027 FT_BEGIN_HEADER
00028 
00029   /*************************************************************************/
00030   /*                                                                       */
00031   /*                 USER-SELECTABLE CONFIGURATION MACROS                  */
00032   /*                                                                       */
00033   /* This file contains the default configuration macro definitions for    */
00034   /* a standard build of the FreeType library.  There are three ways to    */
00035   /* use this file to build project-specific versions of the library:      */
00036   /*                                                                       */
00037   /*  - You can modify this file by hand, but this is not recommended in   */
00038   /*    cases where you would like to build several versions of the        */
00039   /*    library from a single source directory.                            */
00040   /*                                                                       */
00041   /*  - You can put a copy of this file in your build directory, more      */
00042   /*    precisely in `$BUILD/freetype/config/ftoption.h', where `$BUILD'   */
00043   /*    is the name of a directory that is included _before_ the FreeType  */
00044   /*    include path during compilation.                                   */
00045   /*                                                                       */
00046   /*    The default FreeType Makefiles and Jamfiles use the build          */
00047   /*    directory `builds/<system>' by default, but you can easily change  */
00048   /*    that for your own projects.                                        */
00049   /*                                                                       */
00050   /*  - Copy the file <ft2build.h> to `$BUILD/ft2build.h' and modify it    */
00051   /*    slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to       */
00052   /*    locate this file during the build.  For example,                   */
00053   /*                                                                       */
00054   /*      #define FT_CONFIG_OPTIONS_H  <myftoptions.h>                     */
00055   /*      #include <freetype/config/ftheader.h>                            */
00056   /*                                                                       */
00057   /*    will use `$BUILD/myftoptions.h' instead of this file for macro     */
00058   /*    definitions.                                                       */
00059   /*                                                                       */
00060   /*    Note also that you can similarly pre-define the macro              */
00061   /*    FT_CONFIG_MODULES_H used to locate the file listing of the modules */
00062   /*    that are statically linked to the library at compile time.  By     */
00063   /*    default, this file is <freetype/config/ftmodule.h>.                */
00064   /*                                                                       */
00065   /*  We highly recommend using the third method whenever possible.        */
00066   /*                                                                       */
00067   /*************************************************************************/
00068 
00069 
00070   /*************************************************************************/
00071   /*************************************************************************/
00072   /****                                                                 ****/
00073   /**** 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 ****/
00074   /****                                                                 ****/
00075   /*************************************************************************/
00076   /*************************************************************************/
00077 
00078 
00079   /*************************************************************************/
00080   /*                                                                       */
00081   /* Uncomment the line below if you want to activate sub-pixel rendering  */
00082   /* (a.k.a. LCD rendering, or ClearType) in this build of the library.    */
00083   /*                                                                       */
00084   /* Note that this feature is covered by several Microsoft patents        */
00085   /* and should not be activated in any default build of the library.      */
00086   /*                                                                       */
00087   /* This macro has no impact on the FreeType API, only on its             */
00088   /* _implementation_.  For example, using FT_RENDER_MODE_LCD when calling */
00089   /* FT_Render_Glyph still generates a bitmap that is 3 times wider than   */
00090   /* the original size in case this macro isn't defined; however, each     */
00091   /* triplet of subpixels has R=G=B.                                       */
00092   /*                                                                       */
00093   /* This is done to allow FreeType clients to run unmodified, forcing     */
00094   /* them to display normal gray-level anti-aliased glyphs.                */
00095   /*                                                                       */
00096 #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
00097 
00098 
00099   /*************************************************************************/
00100   /*                                                                       */
00101   /* Many compilers provide a non-ANSI 64-bit data type that can be used   */
00102   /* by FreeType to speed up some computations.  However, this will create */
00103   /* some problems when compiling the library in strict ANSI mode.         */
00104   /*                                                                       */
00105   /* For this reason, the use of 64-bit integers is normally disabled when */
00106   /* the __STDC__ macro is defined.  You can however disable this by       */
00107   /* defining the macro FT_CONFIG_OPTION_FORCE_INT64 here.                 */
00108   /*                                                                       */
00109   /* For most compilers, this will only create compilation warnings when   */
00110   /* building the library.                                                 */
00111   /*                                                                       */
00112   /* ObNote: The compiler-specific 64-bit integers are detected in the     */
00113   /*         file `ftconfig.h' either statically or through the            */
00114   /*         `configure' script on supported platforms.                    */
00115   /*                                                                       */
00116 #undef FT_CONFIG_OPTION_FORCE_INT64
00117 
00118 
00119   /*************************************************************************/
00120   /*                                                                       */
00121   /* If this macro is defined, do not try to use an assembler version of   */
00122   /* performance-critical functions (e.g. FT_MulFix).  You should only do  */
00123   /* that to verify that the assembler function works properly, or to      */
00124   /* execute benchmark tests of the various implementations.               */
00125 /* #define FT_CONFIG_OPTION_NO_ASSEMBLER */
00126 
00127 
00128   /*************************************************************************/
00129   /*                                                                       */
00130   /* If this macro is defined, try to use an inlined assembler version of  */
00131   /* the `FT_MulFix' function, which is a `hotspot' when loading and       */
00132   /* hinting glyphs, and which should be executed as fast as possible.     */
00133   /*                                                                       */
00134   /* Note that if your compiler or CPU is not supported, this will default */
00135   /* to the standard and portable implementation found in `ftcalc.c'.      */
00136   /*                                                                       */
00137 #define FT_CONFIG_OPTION_INLINE_MULFIX
00138 
00139 
00140   /*************************************************************************/
00141   /*                                                                       */
00142   /* LZW-compressed file support.                                          */
00143   /*                                                                       */
00144   /*   FreeType now handles font files that have been compressed with the  */
00145   /*   `compress' program.  This is mostly used to parse many of the PCF   */
00146   /*   files that come with various X11 distributions.  The implementation */
00147   /*   uses NetBSD's `zopen' to partially uncompress the file on the fly   */
00148   /*   (see src/lzw/ftgzip.c).                                             */
00149   /*                                                                       */
00150   /*   Define this macro if you want to enable this `feature'.             */
00151   /*                                                                       */
00152 #define FT_CONFIG_OPTION_USE_LZW
00153 
00154 
00155   /*************************************************************************/
00156   /*                                                                       */
00157   /* Gzip-compressed file support.                                         */
00158   /*                                                                       */
00159   /*   FreeType now handles font files that have been compressed with the  */
00160   /*   `gzip' program.  This is mostly used to parse many of the PCF files */
00161   /*   that come with XFree86.  The implementation uses `zlib' to          */
00162   /*   partially uncompress the file on the fly (see src/gzip/ftgzip.c).   */
00163   /*                                                                       */
00164   /*   Define this macro if you want to enable this `feature'.  See also   */
00165   /*   the macro FT_CONFIG_OPTION_SYSTEM_ZLIB below.                       */
00166   /*                                                                       */
00167 #define FT_CONFIG_OPTION_USE_ZLIB
00168 
00169 
00170   /*************************************************************************/
00171   /*                                                                       */
00172   /* ZLib library selection                                                */
00173   /*                                                                       */
00174   /*   This macro is only used when FT_CONFIG_OPTION_USE_ZLIB is defined.  */
00175   /*   It allows FreeType's `ftgzip' component to link to the system's     */
00176   /*   installation of the ZLib library.  This is useful on systems like   */
00177   /*   Unix or VMS where it generally is already available.                */
00178   /*                                                                       */
00179   /*   If you let it undefined, the component will use its own copy        */
00180   /*   of the zlib sources instead.  These have been modified to be        */
00181   /*   included directly within the component and *not* export external    */
00182   /*   function names.  This allows you to link any program with FreeType  */
00183   /*   _and_ ZLib without linking conflicts.                               */
00184   /*                                                                       */
00185   /*   Do not #undef this macro here since the build system might define   */
00186   /*   it for certain configurations only.                                 */
00187   /*                                                                       */
00188 /* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */
00189 
00190 
00191   /*************************************************************************/
00192   /*                                                                       */
00193   /* DLL export compilation                                                */
00194   /*                                                                       */
00195   /*   When compiling FreeType as a DLL, some systems/compilers need a     */
00196   /*   special keyword in front OR after the return type of function       */
00197   /*   declarations.                                                       */
00198   /*                                                                       */
00199   /*   Two macros are used within the FreeType source code to define       */
00200   /*   exported library functions: FT_EXPORT and FT_EXPORT_DEF.            */
00201   /*                                                                       */
00202   /*     FT_EXPORT( return_type )                                          */
00203   /*                                                                       */
00204   /*       is used in a function declaration, as in                        */
00205   /*                                                                       */
00206   /*         FT_EXPORT( FT_Error )                                         */
00207   /*         FT_Init_FreeType( FT_Library*  alibrary );                    */
00208   /*                                                                       */
00209   /*                                                                       */
00210   /*     FT_EXPORT_DEF( return_type )                                      */
00211   /*                                                                       */
00212   /*       is used in a function definition, as in                         */
00213   /*                                                                       */
00214   /*         FT_EXPORT_DEF( FT_Error )                                     */
00215   /*         FT_Init_FreeType( FT_Library*  alibrary )                     */
00216   /*         {                                                             */
00217   /*           ... some code ...                                           */
00218   /*           return FT_Err_Ok;                                           */
00219   /*         }                                                             */
00220   /*                                                                       */
00221   /*   You can provide your own implementation of FT_EXPORT and            */
00222   /*   FT_EXPORT_DEF here if you want.  If you leave them undefined, they  */
00223   /*   will be later automatically defined as `extern return_type' to      */
00224   /*   allow normal compilation.                                           */
00225   /*                                                                       */
00226   /*   Do not #undef these macros here since the build system might define */
00227   /*   them for certain configurations only.                               */
00228   /*                                                                       */
00229 /* #define FT_EXPORT(x)      extern x */
00230 /* #define FT_EXPORT_DEF(x)  x */
00231 
00232 
00233   /*************************************************************************/
00234   /*                                                                       */
00235   /* Glyph Postscript Names handling                                       */
00236   /*                                                                       */
00237   /*   By default, FreeType 2 is compiled with the `psnames' module.  This */
00238   /*   module is in charge of converting a glyph name string into a        */
00239   /*   Unicode value, or return a Macintosh standard glyph name for the    */
00240   /*   use with the TrueType `post' table.                                 */
00241   /*                                                                       */
00242   /*   Undefine this macro if you do not want `psnames' compiled in your   */
00243   /*   build of FreeType.  This has the following effects:                 */
00244   /*                                                                       */
00245   /*   - The TrueType driver will provide its own set of glyph names,      */
00246   /*     if you build it to support postscript names in the TrueType       */
00247   /*     `post' table.                                                     */
00248   /*                                                                       */
00249   /*   - The Type 1 driver will not be able to synthesize a Unicode        */
00250   /*     charmap out of the glyphs found in the fonts.                     */
00251   /*                                                                       */
00252   /*   You would normally undefine this configuration macro when building  */
00253   /*   a version of FreeType that doesn't contain a Type 1 or CFF driver.  */
00254   /*                                                                       */
00255 #define FT_CONFIG_OPTION_POSTSCRIPT_NAMES
00256 
00257 
00258   /*************************************************************************/
00259   /*                                                                       */
00260   /* Postscript Names to Unicode Values support                            */
00261   /*                                                                       */
00262   /*   By default, FreeType 2 is built with the `PSNames' module compiled  */
00263   /*   in.  Among other things, the module is used to convert a glyph name */
00264   /*   into a Unicode value.  This is especially useful in order to        */
00265   /*   synthesize on the fly a Unicode charmap from the CFF/Type 1 driver  */
00266   /*   through a big table named the `Adobe Glyph List' (AGL).             */
00267   /*                                                                       */
00268   /*   Undefine this macro if you do not want the Adobe Glyph List         */
00269   /*   compiled in your `PSNames' module.  The Type 1 driver will not be   */
00270   /*   able to synthesize a Unicode charmap out of the glyphs found in the */
00271   /*   fonts.                                                              */
00272   /*                                                                       */
00273 #define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
00274 
00275 
00276   /*************************************************************************/
00277   /*                                                                       */
00278   /* Support for Mac fonts                                                 */
00279   /*                                                                       */
00280   /*   Define this macro if you want support for outline fonts in Mac      */
00281   /*   format (mac dfont, mac resource, macbinary containing a mac         */
00282   /*   resource) on non-Mac platforms.                                     */
00283   /*                                                                       */
00284   /*   Note that the `FOND' resource isn't checked.                        */
00285   /*                                                                       */
00286 #define FT_CONFIG_OPTION_MAC_FONTS
00287 
00288 
00289   /*************************************************************************/
00290   /*                                                                       */
00291   /* Guessing methods to access embedded resource forks                    */
00292   /*                                                                       */
00293   /*   Enable extra Mac fonts support on non-Mac platforms (e.g.           */
00294   /*   GNU/Linux).                                                         */
00295   /*                                                                       */
00296   /*   Resource forks which include fonts data are stored sometimes in     */
00297   /*   locations which users or developers don't expected.  In some cases, */
00298   /*   resource forks start with some offset from the head of a file.  In  */
00299   /*   other cases, the actual resource fork is stored in file different   */
00300   /*   from what the user specifies.  If this option is activated,         */
00301   /*   FreeType tries to guess whether such offsets or different file      */
00302   /*   names must be used.                                                 */
00303   /*                                                                       */
00304   /*   Note that normal, direct access of resource forks is controlled via */
00305   /*   the FT_CONFIG_OPTION_MAC_FONTS option.                              */
00306   /*                                                                       */
00307 #ifdef FT_CONFIG_OPTION_MAC_FONTS
00308 #define FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK
00309 #endif
00310 
00311 
00312   /*************************************************************************/
00313   /*                                                                       */
00314   /* Allow the use of FT_Incremental_Interface to load typefaces that      */
00315   /* contain no glyph data, but supply it via a callback function.         */
00316   /* This is required by clients supporting document formats which         */
00317   /* supply font data incrementally as the document is parsed, such        */
00318   /* as the Ghostscript interpreter for the PostScript language.           */
00319   /*                                                                       */
00320 #define FT_CONFIG_OPTION_INCREMENTAL
00321 
00322 
00323   /*************************************************************************/
00324   /*                                                                       */
00325   /* The size in bytes of the render pool used by the scan-line converter  */
00326   /* to do all of its work.                                                */
00327   /*                                                                       */
00328   /* This must be greater than 4KByte if you use FreeType to rasterize     */
00329   /* glyphs; otherwise, you may set it to zero to avoid unnecessary        */
00330   /* allocation of the render pool.                                        */
00331   /*                                                                       */
00332 #define FT_RENDER_POOL_SIZE  16384L
00333 
00334 
00335   /*************************************************************************/
00336   /*                                                                       */
00337   /* FT_MAX_MODULES                                                        */
00338   /*                                                                       */
00339   /*   The maximum number of modules that can be registered in a single    */
00340   /*   FreeType library object.  32 is the default.                        */
00341   /*                                                                       */
00342 #define FT_MAX_MODULES  32
00343 
00344 
00345   /*************************************************************************/
00346   /*                                                                       */
00347   /* Debug level                                                           */
00348   /*                                                                       */
00349   /*   FreeType can be compiled in debug or trace mode.  In debug mode,    */
00350   /*   errors are reported through the `ftdebug' component.  In trace      */
00351   /*   mode, additional messages are sent to the standard output during    */
00352   /*   execution.                                                          */
00353   /*                                                                       */
00354   /*   Define FT_DEBUG_LEVEL_ERROR to build the library in debug mode.     */
00355   /*   Define FT_DEBUG_LEVEL_TRACE to build it in trace mode.              */
00356   /*                                                                       */
00357   /*   Don't define any of these macros to compile in `release' mode!      */
00358   /*                                                                       */
00359   /*   Do not #undef these macros here since the build system might define */
00360   /*   them for certain configurations only.                               */
00361   /*                                                                       */
00362 #define FT_DEBUG_LEVEL_ERROR
00363 #define FT_DEBUG_LEVEL_TRACE
00364 
00365 
00366   /*************************************************************************/
00367   /*                                                                       */
00368   /* Memory Debugging                                                      */
00369   /*                                                                       */
00370   /*   FreeType now comes with an integrated memory debugger that is       */
00371   /*   capable of detecting simple errors like memory leaks or double      */
00372   /*   deletes.  To compile it within your build of the library, you       */
00373   /*   should define FT_DEBUG_MEMORY here.                                 */
00374   /*                                                                       */
00375   /*   Note that the memory debugger is only activated at runtime when     */
00376   /*   when the _environment_ variable `FT2_DEBUG_MEMORY' is defined also! */
00377   /*                                                                       */
00378   /*   Do not #undef this macro here since the build system might define   */
00379   /*   it for certain configurations only.                                 */
00380   /*                                                                       */
00381 #define FT_DEBUG_MEMORY
00382 
00383 
00384   /*************************************************************************/
00385   /*                                                                       */
00386   /* Module errors                                                         */
00387   /*                                                                       */
00388   /*   If this macro is set (which is _not_ the default), the higher byte  */
00389   /*   of an error code gives the module in which the error has occurred,  */
00390   /*   while the lower byte is the real error code.                        */
00391   /*                                                                       */
00392   /*   Setting this macro makes sense for debugging purposes only, since   */
00393   /*   it would break source compatibility of certain programs that use    */
00394   /*   FreeType 2.                                                         */
00395   /*                                                                       */
00396   /*   More details can be found in the files ftmoderr.h and fterrors.h.   */
00397   /*                                                                       */
00398 #undef FT_CONFIG_OPTION_USE_MODULE_ERRORS
00399 
00400 
00401   /*************************************************************************/
00402   /*                                                                       */
00403   /* Position Independent Code                                             */
00404   /*                                                                       */
00405   /*   If this macro is set (which is _not_ the default), FreeType2 will   */
00406   /*   avoid creating constants that require address fixups.  Instead the  */
00407   /*   constants will be moved into a struct and additional intialization  */
00408   /*   code will be used.                                                  */
00409   /*                                                                       */
00410   /*   Setting this macro is needed for systems that prohibit address      */
00411   /*   fixups, such as BREW.                                               */
00412   /*                                                                       */
00413 /* #define FT_CONFIG_OPTION_PIC */
00414 
00415 
00416   /*************************************************************************/
00417   /*************************************************************************/
00418   /****                                                                 ****/
00419   /****        S F N T   D R I V E R    C O N F I G U R A T I O N       ****/
00420   /****                                                                 ****/
00421   /*************************************************************************/
00422   /*************************************************************************/
00423 
00424 
00425   /*************************************************************************/
00426   /*                                                                       */
00427   /* Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support       */
00428   /* embedded bitmaps in all formats using the SFNT module (namely         */
00429   /* TrueType & OpenType).                                                 */
00430   /*                                                                       */
00431 #define TT_CONFIG_OPTION_EMBEDDED_BITMAPS
00432 
00433 
00434   /*************************************************************************/
00435   /*                                                                       */
00436   /* Define TT_CONFIG_OPTION_POSTSCRIPT_NAMES if you want to be able to    */
00437   /* load and enumerate the glyph Postscript names in a TrueType or        */
00438   /* OpenType file.                                                        */
00439   /*                                                                       */
00440   /* Note that when you do not compile the `PSNames' module by undefining  */
00441   /* the above FT_CONFIG_OPTION_POSTSCRIPT_NAMES, the `sfnt' module will   */
00442   /* contain additional code used to read the PS Names table from a font.  */
00443   /*                                                                       */
00444   /* (By default, the module uses `PSNames' to extract glyph names.)       */
00445   /*                                                                       */
00446 #define TT_CONFIG_OPTION_POSTSCRIPT_NAMES
00447 
00448 
00449   /*************************************************************************/
00450   /*                                                                       */
00451   /* Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to       */
00452   /* access the internal name table in a SFNT-based format like TrueType   */
00453   /* or OpenType.  The name table contains various strings used to         */
00454   /* describe the font, like family name, copyright, version, etc.  It     */
00455   /* does not contain any glyph name though.                               */
00456   /*                                                                       */
00457   /* Accessing SFNT names is done through the functions declared in        */
00458   /* `freetype/ftsnames.h'.                                                */
00459   /*                                                                       */
00460 #define TT_CONFIG_OPTION_SFNT_NAMES
00461 
00462 
00463   /*************************************************************************/
00464   /*                                                                       */
00465   /* TrueType CMap support                                                 */
00466   /*                                                                       */
00467   /*   Here you can fine-tune which TrueType CMap table format shall be    */
00468   /*   supported.                                                          */
00469 #define TT_CONFIG_CMAP_FORMAT_0
00470 #define TT_CONFIG_CMAP_FORMAT_2
00471 #define TT_CONFIG_CMAP_FORMAT_4
00472 #define TT_CONFIG_CMAP_FORMAT_6
00473 #define TT_CONFIG_CMAP_FORMAT_8
00474 #define TT_CONFIG_CMAP_FORMAT_10
00475 #define TT_CONFIG_CMAP_FORMAT_12
00476 #define TT_CONFIG_CMAP_FORMAT_13
00477 #define TT_CONFIG_CMAP_FORMAT_14
00478 
00479 
00480   /*************************************************************************/
00481   /*************************************************************************/
00482   /****                                                                 ****/
00483   /****    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   ****/
00484   /****                                                                 ****/
00485   /*************************************************************************/
00486   /*************************************************************************/
00487 
00488   /*************************************************************************/
00489   /*                                                                       */
00490   /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile   */
00491   /* a bytecode interpreter in the TrueType driver.                        */
00492   /*                                                                       */
00493   /* By undefining this, you will only compile the code necessary to load  */
00494   /* TrueType glyphs without hinting.                                      */
00495   /*                                                                       */
00496   /*   Do not #undef this macro here, since the build system might         */
00497   /*   define it for certain configurations only.                          */
00498   /*                                                                       */
00499 #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
00500 
00501 
00502   /*************************************************************************/
00503   /*                                                                       */
00504   /* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version  */
00505   /* of the TrueType bytecode interpreter is used that doesn't implement   */
00506   /* any of the patented opcodes and algorithms.  The patents related to   */
00507   /* TrueType hinting have expired worldwide since May 2010; this option   */
00508   /* is now deprecated.                                                    */
00509   /*                                                                       */
00510   /* Note that the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored*  */
00511   /* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words,  */
00512   /* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or                */
00513   /* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time.    */
00514   /*                                                                       */
00515   /* This macro is only useful for a small number of font files (mostly    */
00516   /* for Asian scripts) that require bytecode interpretation to properly   */
00517   /* load glyphs.  For all other fonts, this produces unpleasant results,  */
00518   /* thus the unpatented interpreter is never used to load glyphs from     */
00519   /* TrueType fonts unless one of the following two options is used.       */
00520   /*                                                                       */
00521   /*   - The unpatented interpreter is explicitly activated by the user    */
00522   /*     through the FT_PARAM_TAG_UNPATENTED_HINTING parameter tag         */
00523   /*     when opening the FT_Face.                                         */
00524   /*                                                                       */
00525   /*   - FreeType detects that the FT_Face corresponds to one of the       */
00526   /*     `trick' fonts (e.g., `Mingliu') it knows about.  The font engine  */
00527   /*     contains a hard-coded list of font names and other matching       */
00528   /*     parameters (see function `tt_face_init' in file                   */
00529   /*     `src/truetype/ttobjs.c').                                         */
00530   /*                                                                       */
00531   /* Here a sample code snippet for using FT_PARAM_TAG_UNPATENTED_HINTING. */
00532   /*                                                                       */
00533   /*   {                                                                   */
00534   /*     FT_Parameter  parameter;                                          */
00535   /*     FT_Open_Args  open_args;                                          */
00536   /*                                                                       */
00537   /*                                                                       */
00538   /*     parameter.tag = FT_PARAM_TAG_UNPATENTED_HINTING;                  */
00539   /*                                                                       */
00540   /*     open_args.flags      = FT_OPEN_PATHNAME | FT_OPEN_PARAMS;         */
00541   /*     open_args.pathname   = my_font_pathname;                          */
00542   /*     open_args.num_params = 1;                                         */
00543   /*     open_args.params     = &parameter;                                */
00544   /*                                                                       */
00545   /*     error = FT_Open_Face( library, &open_args, index, &face );        */
00546   /*     ...                                                               */
00547   /*   }                                                                   */
00548   /*                                                                       */
00549 /* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */
00550 
00551 
00552   /*************************************************************************/
00553   /*                                                                       */
00554   /* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType    */
00555   /* bytecode interpreter with a huge switch statement, rather than a call */
00556   /* table.  This results in smaller and faster code for a number of       */
00557   /* architectures.                                                        */
00558   /*                                                                       */
00559   /* Note however that on some compiler/processor combinations, undefining */
00560   /* this macro will generate faster, though larger, code.                 */
00561   /*                                                                       */
00562 #define TT_CONFIG_OPTION_INTERPRETER_SWITCH
00563 
00564 
00565   /*************************************************************************/
00566   /*                                                                       */
00567   /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the        */
00568   /* TrueType glyph loader to use Apple's definition of how to handle      */
00569   /* component offsets in composite glyphs.                                */
00570   /*                                                                       */
00571   /* Apple and MS disagree on the default behavior of component offsets    */
00572   /* in composites.  Apple says that they should be scaled by the scaling  */
00573   /* factors in the transformation matrix (roughly, it's more complex)     */
00574   /* while MS says they should not.  OpenType defines two bits in the      */
00575   /* composite flags array which can be used to disambiguate, but old      */
00576   /* fonts will not have them.                                             */
00577   /*                                                                       */
00578   /*   http://partners.adobe.com/asn/developer/opentype/glyf.html          */
00579   /*   http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html                 */
00580   /*                                                                       */
00581 #undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
00582 
00583 
00584   /*************************************************************************/
00585   /*                                                                       */
00586   /* Define TT_CONFIG_OPTION_GX_VAR_SUPPORT if you want to include         */
00587   /* support for Apple's distortable font technology (fvar, gvar, cvar,    */
00588   /* and avar tables).  This has many similarities to Type 1 Multiple      */
00589   /* Masters support.                                                      */
00590   /*                                                                       */
00591 #define TT_CONFIG_OPTION_GX_VAR_SUPPORT
00592 
00593 
00594   /*************************************************************************/
00595   /*                                                                       */
00596   /* Define TT_CONFIG_OPTION_BDF if you want to include support for        */
00597   /* an embedded `BDF ' table within SFNT-based bitmap formats.            */
00598   /*                                                                       */
00599 #define TT_CONFIG_OPTION_BDF
00600 
00601 
00602   /*************************************************************************/
00603   /*************************************************************************/
00604   /****                                                                 ****/
00605   /****      T Y P E 1   D R I V E R    C O N F I G U R A T I O N       ****/
00606   /****                                                                 ****/
00607   /*************************************************************************/
00608   /*************************************************************************/
00609 
00610 
00611   /*************************************************************************/
00612   /*                                                                       */
00613   /* T1_MAX_DICT_DEPTH is the maximal depth of nest dictionaries and       */
00614   /* arrays in the Type 1 stream (see t1load.c).  A minimum of 4 is        */
00615   /* required.                                                             */
00616   /*                                                                       */
00617 #define T1_MAX_DICT_DEPTH  5
00618 
00619 
00620   /*************************************************************************/
00621   /*                                                                       */
00622   /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine   */
00623   /* calls during glyph loading.                                           */
00624   /*                                                                       */
00625 #define T1_MAX_SUBRS_CALLS  16
00626 
00627 
00628   /*************************************************************************/
00629   /*                                                                       */
00630   /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity.  A     */
00631   /* minimum of 16 is required.                                            */
00632   /*                                                                       */
00633   /* The Chinese font MingTiEG-Medium (CNS 11643 character set) needs 256. */
00634   /*                                                                       */
00635 #define T1_MAX_CHARSTRINGS_OPERANDS  256
00636 
00637 
00638   /*************************************************************************/
00639   /*                                                                       */
00640   /* Define this configuration macro if you want to prevent the            */
00641   /* compilation of `t1afm', which is in charge of reading Type 1 AFM      */
00642   /* files into an existing face.  Note that if set, the T1 driver will be */
00643   /* unable to produce kerning distances.                                  */
00644   /*                                                                       */
00645 #undef T1_CONFIG_OPTION_NO_AFM
00646 
00647 
00648   /*************************************************************************/
00649   /*                                                                       */
00650   /* Define this configuration macro if you want to prevent the            */
00651   /* compilation of the Multiple Masters font support in the Type 1        */
00652   /* driver.                                                               */
00653   /*                                                                       */
00654 #undef T1_CONFIG_OPTION_NO_MM_SUPPORT
00655 
00656 
00657   /*************************************************************************/
00658   /*************************************************************************/
00659   /****                                                                 ****/
00660   /****    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     ****/
00661   /****                                                                 ****/
00662   /*************************************************************************/
00663   /*************************************************************************/
00664 
00665 
00666   /*************************************************************************/
00667   /*                                                                       */
00668   /* Compile autofit module with CJK (Chinese, Japanese, Korean) script    */
00669   /* support.                                                              */
00670   /*                                                                       */
00671 #define AF_CONFIG_OPTION_CJK
00672 
00673   /*************************************************************************/
00674   /*                                                                       */
00675   /* Compile autofit module with Indic script support.                     */
00676   /*                                                                       */
00677 #define AF_CONFIG_OPTION_INDIC
00678 
00679   /* */
00680 
00681 
00682   /*
00683    * Define this variable if you want to keep the layout of internal
00684    * structures that was used prior to FreeType 2.2.  This also compiles in
00685    * a few obsolete functions to avoid linking problems on typical Unix
00686    * distributions.
00687    *
00688    * For embedded systems or building a new distribution from scratch, it
00689    * is recommended to disable the macro since it reduces the library's code
00690    * size and activates a few memory-saving optimizations as well.
00691    */
00692 /* #define FT_CONFIG_OPTION_OLD_INTERNALS xxx */
00693 
00694 
00695   /*
00696    *  To detect legacy cache-lookup call from a rogue client (<= 2.1.7),
00697    *  we restrict the number of charmaps in a font.  The current API of
00698    *  FTC_CMapCache_Lookup() takes cmap_index & charcode, but old API
00699    *  takes charcode only.  To determine the passed value is for cmap_index
00700    *  or charcode, the possible cmap_index is restricted not to exceed
00701    *  the minimum possible charcode by a rogue client.  It is also very
00702    *  unlikely that a rogue client is interested in Unicode values 0 to 15.
00703    *
00704    *  NOTE: The original threshold was 4 deduced from popular number of
00705    *        cmap subtables in UCS-4 TrueType fonts, but now it is not
00706    *        irregular for OpenType fonts to have more than 4 subtables,
00707    *        because variation selector subtables are available for Apple
00708    *        and Microsoft platforms.
00709    */
00710 
00711 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
00712 #define FT_MAX_CHARMAP_CACHEABLE 15
00713 #endif
00714 
00715 
00716   /*
00717    * This macro is defined if either unpatented or native TrueType
00718    * hinting is requested by the definitions above.
00719    */
00720 #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
00721 #define  TT_USE_BYTECODE_INTERPRETER
00722 #undef   TT_CONFIG_OPTION_UNPATENTED_HINTING
00723 #elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING
00724 #define  TT_USE_BYTECODE_INTERPRETER
00725 #endif
00726 
00727 FT_END_HEADER
00728 
00729 
00730 #endif /* __FTOPTION_H__ */
00731 
00732 
00733 /* END */

Generated on Sat May 26 2012 04:32:25 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.