ftoption.h | ftoption.h | |||
---|---|---|---|---|
/************************************************************************** */ | /************************************************************************** */ | |||
/* */ | /* */ | |||
/* ftoption.h */ | /* ftoption.h */ | |||
/* */ | /* */ | |||
/* User-selectable configuration macros (specification only). */ | /* User-selectable configuration macros (specification only). */ | |||
/* */ | /* */ | |||
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, | /* Copyright 1996-2011 by | |||
*/ | */ | |||
/* 2010 by | ||||
*/ | ||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ | |||
/* */ | /* */ | |||
/* This file is part of the FreeType project, and may only be used, */ | /* This file is part of the FreeType project, and may only be used, */ | |||
/* modified, and distributed under the terms of the FreeType project */ | /* modified, and distributed under the terms of the FreeType project */ | |||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ | |||
/* this file you indicate that you have read the license and */ | /* this file you indicate that you have read the license and */ | |||
/* understand and accept it fully. */ | /* understand and accept it fully. */ | |||
/* */ | /* */ | |||
/************************************************************************** */ | /************************************************************************** */ | |||
skipping to change at line 181 | skipping to change at line 180 | |||
/* function names. This allows you to link any program with FreeType */ | /* function names. This allows you to link any program with FreeType */ | |||
/* _and_ ZLib without linking conflicts. */ | /* _and_ ZLib without linking conflicts. */ | |||
/* */ | /* */ | |||
/* Do not #undef this macro here since the build system might define */ | /* Do not #undef this macro here since the build system might define */ | |||
/* it for certain configurations only. */ | /* it for certain configurations only. */ | |||
/* */ | /* */ | |||
/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */ | /* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */ | |||
/************************************************************************ */ | /************************************************************************ */ | |||
/* */ | /* */ | |||
/* Bzip2-compressed file support. | ||||
*/ | ||||
/* | ||||
*/ | ||||
/* FreeType now handles font files that have been compressed with the | ||||
*/ | ||||
/* `bzip2' program. This is mostly used to parse many of the PCF | ||||
*/ | ||||
/* files that come with XFree86. The implementation uses `libbz2' to | ||||
*/ | ||||
/* partially uncompress the file on the fly (see src/bzip2/ftbzip2.c). | ||||
*/ | ||||
/* Contrary to gzip, bzip2 currently is not included and need to use | ||||
*/ | ||||
/* the system available bzip2 implementation. | ||||
*/ | ||||
/* | ||||
*/ | ||||
/* Define this macro if you want to enable this `feature'. | ||||
*/ | ||||
/* | ||||
*/ | ||||
/* #define FT_CONFIG_OPTION_USE_BZIP2 */ | ||||
/************************************************************************ | ||||
*/ | ||||
/* | ||||
*/ | ||||
/* DLL export compilation */ | /* DLL export compilation */ | |||
/* */ | /* */ | |||
/* When compiling FreeType as a DLL, some systems/compilers need a */ | /* When compiling FreeType as a DLL, some systems/compilers need a */ | |||
/* special keyword in front OR after the return type of function */ | /* special keyword in front OR after the return type of function */ | |||
/* declarations. */ | /* declarations. */ | |||
/* */ | /* */ | |||
/* Two macros are used within the FreeType source code to define */ | /* Two macros are used within the FreeType source code to define */ | |||
/* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */ | /* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */ | |||
/* */ | /* */ | |||
/* FT_EXPORT( return_type ) */ | /* FT_EXPORT( return_type ) */ | |||
skipping to change at line 347 | skipping to change at line 361 | |||
/* Don't define any of these macros to compile in `release' mode! */ | /* Don't define any of these macros to compile in `release' mode! */ | |||
/* */ | /* */ | |||
/* Do not #undef these macros here since the build system might define */ | /* Do not #undef these macros here since the build system might define */ | |||
/* them for certain configurations only. */ | /* them for certain configurations only. */ | |||
/* */ | /* */ | |||
/* #define FT_DEBUG_LEVEL_ERROR */ | /* #define FT_DEBUG_LEVEL_ERROR */ | |||
/* #define FT_DEBUG_LEVEL_TRACE */ | /* #define FT_DEBUG_LEVEL_TRACE */ | |||
/************************************************************************ */ | /************************************************************************ */ | |||
/* */ | /* */ | |||
/* Autofitter debugging | ||||
*/ | ||||
/* | ||||
*/ | ||||
/* If FT_DEBUG_AUTOFIT is defined, FreeType provides some means to | ||||
*/ | ||||
/* control the autofitter behaviour for debugging purposes with global | ||||
*/ | ||||
/* boolean variables (consequently, you should *never* enable this | ||||
*/ | ||||
/* while compiling in `release' mode): | ||||
*/ | ||||
/* | ||||
*/ | ||||
/* _af_debug_disable_horz_hints | ||||
*/ | ||||
/* _af_debug_disable_vert_hints | ||||
*/ | ||||
/* _af_debug_disable_blue_hints | ||||
*/ | ||||
/* | ||||
*/ | ||||
/* Additionally, the following functions provide dumps of various | ||||
*/ | ||||
/* internal autofit structures to stdout (using `printf'): | ||||
*/ | ||||
/* | ||||
*/ | ||||
/* af_glyph_hints_dump_points | ||||
*/ | ||||
/* af_glyph_hints_dump_segments | ||||
*/ | ||||
/* af_glyph_hints_dump_edges | ||||
*/ | ||||
/* | ||||
*/ | ||||
/* As an argument, they use another global variable: | ||||
*/ | ||||
/* | ||||
*/ | ||||
/* _af_debug_hints | ||||
*/ | ||||
/* | ||||
*/ | ||||
/* Please have a look at the `ftgrid' demo program to see how those | ||||
*/ | ||||
/* variables and macros should be used. | ||||
*/ | ||||
/* | ||||
*/ | ||||
/* Do not #undef these macros here since the build system might define | ||||
*/ | ||||
/* them for certain configurations only. | ||||
*/ | ||||
/* | ||||
*/ | ||||
/* #define FT_DEBUG_AUTOFIT */ | ||||
/************************************************************************ | ||||
*/ | ||||
/* | ||||
*/ | ||||
/* Memory Debugging */ | /* Memory Debugging */ | |||
/* */ | /* */ | |||
/* FreeType now comes with an integrated memory debugger that is */ | /* FreeType now comes with an integrated memory debugger that is */ | |||
/* capable of detecting simple errors like memory leaks or double */ | /* capable of detecting simple errors like memory leaks or double */ | |||
/* deletes. To compile it within your build of the library, you */ | /* deletes. To compile it within your build of the library, you */ | |||
/* should define FT_DEBUG_MEMORY here. */ | /* should define FT_DEBUG_MEMORY here. */ | |||
/* */ | /* */ | |||
/* Note that the memory debugger is only activated at runtime when */ | /* Note that the memory debugger is only activated at runtime when */ | |||
/* when the _environment_ variable `FT2_DEBUG_MEMORY' is defined also! */ | /* when the _environment_ variable `FT2_DEBUG_MEMORY' is defined also! */ | |||
/* */ | /* */ | |||
skipping to change at line 462 | skipping to change at line 508 | |||
/************************************************************************ */ | /************************************************************************ */ | |||
/**** *** */ | /**** *** */ | |||
/**** 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 *** */ | /**** 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 *** */ | |||
/**** *** */ | /**** *** */ | |||
/************************************************************************ */ | /************************************************************************ */ | |||
/************************************************************************ */ | /************************************************************************ */ | |||
/************************************************************************ */ | /************************************************************************ */ | |||
/* */ | /* */ | |||
/* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile */ | /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile */ | |||
/* a bytecode interpreter in the TrueType driver. Note that there are | /* a bytecode interpreter in the TrueType driver. | |||
*/ | */ | |||
/* important patent issues related to the use of the interpreter. | ||||
*/ | ||||
/* */ | /* */ | |||
/* By undefining this, you will only compile the code necessary to load */ | /* By undefining this, you will only compile the code necessary to load */ | |||
/* TrueType glyphs without hinting. */ | /* TrueType glyphs without hinting. */ | |||
/* */ | /* */ | |||
/* Do not #undef this macro here, since the build system might */ | /* Do not #undef this macro here, since the build system might */ | |||
/* define it for certain configurations only. */ | /* define it for certain configurations only. */ | |||
/* */ | /* */ | |||
/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */ | #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER | |||
/************************************************************************ */ | /************************************************************************ */ | |||
/* */ | /* */ | |||
/* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */ | /* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */ | |||
/* of the TrueType bytecode interpreter is used that doesn't implement */ | /* of the TrueType bytecode interpreter is used that doesn't implement */ | |||
/* any of the patented opcodes and algorithms. Note that the | /* any of the patented opcodes and algorithms. The patents related to | |||
*/ | */ | |||
/* TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* if you define | /* TrueType hinting have expired worldwide since May 2010; this option | |||
*/ | */ | |||
/* TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, either define | /* is now deprecated. | |||
*/ | */ | |||
/* TT_CONFIG_OPTION_BYTECODE_INTERPRETER or | /* | |||
*/ | */ | |||
/* Note that the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* | ||||
*/ | ||||
/* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, | ||||
*/ | ||||
/* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or | ||||
*/ | ||||
/* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time. */ | /* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time. */ | |||
/* */ | /* */ | |||
/* This macro is only useful for a small number of font files (mostly */ | /* This macro is only useful for a small number of font files (mostly */ | |||
/* for Asian scripts) that require bytecode interpretation to properly */ | /* for Asian scripts) that require bytecode interpretation to properly */ | |||
/* load glyphs. For all other fonts, this produces unpleasant results, */ | /* load glyphs. For all other fonts, this produces unpleasant results, */ | |||
/* thus the unpatented interpreter is never used to load glyphs from */ | /* thus the unpatented interpreter is never used to load glyphs from */ | |||
/* TrueType fonts unless one of the following two options is used. */ | /* TrueType fonts unless one of the following two options is used. */ | |||
/* */ | /* */ | |||
/* - The unpatented interpreter is explicitly activated by the user */ | /* - The unpatented interpreter is explicitly activated by the user */ | |||
/* through the FT_PARAM_TAG_UNPATENTED_HINTING parameter tag */ | /* through the FT_PARAM_TAG_UNPATENTED_HINTING parameter tag */ | |||
skipping to change at line 517 | skipping to change at line 565 | |||
/* */ | /* */ | |||
/* open_args.flags = FT_OPEN_PATHNAME | FT_OPEN_PARAMS; */ | /* open_args.flags = FT_OPEN_PATHNAME | FT_OPEN_PARAMS; */ | |||
/* open_args.pathname = my_font_pathname; */ | /* open_args.pathname = my_font_pathname; */ | |||
/* open_args.num_params = 1; */ | /* open_args.num_params = 1; */ | |||
/* open_args.params = ¶meter; */ | /* open_args.params = ¶meter; */ | |||
/* */ | /* */ | |||
/* error = FT_Open_Face( library, &open_args, index, &face ); */ | /* error = FT_Open_Face( library, &open_args, index, &face ); */ | |||
/* ... */ | /* ... */ | |||
/* } */ | /* } */ | |||
/* */ | /* */ | |||
#define TT_CONFIG_OPTION_UNPATENTED_HINTING | /* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */ | |||
/************************************************************************ */ | /************************************************************************ */ | |||
/* */ | /* */ | |||
/* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType */ | /* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType */ | |||
/* bytecode interpreter with a huge switch statement, rather than a call */ | /* bytecode interpreter with a huge switch statement, rather than a call */ | |||
/* table. This results in smaller and faster code for a number of */ | /* table. This results in smaller and faster code for a number of */ | |||
/* architectures. */ | /* architectures. */ | |||
/* */ | /* */ | |||
/* Note however that on some compiler/processor combinations, undefining */ | /* Note however that on some compiler/processor combinations, undefining */ | |||
/* this macro will generate faster, though larger, code. */ | /* this macro will generate faster, though larger, code. */ | |||
skipping to change at line 544 | skipping to change at line 592 | |||
/* TrueType glyph loader to use Apple's definition of how to handle */ | /* TrueType glyph loader to use Apple's definition of how to handle */ | |||
/* component offsets in composite glyphs. */ | /* component offsets in composite glyphs. */ | |||
/* */ | /* */ | |||
/* Apple and MS disagree on the default behavior of component offsets */ | /* Apple and MS disagree on the default behavior of component offsets */ | |||
/* in composites. Apple says that they should be scaled by the scaling */ | /* in composites. Apple says that they should be scaled by the scaling */ | |||
/* factors in the transformation matrix (roughly, it's more complex) */ | /* factors in the transformation matrix (roughly, it's more complex) */ | |||
/* while MS says they should not. OpenType defines two bits in the */ | /* while MS says they should not. OpenType defines two bits in the */ | |||
/* composite flags array which can be used to disambiguate, but old */ | /* composite flags array which can be used to disambiguate, but old */ | |||
/* fonts will not have them. */ | /* fonts will not have them. */ | |||
/* */ | /* */ | |||
/* http://partners.adobe.com/asn/developer/opentype/glyf.html */ | /* http://www.microsoft.com/typography/otspec/glyf.htm */ | |||
/* http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html */ | /* http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html */ | |||
/* */ | /* */ | |||
#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED | #undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED | |||
/************************************************************************ */ | /************************************************************************ */ | |||
/* */ | /* */ | |||
/* Define TT_CONFIG_OPTION_GX_VAR_SUPPORT if you want to include */ | /* Define TT_CONFIG_OPTION_GX_VAR_SUPPORT if you want to include */ | |||
/* support for Apple's distortable font technology (fvar, gvar, cvar, */ | /* support for Apple's distortable font technology (fvar, gvar, cvar, */ | |||
/* and avar tables). This has many similarities to Type 1 Multiple */ | /* and avar tables). This has many similarities to Type 1 Multiple */ | |||
/* Masters support. */ | /* Masters support. */ | |||
skipping to change at line 635 | skipping to change at line 683 | |||
/* support. */ | /* support. */ | |||
/* */ | /* */ | |||
#define AF_CONFIG_OPTION_CJK | #define AF_CONFIG_OPTION_CJK | |||
/************************************************************************ */ | /************************************************************************ */ | |||
/* */ | /* */ | |||
/* Compile autofit module with Indic script support. */ | /* Compile autofit module with Indic script support. */ | |||
/* */ | /* */ | |||
#define AF_CONFIG_OPTION_INDIC | #define AF_CONFIG_OPTION_INDIC | |||
/************************************************************************ | ||||
*/ | ||||
/* | ||||
*/ | ||||
/* Compile autofit module with warp hinting. The idea of the warping | ||||
*/ | ||||
/* code is to slightly scale and shift a glyph within a single dimension | ||||
*/ | ||||
/* so that as much of its segments are aligned (more or less) on the | ||||
*/ | ||||
/* grid. To find out the optimal scaling and shifting value, various | ||||
*/ | ||||
/* parameter combinations are tried and scored. | ||||
*/ | ||||
/* | ||||
*/ | ||||
/* This experimental option is only active if the render mode is | ||||
*/ | ||||
/* FT_RENDER_MODE_LIGHT. | ||||
*/ | ||||
/* | ||||
*/ | ||||
/* #define AF_CONFIG_OPTION_USE_WARPER */ | ||||
/* */ | /* */ | |||
/* | /* | |||
* Define this variable if you want to keep the layout of internal | * Define this variable if you want to keep the layout of internal | |||
* structures that was used prior to FreeType 2.2. This also compiles in | * structures that was used prior to FreeType 2.2. This also compiles in | |||
* a few obsolete functions to avoid linking problems on typical Unix | * a few obsolete functions to avoid linking problems on typical Unix | |||
* distributions. | * distributions. | |||
* | * | |||
* For embedded systems or building a new distribution from scratch, it | * For embedded systems or building a new distribution from scratch, it | |||
* is recommended to disable the macro since it reduces the library's cod e | * is recommended to disable the macro since it reduces the library's cod e | |||
* size and activates a few memory-saving optimizations as well. | * size and activates a few memory-saving optimizations as well. | |||
*/ | */ | |||
#define FT_CONFIG_OPTION_OLD_INTERNALS | #define FT_CONFIG_OPTION_OLD_INTERNALS | |||
/* | /* | |||
* To detect legacy cache-lookup call from a rogue client (<= 2.1.7), | ||||
* we restrict the number of charmaps in a font. The current API of | ||||
* FTC_CMapCache_Lookup() takes cmap_index & charcode, but old API | ||||
* takes charcode only. To determine the passed value is for cmap_index | ||||
* or charcode, the possible cmap_index is restricted not to exceed | ||||
* the minimum possible charcode by a rogue client. It is also very | ||||
* unlikely that a rogue client is interested in Unicode values 0 to 15. | ||||
* | ||||
* NOTE: The original threshold was 4 deduced from popular number of | ||||
* cmap subtables in UCS-4 TrueType fonts, but now it is not | ||||
* irregular for OpenType fonts to have more than 4 subtables, | ||||
* because variation selector subtables are available for Apple | ||||
* and Microsoft platforms. | ||||
*/ | ||||
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS | ||||
#define FT_MAX_CHARMAP_CACHEABLE 15 | ||||
#endif | ||||
/* | ||||
* This macro is defined if either unpatented or native TrueType | * This macro is defined if either unpatented or native TrueType | |||
* hinting is requested by the definitions above. | * hinting is requested by the definitions above. | |||
*/ | */ | |||
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER | #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER | |||
#define TT_USE_BYTECODE_INTERPRETER | #define TT_USE_BYTECODE_INTERPRETER | |||
#undef TT_CONFIG_OPTION_UNPATENTED_HINTING | #undef TT_CONFIG_OPTION_UNPATENTED_HINTING | |||
#elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING | #elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING | |||
#define TT_USE_BYTECODE_INTERPRETER | #define TT_USE_BYTECODE_INTERPRETER | |||
#endif | #endif | |||
End of changes. 10 change blocks. | ||||
19 lines changed or deleted | 155 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |