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