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