Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5496 | leency | 1 | /******************************************************************* |
2 | * |
||
3 | * ttconfig.h 1.0 |
||
4 | * |
||
5 | * Configuration settings header file (spec only). |
||
6 | * |
||
7 | * Copyright 1996-1999 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 | |||
27 | |||
28 | /* ------------ auto configuration ------------------------------------- */ |
||
29 | |||
30 | |||
31 | /*************************************************************************/ |
||
32 | /* Here we include the file ft_conf.h for system dependent stuff. */ |
||
33 | /* The specific makefile is responsible for providing the right path to */ |
||
34 | /* this file. */ |
||
35 | |||
36 | #include "ft_conf.h" |
||
37 | |||
38 | |||
39 | /**************************************************************************/ |
||
40 | /* Define TT_CONFIG_THREAD_SAFE if you want to build a thread-safe */ |
||
41 | /* version of the library. */ |
||
42 | |||
43 | /* #define TT_CONFIG_OPTION_THREAD_SAFE */ |
||
44 | |||
45 | |||
46 | |||
47 | /* ------------ general debugging -------------------------------------- */ |
||
48 | |||
49 | |||
50 | /************************************************************************* |
||
51 | * |
||
52 | * There are now three debugging modes: |
||
53 | * |
||
54 | * - trace mode: |
||
55 | * |
||
56 | * Error and trace messages are sent to the log file |
||
57 | * (which can be the standard error output). Define |
||
58 | * DEBUG_LEVEL_TRACE to enable this mode. |
||
59 | * |
||
60 | * - error mode: |
||
61 | * |
||
62 | * Only error messages are generated. Define |
||
63 | * DEBUG_LEVEL_ERROR to enable this mode. |
||
64 | * |
||
65 | * - release mode: |
||
66 | * |
||
67 | * Error messages are neither sent nor generated. The code is |
||
68 | * free from any debugging parts. |
||
69 | * |
||
70 | * |
||
71 | * Note that you should link the engine with the 'ttdebug' component. |
||
72 | * in case either DEBUG_LEVEL_TRACE or DEBUG_LEVEL_ERROR is defined. |
||
73 | * |
||
74 | * Please consult ttdebug.h for more details. */ |
||
75 | |||
76 | /* #define DEBUG_LEVEL_TRACE */ |
||
77 | /* #define DEBUG_LEVEL_ERROR */ |
||
78 | |||
79 | |||
80 | |||
81 | /* ------------ special debugging -------------------------------------- */ |
||
82 | |||
83 | |||
84 | /*************************************************************************/ |
||
85 | /* Define this if you want to generate a special debug version of the */ |
||
86 | /* rasterizer. This will progressively draw the glyphs while the */ |
||
87 | /* computations are done directly on the graphics screen... (with */ |
||
88 | /* inverted glyphs). */ |
||
89 | /* */ |
||
90 | /* Use it at your own risk! It is not maintained currently. */ |
||
91 | /* */ |
||
92 | /* IMPORTANT: This is reserved to developers willing to debug the */ |
||
93 | /* rasterizer, which seems working very well in its */ |
||
94 | /* current state... */ |
||
95 | |||
96 | /* #define DEBUG_RASTER */ |
||
97 | |||
98 | |||
99 | /*************************************************************************/ |
||
100 | /* Define this to have a simple debugger version of RunIns(). */ |
||
101 | /* */ |
||
102 | /* Use it at your own risk! It is not maintained currently. */ |
||
103 | |||
104 | /* #define DEBUG_INTERPRETER */ |
||
105 | |||
106 | |||
107 | /*************************************************************************/ |
||
108 | /* Define this to have some housekeeping of allocation and deallocation. */ |
||
109 | /* */ |
||
110 | /* Please note that probably not all OS-specific versions of ttmemory.c */ |
||
111 | /* provide this functionality. */ |
||
112 | |||
113 | /* #define DEBUG_MEMORY */ |
||
114 | |||
115 | |||
116 | /*************************************************************************/ |
||
117 | /* Define this to have bounds checking for file buffer frames. */ |
||
118 | /* */ |
||
119 | /* Please note that probably not all OS-specific versions of ttfile.c */ |
||
120 | /* provide this functionality. */ |
||
121 | |||
122 | /* #define DEBUG_FILE */ |
||
123 | |||
124 | |||
125 | |||
126 | /* ------------ arithmetic and processor support ----------------------- */ |
||
127 | |||
128 | |||
129 | /*************************************************************************/ |
||
130 | /* Define TT_USE_LONG_LONG if you want to enable the use of the */ |
||
131 | /* 'long long' 64-bit type provided by gcc and other compilers. Note */ |
||
132 | /* that : */ |
||
133 | /* */ |
||
134 | /* 1. The type isn't ANSI, and thus will produce many warnings */ |
||
135 | /* during library compilation. */ |
||
136 | /* */ |
||
137 | /* 2. Though the generated object files are slightly smaller, the */ |
||
138 | /* resulting executables are bigger of about 4Kb! gcc must be */ |
||
139 | /* linking some extra code in there! */ |
||
140 | /* */ |
||
141 | /* 3. There is really no speed gain in doing so (but it may help */ |
||
142 | /* debug the ttcalc component). */ |
||
143 | /* */ |
||
144 | /* IMPORTANT NOTE: You don't need to define it on 64-bits machines! */ |
||
145 | /* */ |
||
146 | /* NOTE 2 : This flag used to be _GNUC_LONG64_ */ |
||
147 | |||
148 | /* #define TT_USE_LONG_LONG */ |
||
149 | |||
150 | |||
151 | /*************************************************************************/ |
||
152 | /* define ALIGNMENT to your processor/environment preferred alignment */ |
||
153 | /* size. A value of 8 should work on all current processors, even */ |
||
154 | /* 64-bits ones. */ |
||
155 | |||
156 | #define ALIGNMENT 8 |
||
157 | |||
158 | |||
159 | |||
160 | /* --------------- miscellaneous ----------------------------------- */ |
||
161 | |||
162 | |||
163 | /*********************************************************************/ |
||
164 | /* The number of extensions available. Don't change this value */ |
||
165 | /* except if you add new extensions to the engine. */ |
||
166 | |||
167 | #define TT_MAX_EXTENSIONS 8 |
||
168 | |||
169 | |||
170 | |||
171 | /* --------------- automatic setup -- don't touch ------------------ */ |
||
172 | |||
173 | |||
174 | /*********************************************************************/ |
||
175 | /* If HAVE_TT_TEXT is defined we don't provide a default typedef for */ |
||
176 | /* defining TT_Text. */ |
||
177 | |||
178 | #ifndef HAVE_TT_TEXT |
||
179 | #define HAVE_TT_TEXT |
||
180 | typedef char TT_Text; |
||
181 | #endif |
||
182 | |||
183 | |||
184 | /*********************************************************************/ |
||
185 | /* We define NULL in case it's not defined yet. The default */ |
||
186 | /* location is stdlib.h. */ |
||
187 | |||
188 | #ifdef HAVE_STDLIB_H |
||
189 | #include |
||
190 | #endif |
||
191 | |||
192 | |||
193 | /*********************************************************************/ |
||
194 | /* Some systems can't use vfprintf for error messages on stderr; if */ |
||
195 | /* HAVE_PRINT_FUNCTION is defined, the Print macro must be supplied */ |
||
196 | /* externally (having the same parameters). */ |
||
197 | /* */ |
||
198 | /* This is only used by the "ttdebug" component, which should be */ |
||
199 | /* linked to the engine only in debug mode. */ |
||
200 | |||
201 | #if defined( DEBUG_LEVEL_TRACE ) || defined( DEBUG_LEVEL_ERROR ) |
||
202 | #ifndef HAVE_PRINT_FUNCTION |
||
203 | #define Print( format, ap ) vfprintf( stderr, (format), (ap) ) |
||
204 | #endif |
||
205 | #endif |
||
206 | |||
207 | |||
208 | /********************************************************************/ |
||
209 | /* */ |
||
210 | /* I have added the ability to compile the library into a single */ |
||
211 | /* object file. This gets rids of all the external symbols defined */ |
||
212 | /* in each component interface, and de-pollutes the name-space. */ |
||
213 | /* */ |
||
214 | /* I use two macros, namely LOCAL_FUNC and LOCAL_DEF, which only */ |
||
215 | /* apply to functions that are internal to the engine, and */ |
||
216 | /* should never be seen or linked by a client application. */ |
||
217 | /* */ |
||
218 | /* LOCAL_DEF used in header (.h) files, to define a function */ |
||
219 | /* that will be seen by other components. This */ |
||
220 | /* translates to "extern" in normal mode, and to */ |
||
221 | /* "static" in single-object mode. */ |
||
222 | /* */ |
||
223 | /* LOCAL_FUNC used in implementation (.c) files, just before */ |
||
224 | /* the function body. This translates to nothing */ |
||
225 | /* in normal mode, and to "static" in single-object */ |
||
226 | /* mode. */ |
||
227 | /* */ |
||
228 | /* Getting rid of un-necessary symbols makes the "ttcommon" */ |
||
229 | /* renaming macros hack unnecessary. Moreover, the stripped */ |
||
230 | /* single object file (freetype.o) is 52 Kb, instead of the */ |
||
231 | /* previous 57 Kb (size of all combined .o files), and gives */ |
||
232 | /* a better idea of the engine's real code size. */ |
||
233 | /* */ |
||
234 | /* It is called a "MAKE_OPTION" because the macro must be */ |
||
235 | /* defined in the Makefile, rather than this one. It allows */ |
||
236 | /* any developer to quickly switch from one mode to the other */ |
||
237 | /* without messing with "ttconfig.h" each time. */ |
||
238 | /* */ |
||
239 | #ifndef TT_MAKE_OPTION_SINGLE_OBJECT |
||
240 | #define LOCAL_FUNC /* void */ |
||
241 | #define LOCAL_DEF extern |
||
242 | #else |
||
243 | #define LOCAL_FUNC static |
||
244 | #define LOCAL_DEF static |
||
245 | #endif |
||
246 | |||
247 | |||
248 | /*************************************************************************/ |
||
249 | /* Define EXPORT_DEF and EXPORT_FUNC as needed to build e.g. a DLL. All */ |
||
250 | /* variables and functions visible from outside have these prefixes. */ |
||
251 | |||
252 | #ifndef EXPORT_DEF |
||
253 | #define EXPORT_DEF extern |
||
254 | #endif |
||
255 | |||
256 | #ifndef EXPORT_FUNC |
||
257 | #define EXPORT_FUNC /* void */ |
||
258 | #endif |
||
259 | |||
260 | |||
261 | |||
262 | /* -------------- internal (developer) configuration toggles ------------ */ |
||
263 | |||
264 | |||
265 | #undef TT_STATIC_INTERPRETER |
||
266 | /* Do not undefine this configuration macro. It is now a default that */ |
||
267 | /* must be kept in all release builds. */ |
||
268 | |||
269 | |||
270 | #undef TT_STATIC_RASTER |
||
271 | /* Define this if you want to generate a static raster. This makes */ |
||
272 | /* a non re-entrant version of the scan-line converter, which is */ |
||
273 | /* about 10% faster and 50% bigger than an indirect one! */ |
||
274 | |||
275 | |||
276 | #endif /* TTCONFIG_H */ |
||
277 | |||
278 | |||
279 | /* END */ |