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