home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: SysTools / SysTools.zip / ft-beta.zip / freetype / lib / ttconfig.h < prev    next >
C/C++ Source or Header  |  1997-10-06  |  8KB  |  198 lines

  1. /*******************************************************************
  2.  *
  3.  *  ttconfig.h                                                1.0   
  4.  *
  5.  *    Configuration settings header file (spec only).            
  6.  *
  7.  *  Copyright 1996, 1997 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.  *  Notes :
  17.  *
  18.  *    All the configuration #define statements have been gathered in
  19.  *    this file to allow easy check and modification.       
  20.  *
  21.  ******************************************************************/
  22.  
  23. #ifndef TTCONFIG_H
  24. #define TTCONFIG_H
  25.  
  26. /* ------------ auto configuration ------------------------------------- */
  27.  
  28. /* Here we include the file ft_conf.h for system dependent stuff.        */
  29. /* The specific makefile is responsible for providing the right path to  */
  30. /* this file.                                                            */
  31.  
  32. #include "ft_conf.h"
  33.  
  34.  
  35. /* ------------ general debugging -------------------------------------- */
  36.  
  37. /* Define DEBUG if you want the program to output a series of messages   */
  38. /* to stderr regarding its behaviour. Only useful during development.    */
  39.  
  40. /* #define DEBUG */
  41.  
  42.  
  43. /* ------------ arithmetic and processor support - ttcalc, ttraster ---- */
  44.  
  45. /* Define ONE_COMPLEMENT if this matches your processor's artihmetic.    */
  46. /* The default is 2's complement. 1's complement is not supported yet.   */
  47. /* (and probably never will :-)                                          */
  48.  
  49. /* #define ONE_COMPLEMENT */
  50.  
  51.  
  52. /* BOUND_CALC isn't needed anymore, due to changes in the ttcalc */
  53. /* component. All computations are now bounded..                 */
  54.  
  55.  
  56. /* Define _GNUC_LONG64_ if you want to enable the use of the 'long long' */
  57. /* 64-bit type provided by gcc. Note that :                              */
  58. /*                                                                       */
  59. /*   1. The type isn't ANSI, and thus will produce many warnings         */
  60. /*      during lib compiles                                              */
  61. /*                                                                       */
  62. /*   2. Though the generated object files are slightly smaller, the      */
  63. /*      resulting executables are bigger of about 4Kb ! gcc must be      */
  64. /*      linking some extra code in there !                               */
  65. /*                                                                       */
  66. /*   3. There is really no speed gain in doing so (but it may help       */
  67. /*      debug the ttcalc component)                                      */
  68. /*                                                                       */
  69. /* IMPORTANT NOTE : You don't need to define it on 64-bits machines !!   */
  70.  
  71. /* #define _GNUC_LONG64_ */
  72.  
  73.  
  74. /* define BUS_ERROR if your processor is unable to access words that */
  75. /* are not aligned to their respective size (i.e. a 4byte dword      */
  76. /* beginning at address 3 will result in a bus error on a Sun)       */
  77.  
  78. /* This may speed up a bit some parts of the engine */
  79.  
  80. /* #define BUS_ERROR */
  81.  
  82.  
  83. /* define ALIGNMENT to your processor/environment preferred alignment */
  84. /* size. A value of 8 should work on all current processors, even     */
  85. /* 64-bits ones..                                                     */
  86.  
  87. #define ALIGNMENT 8
  88.  
  89.  
  90. /* ------------ rasterizer configuration ----- ttraster ----------------- */
  91.  
  92. /* Define this if you want to use the 'MulDiv' function from 'ttcalc'.    */
  93. /* (it computes (A*B)/C with 64 bits intermediate accuracy. However, for  */
  94. /* 99.9% of screen display, this operation can be done directly with      */
  95. /* good accuracy, because 'B' is only a 6bit integer).                    */
  96. /*                                                                        */
  97. /* Note that some compilers can manage directly 'a*b/c' with intermediate */
  98. /* accuracy (GCC can use long longs, for example). Using the unsecure     */
  99. /* definition of MulDiv would then be sufficient.                         */
  100. /*                                                                        */
  101. /* The SECURE_COMPUTATIONS option is probably a good option for 16 bits   */
  102. /*  compilers.                                                            */
  103.  
  104. /* #define SECURE_COMPUTATIONS */
  105.  
  106.  
  107. /* Define this if you want to generate a debug version of the rasterizer. */
  108. /* This will progressively draw the glyphs while the computations are     */
  109. /* done directly on the graphics screen... (with inverted glyphs)         */
  110. /*                                                                        */
  111.  
  112. /* IMPORTANT: This is reserved to developers willing to debug the */
  113. /*            rasterizer, which seems working very well in its    */
  114. /*            current state..                                     */
  115.  
  116. /* #define DEBUG_RASTER */
  117.  
  118.  
  119. /* The TrueType specs stipulate that the filled regions delimited by  */
  120. /* the contours must be to the right of the drawing orientation.      */
  121. /* Unfortunately, a lot of cheapo fonts do not respect this rule.     */
  122. /*                                                                    */
  123. /* Defining IGNORE_FILL_FLOW builds an engine that manages all cases. */
  124. /* Not defining it will only draw 'valid' glyphs & contours.          */
  125.  
  126. #define IGNORE_FILL_FLOW
  127. /* We want to draw all kinds of glyphs, even incorrect ones... */
  128.  
  129.  
  130.  
  131.  
  132. /* --------------- automatic setup -- don't touch ------------------ */
  133.  
  134. /* some systems can't use vfprintf for error messages on stderr; if  */
  135. /* HAVE_PRINT_FUNCTION is defined, the Print macro must be supplied  */
  136. /* externally (having the same parameters).                          */
  137.  
  138. #ifndef HAVE_PRINT_FUNCTION
  139. #define Print( format, ap )  vfprintf( stderr, (format), (ap) )
  140. #endif
  141.  
  142. #define FT_BIG_ENDIAN     4321
  143. #define FT_LITTLE_ENDIAN  1234
  144.  
  145. #ifdef WORDS_BIGENDIAN
  146. #define FT_BYTE_ORDER  FT_BIG_ENDIAN
  147. #else
  148. #define FT_BYTE_ORDER  FT_LITTLE_ENDIAN
  149. #endif
  150.  
  151. #if FT_BYTE_ORDER == FT_BIG_ENDIAN
  152. #ifndef BUS_ERROR
  153.  
  154. /* Some big-endian machines that are not alignment-sensitive may   */
  155. /* benefit from an easier access to the data found in the TrueType */
  156. /* files. (used in ttfile.c)                                       */
  157.  
  158. #define LOOSE_ACCESS
  159.  
  160. #endif /* !BUS_ERROR */
  161. #endif /* FT_BYTE_ORDER */
  162.  
  163. /* -------------------- table management configuration ------------ */
  164.  
  165. /* Define TT_CONFIG_THREAD_SAFE if you want to build a thread-safe */
  166. /* version of the library                                          */
  167. #undef TT_CONFIG_THREAD_SAFE
  168.  
  169. /* Define TT_CONFIG_REENTRANT if you want to build a re-entrant version */
  170. /* of the library. This flag takes over TT_CONFIG_THREAD_SAFE but it is */
  171. /* highly recommended to leave only one of them defined                 */
  172. #undef TT_CONFIG_REENTRANT
  173.  
  174. #if defined(TT_CONFIG_THREAD_SAFE) || defined(TT_CONFIG_REENTRANT)
  175. #define TT_CONFIG_THREADS
  176. #endif
  177.  
  178. /* Defining none of these two flags produces a single-thread version of */
  179. /* the library                                                          */
  180.  
  181. #undef TT_STATIC_INTERPRETER
  182. /* Do not undefine this configuration macro. It is now a default that */
  183. /* must be kept in all release builds..                               */
  184.  
  185. #undef TT_STATIC_RASTER
  186. /* Define this if you want to generate a static raster. This makes */
  187. /* a non re-entrant version of the scan-line converter, which is   */
  188. /* about 10% faster and 50% bigger than an indirect one !!         */
  189.  
  190. #define TT_EXTEND_ENGINE
  191. /* Undefine this macro if you don't want to generate any extensions to     */
  192. /* the engine. This may be useful to detect if a bug comes from the engine */
  193. /* itself or some badly written extension..                                */
  194.  
  195. #endif /* TTCONFIG_H */
  196. /* End */
  197.  
  198.