ftoption.h 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695
  1. /***************************************************************************/
  2. /* */
  3. /* ftoption.h */
  4. /* */
  5. /* User-selectable configuration macros (specification only). */
  6. /* */
  7. /* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by */
  8. /* David Turner, Robert Wilhelm, and Werner Lemberg. */
  9. /* */
  10. /* This file is part of the FreeType project, and may only be used, */
  11. /* modified, and distributed under the terms of the FreeType project */
  12. /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
  13. /* this file you indicate that you have read the license and */
  14. /* understand and accept it fully. */
  15. /* */
  16. /***************************************************************************/
  17. #ifndef __FTOPTION_H__
  18. #define __FTOPTION_H__
  19. #include <ft2build.h>
  20. FT_BEGIN_HEADER
  21. /*************************************************************************/
  22. /* */
  23. /* USER-SELECTABLE CONFIGURATION MACROS */
  24. /* */
  25. /* This file contains the default configuration macro definitions for */
  26. /* a standard build of the FreeType library. There are three ways to */
  27. /* use this file to build project-specific versions of the library: */
  28. /* */
  29. /* - You can modify this file by hand, but this is not recommended in */
  30. /* cases where you would like to build several versions of the */
  31. /* library from a single source directory. */
  32. /* */
  33. /* - You can put a copy of this file in your build directory, more */
  34. /* precisely in `$BUILD/freetype/config/ftoption.h', where `$BUILD' */
  35. /* is the name of a directory that is included _before_ the FreeType */
  36. /* include path during compilation. */
  37. /* */
  38. /* The default FreeType Makefiles and Jamfiles use the build */
  39. /* directory `builds/<system>' by default, but you can easily change */
  40. /* that for your own projects. */
  41. /* */
  42. /* - Copy the file <ft2build.h> to `$BUILD/ft2build.h' and modify it */
  43. /* slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to */
  44. /* locate this file during the build. For example, */
  45. /* */
  46. /* #define FT_CONFIG_OPTIONS_H <myftoptions.h> */
  47. /* #include <freetype/config/ftheader.h> */
  48. /* */
  49. /* will use `$BUILD/myftoptions.h' instead of this file for macro */
  50. /* definitions. */
  51. /* */
  52. /* Note also that you can similarly pre-define the macro */
  53. /* FT_CONFIG_MODULES_H used to locate the file listing of the modules */
  54. /* that are statically linked to the library at compile time. By */
  55. /* default, this file is <freetype/config/ftmodule.h>. */
  56. /* */
  57. /* We highly recommend using the third method whenever possible. */
  58. /* */
  59. /*************************************************************************/
  60. /*************************************************************************/
  61. /*************************************************************************/
  62. /**** ****/
  63. /**** 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 ****/
  64. /**** ****/
  65. /*************************************************************************/
  66. /*************************************************************************/
  67. /*************************************************************************/
  68. /* */
  69. /* Uncomment the line below if you want to activate sub-pixel rendering */
  70. /* (a.k.a. LCD rendering, or ClearType) in this build of the library. */
  71. /* */
  72. /* Note that this feature is covered by several Microsoft patents */
  73. /* and should not be activated in any default build of the library. */
  74. /* */
  75. /* This macro has no impact on the FreeType API, only on its */
  76. /* _implementation_. For example, using FT_RENDER_MODE_LCD when calling */
  77. /* FT_Render_Glyph still generates a bitmap that is 3 times larger than */
  78. /* the original size; the difference will be that each triplet of */
  79. /* subpixels has R=G=B. */
  80. /* */
  81. /* This is done to allow FreeType clients to run unmodified, forcing */
  82. /* them to display normal gray-level anti-aliased glyphs. */
  83. /* */
  84. #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
  85. /*************************************************************************/
  86. /* */
  87. /* Many compilers provide a non-ANSI 64-bit data type that can be used */
  88. /* by FreeType to speed up some computations. However, this will create */
  89. /* some problems when compiling the library in strict ANSI mode. */
  90. /* */
  91. /* For this reason, the use of 64-bit integers is normally disabled when */
  92. /* the __STDC__ macro is defined. You can however disable this by */
  93. /* defining the macro FT_CONFIG_OPTION_FORCE_INT64 here. */
  94. /* */
  95. /* For most compilers, this will only create compilation warnings when */
  96. /* building the library. */
  97. /* */
  98. /* ObNote: The compiler-specific 64-bit integers are detected in the */
  99. /* file `ftconfig.h' either statically or through the */
  100. /* `configure' script on supported platforms. */
  101. /* */
  102. #undef FT_CONFIG_OPTION_FORCE_INT64
  103. /*************************************************************************/
  104. /* */
  105. /* LZW-compressed file support. */
  106. /* */
  107. /* FreeType now handles font files that have been compressed with the */
  108. /* `compress' program. This is mostly used to parse many of the PCF */
  109. /* files that come with various X11 distributions. The implementation */
  110. /* uses NetBSD's `zopen' to partially uncompress the file on the fly */
  111. /* (see src/lzw/ftgzip.c). */
  112. /* */
  113. /* Define this macro if you want to enable this `feature'. */
  114. /* */
  115. #define FT_CONFIG_OPTION_USE_LZW
  116. /*************************************************************************/
  117. /* */
  118. /* Gzip-compressed file support. */
  119. /* */
  120. /* FreeType now handles font files that have been compressed with the */
  121. /* `gzip' program. This is mostly used to parse many of the PCF files */
  122. /* that come with XFree86. The implementation uses `zlib' to */
  123. /* partially uncompress the file on the fly (see src/gzip/ftgzip.c). */
  124. /* */
  125. /* Define this macro if you want to enable this `feature'. See also */
  126. /* the macro FT_CONFIG_OPTION_SYSTEM_ZLIB below. */
  127. /* */
  128. #define FT_CONFIG_OPTION_USE_ZLIB
  129. /*************************************************************************/
  130. /* */
  131. /* ZLib library selection */
  132. /* */
  133. /* This macro is only used when FT_CONFIG_OPTION_USE_ZLIB is defined. */
  134. /* It allows FreeType's `ftgzip' component to link to the system's */
  135. /* installation of the ZLib library. This is useful on systems like */
  136. /* Unix or VMS where it generally is already available. */
  137. /* */
  138. /* If you let it undefined, the component will use its own copy */
  139. /* of the zlib sources instead. These have been modified to be */
  140. /* included directly within the component and *not* export external */
  141. /* function names. This allows you to link any program with FreeType */
  142. /* _and_ ZLib without linking conflicts. */
  143. /* */
  144. /* Do not #undef this macro here since the build system might define */
  145. /* it for certain configurations only. */
  146. /* */
  147. /* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */
  148. /*************************************************************************/
  149. /* */
  150. /* DLL export compilation */
  151. /* */
  152. /* When compiling FreeType as a DLL, some systems/compilers need a */
  153. /* special keyword in front OR after the return type of function */
  154. /* declarations. */
  155. /* */
  156. /* Two macros are used within the FreeType source code to define */
  157. /* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */
  158. /* */
  159. /* FT_EXPORT( return_type ) */
  160. /* */
  161. /* is used in a function declaration, as in */
  162. /* */
  163. /* FT_EXPORT( FT_Error ) */
  164. /* FT_Init_FreeType( FT_Library* alibrary ); */
  165. /* */
  166. /* */
  167. /* FT_EXPORT_DEF( return_type ) */
  168. /* */
  169. /* is used in a function definition, as in */
  170. /* */
  171. /* FT_EXPORT_DEF( FT_Error ) */
  172. /* FT_Init_FreeType( FT_Library* alibrary ) */
  173. /* { */
  174. /* ... some code ... */
  175. /* return FT_Err_Ok; */
  176. /* } */
  177. /* */
  178. /* You can provide your own implementation of FT_EXPORT and */
  179. /* FT_EXPORT_DEF here if you want. If you leave them undefined, they */
  180. /* will be later automatically defined as `extern return_type' to */
  181. /* allow normal compilation. */
  182. /* */
  183. /* Do not #undef these macros here since the build system might define */
  184. /* them for certain configurations only. */
  185. /* */
  186. /* #define FT_EXPORT(x) extern x */
  187. /* #define FT_EXPORT_DEF(x) x */
  188. #ifndef __GNUC__
  189. # define __DLL_IMPORT__ __declspec(dllimport)
  190. # define __DLL_EXPORT__ __declspec(dllexport)
  191. #else
  192. # define __DLL_IMPORT__ __attribute__((dllimport)) extern
  193. # define __DLL_EXPORT__ __attribute__((dllexport)) extern
  194. #endif
  195. #if (defined __WIN32__) || (defined _WIN32)
  196. # ifdef BUILD_FREETYPE2_DLL
  197. # define FREETYPE2_DLL_IMPEXP __DLL_EXPORT__
  198. # elif defined(FREETYPE2_STATIC)
  199. # define FREETYPE2_DLL_IMPEXP
  200. # elif defined (USE_FREETYPE2_DLL)
  201. # define FREETYPE2_DLL_IMPEXP __DLL_IMPORT__
  202. # elif defined (USE_FREETYPE2_STATIC)
  203. # define FREETYPE2_DLL_IMPEXP
  204. # else /* assume USE_FREETYPE2_DLL */
  205. # define FREETYPE2_DLL_IMPEXP __DLL_IMPORT__
  206. # endif
  207. #else /* __WIN32__ */
  208. # define FREETYPE2_DLL_IMPEXP
  209. #endif
  210. #define FT_EXPORT(x) FREETYPE2_DLL_IMPEXP x
  211. #define FT_BASE(x) FREETYPE2_DLL_IMPEXP x
  212. /*************************************************************************/
  213. /* */
  214. /* Glyph Postscript Names handling */
  215. /* */
  216. /* By default, FreeType 2 is compiled with the `PSNames' module. This */
  217. /* module is in charge of converting a glyph name string into a */
  218. /* Unicode value, or return a Macintosh standard glyph name for the */
  219. /* use with the TrueType `post' table. */
  220. /* */
  221. /* Undefine this macro if you do not want `PSNames' compiled in your */
  222. /* build of FreeType. This has the following effects: */
  223. /* */
  224. /* - The TrueType driver will provide its own set of glyph names, */
  225. /* if you build it to support postscript names in the TrueType */
  226. /* `post' table. */
  227. /* */
  228. /* - The Type 1 driver will not be able to synthetize a Unicode */
  229. /* charmap out of the glyphs found in the fonts. */
  230. /* */
  231. /* You would normally undefine this configuration macro when building */
  232. /* a version of FreeType that doesn't contain a Type 1 or CFF driver. */
  233. /* */
  234. #define FT_CONFIG_OPTION_POSTSCRIPT_NAMES
  235. /*************************************************************************/
  236. /* */
  237. /* Postscript Names to Unicode Values support */
  238. /* */
  239. /* By default, FreeType 2 is built with the `PSNames' module compiled */
  240. /* in. Among other things, the module is used to convert a glyph name */
  241. /* into a Unicode value. This is especially useful in order to */
  242. /* synthetize on the fly a Unicode charmap from the CFF/Type 1 driver */
  243. /* through a big table named the `Adobe Glyph List' (AGL). */
  244. /* */
  245. /* Undefine this macro if you do not want the Adobe Glyph List */
  246. /* compiled in your `PSNames' module. The Type 1 driver will not be */
  247. /* able to synthetize a Unicode charmap out of the glyphs found in the */
  248. /* fonts. */
  249. /* */
  250. #define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
  251. /*************************************************************************/
  252. /* */
  253. /* Support for Mac fonts */
  254. /* */
  255. /* Define this macro if you want support for outline fonts in Mac */
  256. /* format (mac dfont, mac resource, macbinary containing a mac */
  257. /* resource) on non-Mac platforms. */
  258. /* */
  259. /* Note that the `FOND' resource isn't checked. */
  260. /* */
  261. #define FT_CONFIG_OPTION_MAC_FONTS
  262. /*************************************************************************/
  263. /* */
  264. /* Guessing methods to access embedded resource forks */
  265. /* */
  266. /* Enable extra Mac fonts support on non-Mac platforms (e.g. */
  267. /* GNU/Linux). */
  268. /* */
  269. /* Resource forks which include fonts data are stored sometimes in */
  270. /* locations which users or developers don't expected. In some cases, */
  271. /* resource forks start with some offset from the head of a file. In */
  272. /* other cases, the actual resource fork is stored in file different */
  273. /* from what the user specifies. If this option is activated, */
  274. /* FreeType tries to guess whether such offsets or different file */
  275. /* names must be used. */
  276. /* */
  277. /* Note that normal, direct access of resource forks is controlled via */
  278. /* the FT_CONFIG_OPTION_MAC_FONTS option. */
  279. /* */
  280. #ifdef FT_CONFIG_OPTION_MAC_FONTS
  281. #define FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK
  282. #endif
  283. /*************************************************************************/
  284. /* */
  285. /* Allow the use of FT_Incremental_Interface to load typefaces that */
  286. /* contain no glyph data, but supply it via a callback function. */
  287. /* This allows FreeType to be used with the PostScript language, using */
  288. /* the GhostScript interpreter. */
  289. /* */
  290. /* #define FT_CONFIG_OPTION_INCREMENTAL */
  291. /*************************************************************************/
  292. /* */
  293. /* The size in bytes of the render pool used by the scan-line converter */
  294. /* to do all of its work. */
  295. /* */
  296. /* This must be greater than 4KByte if you use FreeType to rasterize */
  297. /* glyphs; otherwise, you may set it to zero to avoid unnecessary */
  298. /* allocation of the render pool. */
  299. /* */
  300. #define FT_RENDER_POOL_SIZE 16384L
  301. /*************************************************************************/
  302. /* */
  303. /* FT_MAX_MODULES */
  304. /* */
  305. /* The maximum number of modules that can be registered in a single */
  306. /* FreeType library object. 32 is the default. */
  307. /* */
  308. #define FT_MAX_MODULES 32
  309. /*************************************************************************/
  310. /* */
  311. /* Debug level */
  312. /* */
  313. /* FreeType can be compiled in debug or trace mode. In debug mode, */
  314. /* errors are reported through the `ftdebug' component. In trace */
  315. /* mode, additional messages are sent to the standard output during */
  316. /* execution. */
  317. /* */
  318. /* Define FT_DEBUG_LEVEL_ERROR to build the library in debug mode. */
  319. /* Define FT_DEBUG_LEVEL_TRACE to build it in trace mode. */
  320. /* */
  321. /* Don't define any of these macros to compile in `release' mode! */
  322. /* */
  323. /* Do not #undef these macros here since the build system might define */
  324. /* them for certain configurations only. */
  325. /* */
  326. /* #define FT_DEBUG_LEVEL_ERROR */
  327. /* #define FT_DEBUG_LEVEL_TRACE */
  328. /*************************************************************************/
  329. /* */
  330. /* Memory Debugging */
  331. /* */
  332. /* FreeType now comes with an integrated memory debugger that is */
  333. /* capable of detecting simple errors like memory leaks or double */
  334. /* deletes. To compile it within your build of the library, you */
  335. /* should define FT_DEBUG_MEMORY here. */
  336. /* */
  337. /* Note that the memory debugger is only activated at runtime when */
  338. /* when the _environment_ variable `FT2_DEBUG_MEMORY' is defined also! */
  339. /* */
  340. /* Do not #undef this macro here since the build system might define */
  341. /* it for certain configurations only. */
  342. /* */
  343. /* #define FT_DEBUG_MEMORY */
  344. /*************************************************************************/
  345. /* */
  346. /* Module errors */
  347. /* */
  348. /* If this macro is set (which is _not_ the default), the higher byte */
  349. /* of an error code gives the module in which the error has occurred, */
  350. /* while the lower byte is the real error code. */
  351. /* */
  352. /* Setting this macro makes sense for debugging purposes only, since */
  353. /* it would break source compatibility of certain programs that use */
  354. /* FreeType 2. */
  355. /* */
  356. /* More details can be found in the files ftmoderr.h and fterrors.h. */
  357. /* */
  358. #undef FT_CONFIG_OPTION_USE_MODULE_ERRORS
  359. /*************************************************************************/
  360. /*************************************************************************/
  361. /**** ****/
  362. /**** S F N T D R I V E R C O N F I G U R A T I O N ****/
  363. /**** ****/
  364. /*************************************************************************/
  365. /*************************************************************************/
  366. /*************************************************************************/
  367. /* */
  368. /* Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support */
  369. /* embedded bitmaps in all formats using the SFNT module (namely */
  370. /* TrueType & OpenType). */
  371. /* */
  372. #define TT_CONFIG_OPTION_EMBEDDED_BITMAPS
  373. /*************************************************************************/
  374. /* */
  375. /* Define TT_CONFIG_OPTION_POSTSCRIPT_NAMES if you want to be able to */
  376. /* load and enumerate the glyph Postscript names in a TrueType or */
  377. /* OpenType file. */
  378. /* */
  379. /* Note that when you do not compile the `PSNames' module by undefining */
  380. /* the above FT_CONFIG_OPTION_POSTSCRIPT_NAMES, the `sfnt' module will */
  381. /* contain additional code used to read the PS Names table from a font. */
  382. /* */
  383. /* (By default, the module uses `PSNames' to extract glyph names.) */
  384. /* */
  385. #define TT_CONFIG_OPTION_POSTSCRIPT_NAMES
  386. /*************************************************************************/
  387. /* */
  388. /* Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to */
  389. /* access the internal name table in a SFNT-based format like TrueType */
  390. /* or OpenType. The name table contains various strings used to */
  391. /* describe the font, like family name, copyright, version, etc. It */
  392. /* does not contain any glyph name though. */
  393. /* */
  394. /* Accessing SFNT names is done through the functions declared in */
  395. /* `freetype/ftnames.h'. */
  396. /* */
  397. #define TT_CONFIG_OPTION_SFNT_NAMES
  398. /*************************************************************************/
  399. /* */
  400. /* TrueType CMap support */
  401. /* */
  402. /* Here you can fine-tune which TrueType CMap table format shall be */
  403. /* supported. */
  404. #define TT_CONFIG_CMAP_FORMAT_0
  405. #define TT_CONFIG_CMAP_FORMAT_2
  406. #define TT_CONFIG_CMAP_FORMAT_4
  407. #define TT_CONFIG_CMAP_FORMAT_6
  408. #define TT_CONFIG_CMAP_FORMAT_8
  409. #define TT_CONFIG_CMAP_FORMAT_10
  410. #define TT_CONFIG_CMAP_FORMAT_12
  411. /*************************************************************************/
  412. /*************************************************************************/
  413. /**** ****/
  414. /**** 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 ****/
  415. /**** ****/
  416. /*************************************************************************/
  417. /*************************************************************************/
  418. /*************************************************************************/
  419. /* */
  420. /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile */
  421. /* a bytecode interpreter in the TrueType driver. Note that there are */
  422. /* important patent issues related to the use of the interpreter. */
  423. /* */
  424. /* By undefining this, you will only compile the code necessary to load */
  425. /* TrueType glyphs without hinting. */
  426. /* */
  427. /* Do not #undef this macro here, since the build system might */
  428. /* define it for certain configurations only. */
  429. /* */
  430. /* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
  431. /*************************************************************************/
  432. /* */
  433. /* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */
  434. /* of the TrueType bytecode interpreter is used that doesn't implement */
  435. /* any of the patented opcodes and algorithms. Note that the */
  436. /* the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* if you */
  437. /* define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; with other words, */
  438. /* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */
  439. /* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time. */
  440. /* */
  441. /* This macro is only useful for a small number of font files (mostly */
  442. /* for Asian scripts) that require bytecode interpretation to properly */
  443. /* load glyphs. For all other fonts, this produces unpleasant results, */
  444. /* thus the unpatented interpreter is never used to load glyphs from */
  445. /* TrueType fonts unless one of the following two options is used. */
  446. /* */
  447. /* - The unpatented interpreter is explicitly activated by the user */
  448. /* through the FT_PARAM_TAG_UNPATENTED_HINTING parameter tag */
  449. /* when opening the FT_Face. */
  450. /* */
  451. /* - FreeType detects that the FT_Face corresponds to one of the */
  452. /* `trick' fonts (e.g., `Mingliu') it knows about. The font engine */
  453. /* contains a hard-coded list of font names and other matching */
  454. /* parameters (see function `tt_face_init' in file */
  455. /* `src/truetype/ttobjs.c'). */
  456. /* */
  457. /* Here a sample code snippet for using FT_PARAM_TAG_UNPATENTED_HINTING. */
  458. /* */
  459. /* { */
  460. /* FT_Parameter parameter; */
  461. /* FT_Open_Args open_args; */
  462. /* */
  463. /* */
  464. /* parameter.tag = FT_PARAM_TAG_UNPATENTED_HINTING; */
  465. /* */
  466. /* open_args.flags = FT_OPEN_PATHNAME | FT_OPEN_PARAMS; */
  467. /* open_args.pathname = my_font_pathname; */
  468. /* open_args.num_params = 1; */
  469. /* open_args.params = &parameter; */
  470. /* */
  471. /* error = FT_Open_Face( library, &open_args, index, &face ); */
  472. /* ... */
  473. /* } */
  474. /* */
  475. #define TT_CONFIG_OPTION_UNPATENTED_HINTING
  476. /*************************************************************************/
  477. /* */
  478. /* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType */
  479. /* bytecode interpreter with a huge switch statement, rather than a call */
  480. /* table. This results in smaller and faster code for a number of */
  481. /* architectures. */
  482. /* */
  483. /* Note however that on some compiler/processor combinations, undefining */
  484. /* this macro will generate faster, though larger, code. */
  485. /* */
  486. #define TT_CONFIG_OPTION_INTERPRETER_SWITCH
  487. /*************************************************************************/
  488. /* */
  489. /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the */
  490. /* TrueType glyph loader to use Apple's definition of how to handle */
  491. /* component offsets in composite glyphs. */
  492. /* */
  493. /* Apple and MS disagree on the default behavior of component offsets */
  494. /* in composites. Apple says that they should be scaled by the scaling */
  495. /* factors in the transformation matrix (roughly, it's more complex) */
  496. /* while MS says they should not. OpenType defines two bits in the */
  497. /* composite flags array which can be used to disambiguate, but old */
  498. /* fonts will not have them. */
  499. /* */
  500. /* http://partners.adobe.com/asn/developer/opentype/glyf.html */
  501. /* http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html */
  502. /* */
  503. #undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
  504. /*************************************************************************/
  505. /* */
  506. /* Define TT_CONFIG_OPTION_GX_VAR_SUPPORT if you want to include */
  507. /* support for Apple's distortable font technology (fvar, gvar, cvar, */
  508. /* and avar tables). This has many similarities to Type 1 Multiple */
  509. /* Masters support. */
  510. /* */
  511. #define TT_CONFIG_OPTION_GX_VAR_SUPPORT
  512. /*************************************************************************/
  513. /* */
  514. /* Define TT_CONFIG_OPTION_BDF if you want to include support for */
  515. /* an embedded `BDF ' table within SFNT-based bitmap formats. */
  516. /* */
  517. #define TT_CONFIG_OPTION_BDF
  518. /*************************************************************************/
  519. /*************************************************************************/
  520. /**** ****/
  521. /**** T Y P E 1 D R I V E R C O N F I G U R A T I O N ****/
  522. /**** ****/
  523. /*************************************************************************/
  524. /*************************************************************************/
  525. /*************************************************************************/
  526. /* */
  527. /* T1_MAX_DICT_DEPTH is the maximal depth of nest dictionaries and */
  528. /* arrays in the Type 1 stream (see t1load.c). A minimum of 4 is */
  529. /* required. */
  530. /* */
  531. #define T1_MAX_DICT_DEPTH 5
  532. /*************************************************************************/
  533. /* */
  534. /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine */
  535. /* calls during glyph loading. */
  536. /* */
  537. #define T1_MAX_SUBRS_CALLS 16
  538. /*************************************************************************/
  539. /* */
  540. /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity. A */
  541. /* minimum of 16 is required. */
  542. /* */
  543. /* The Chinese font MingTiEG-Medium (CNS 11643 character set) needs 256. */
  544. /* */
  545. #define T1_MAX_CHARSTRINGS_OPERANDS 256
  546. /*************************************************************************/
  547. /* */
  548. /* Define this configuration macro if you want to prevent the */
  549. /* compilation of `t1afm', which is in charge of reading Type 1 AFM */
  550. /* files into an existing face. Note that if set, the T1 driver will be */
  551. /* unable to produce kerning distances. */
  552. /* */
  553. #undef T1_CONFIG_OPTION_NO_AFM
  554. /*************************************************************************/
  555. /* */
  556. /* Define this configuration macro if you want to prevent the */
  557. /* compilation of the Multiple Masters font support in the Type 1 */
  558. /* driver. */
  559. /* */
  560. #undef T1_CONFIG_OPTION_NO_MM_SUPPORT
  561. /*************************************************************************/
  562. /*************************************************************************/
  563. /**** ****/
  564. /**** 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 ****/
  565. /**** ****/
  566. /*************************************************************************/
  567. /*************************************************************************/
  568. /*************************************************************************/
  569. /* */
  570. /* Compile autofit module with CJK script support. */
  571. /* */
  572. #define AF_CONFIG_OPTION_CJK
  573. /*************************************************************************/
  574. /* */
  575. /* Compile autofit module with Indic script support. */
  576. /* */
  577. #define AF_CONFIG_OPTION_INDIC
  578. /* */
  579. /*
  580. * Define this variable if you want to keep the layout of internal
  581. * structures that was used prior to FreeType 2.2. This also compiles in
  582. * a few obsolete functions to avoid linking problems on typical Unix
  583. * distributions.
  584. *
  585. * For embedded systems or building a new distribution from scratch, it
  586. * is recommended to disable the macro since it reduces the library's code
  587. * size and activates a few memory-saving optimizations as well.
  588. */
  589. /* #define FT_CONFIG_OPTION_OLD_INTERNALS */
  590. /*
  591. * This variable is defined if either unpatented or native TrueType
  592. * hinting is requested by the definitions above.
  593. */
  594. #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
  595. #define TT_USE_BYTECODE_INTERPRETER
  596. #elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING
  597. #define TT_USE_BYTECODE_INTERPRETER
  598. #endif
  599. FT_END_HEADER
  600. #endif /* __FTOPTION_H__ */
  601. /* END */