]> git.saurik.com Git - wxWidgets.git/blame - src/freetype/freetype/fttypes.h
removed forgotten debugging printf
[wxWidgets.git] / src / freetype / freetype / fttypes.h
CommitLineData
cabec872
RR
1/***************************************************************************/
2/* */
3/* fttypes.h */
4/* */
5/* FreeType simple types definitions (specification only). */
6/* */
7/* Copyright 1996-2000 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/***************************************************************************/
17
18
19#ifndef FTTYPES_H
20#define FTTYPES_H
21
22
23#include <freetype/ftsystem.h>
24#include <freetype/ftimage.h>
25
26
27 /*************************************************************************/
28 /* */
29 /* <Type> */
30 /* FT_Bool */
31 /* */
32 /* <Description> */
33 /* A typedef of unsigned char, used for simple booleans. */
34 /* */
35 typedef unsigned char FT_Bool;
36
37
38 /*************************************************************************/
39 /* */
40 /* <Type> */
41 /* FT_FWord */
42 /* */
43 /* <Description> */
44 /* A signed 16-bit integer used to store a distance in original font */
45 /* units. */
46 /* */
47 typedef signed short FT_FWord; /* distance in FUnits */
48
49
50 /*************************************************************************/
51 /* */
52 /* <Type> */
53 /* FT_UFWord */
54 /* */
55 /* <Description> */
56 /* An unsigned 16-bit integer used to store a distance in original */
57 /* font units. */
58 /* */
59 typedef unsigned short FT_UFWord; /* unsigned distance */
60
61
62 /*************************************************************************/
63 /* */
64 /* <Type> */
65 /* FT_Char */
66 /* */
67 /* <Description> */
68 /* A simple typedef for the _signed_ char type. */
69 /* */
70 typedef signed char FT_Char;
71
72
73 /*************************************************************************/
74 /* */
75 /* <Type> */
76 /* FT_Byte */
77 /* */
78 /* <Description> */
79 /* A simple typedef for the _unsigned_ char type. */
80 /* */
81 typedef unsigned char FT_Byte;
82
83
84 /*************************************************************************/
85 /* */
86 /* <Type> */
87 /* FT_String */
88 /* */
89 /* <Description> */
90 /* A simple typedef for the char type, usually used for strings. */
91 /* */
92 typedef char FT_String;
93
94
95 /*************************************************************************/
96 /* */
97 /* <Type> */
98 /* FT_Short */
99 /* */
100 /* <Description> */
101 /* A typedef for signed short. */
102 /* */
103 typedef signed short FT_Short;
104
105
106 /*************************************************************************/
107 /* */
108 /* <Type> */
109 /* FT_UShort */
110 /* */
111 /* <Description> */
112 /* A typedef for unsigned short. */
113 /* */
114 typedef unsigned short FT_UShort;
115
116
117 /*************************************************************************/
118 /* */
119 /* <Type> */
120 /* FT_Int */
121 /* */
122 /* <Description> */
123 /* A typedef for the int type. */
124 /* */
125 typedef int FT_Int;
126
127
128 /*************************************************************************/
129 /* */
130 /* <Type> */
131 /* FT_UInt */
132 /* */
133 /* <Description> */
134 /* A typedef for the unsigned int type. */
135 /* */
136 typedef unsigned int FT_UInt;
137
138
139 /*************************************************************************/
140 /* */
141 /* <Type> */
142 /* FT_Long */
143 /* */
144 /* <Description> */
145 /* A typedef for signed long. */
146 /* */
147 typedef signed long FT_Long;
148
149
150 /*************************************************************************/
151 /* */
152 /* <Type> */
153 /* FT_ULong */
154 /* */
155 /* <Description> */
156 /* A typedef for unsigned long. */
157 /* */
158 typedef unsigned long FT_ULong;
159
160
161 /*************************************************************************/
162 /* */
163 /* <Type> */
164 /* FT_F2Dot14 */
165 /* */
166 /* <Description> */
167 /* A signed 2.14 fixed float type used for unit vectors. */
168 /* */
169 typedef signed short FT_F2Dot14;
170
171
172 /*************************************************************************/
173 /* */
174 /* <Type> */
175 /* FT_F26Dot6 */
176 /* */
177 /* <Description> */
178 /* A signed 26.6 fixed float type used for vectorial pixel */
179 /* coordinates. */
180 /* */
181 typedef signed long FT_F26Dot6;
182
183
184 /*************************************************************************/
185 /* */
186 /* <Type> */
187 /* FT_Fixed */
188 /* */
189 /* <Description> */
190 /* This type is used to store 16.16 fixed float values, like scales */
191 /* or matrix coefficients. */
192 /* */
193 typedef signed long FT_Fixed;
194
195
196 /*************************************************************************/
197 /* */
198 /* <Type> */
199 /* FT_Error */
200 /* */
201 /* <Description> */
202 /* The FreeType error code type. A value of 0 is always interpreted */
203 /* as a successful operation. */
204 /* */
205 typedef int FT_Error;
206
207
208 /*************************************************************************/
209 /* */
210 /* <Type> */
211 /* FT_Pointer */
212 /* */
213 /* <Description> */
214 /* A simple typedef for a typeless pointer. */
215 /* */
216 typedef void* FT_Pointer;
217
218
219 /*************************************************************************/
220 /* */
221 /* <Struct> */
222 /* FT_UnitVector */
223 /* */
224 /* <Description> */
225 /* A simple structure used to store a 2D vector unit vector. Uses */
226 /* FT_F2Dot14 types. */
227 /* */
228 /* <Fields> */
229 /* x :: Horizontal coordinate. */
230 /* */
231 /* y :: Vertical coordinate. */
232 /* */
233 typedef struct FT_UnitVector_
234 {
235 FT_F2Dot14 x;
236 FT_F2Dot14 y;
237
238 } FT_UnitVector;
239
240
241 /*************************************************************************/
242 /* */
243 /* <Struct> */
244 /* FT_Matrix */
245 /* */
246 /* <Description> */
247 /* A simple structure used to store a 2x2 matrix. Coefficients are */
248 /* in 16.16 fixed float format. The computation performed is: */
249 /* */
250 /* { */
251 /* x' = x*xx + y*xy */
252 /* y' = x*yx + y*yy */
253 /* } */
254 /* */
255 /* <Fields> */
256 /* xx :: Matrix coefficient. */
257 /* */
258 /* xy :: Matrix coefficient. */
259 /* */
260 /* yx :: Matrix coefficient. */
261 /* */
262 /* yy :: Matrix coefficient. */
263 /* */
264 typedef struct FT_Matrix_
265 {
266 FT_Fixed xx, xy;
267 FT_Fixed yx, yy;
268
269 } FT_Matrix;
270
271
272 /*************************************************************************/
273 /* */
274 /* <Struct> */
275 /* FT_BBox */
276 /* */
277 /* <Description> */
278 /* A structure used to hold an outline's bounding box, i.e., the */
279 /* coordinates of its extrema in the horizontal and vertical */
280 /* directions. */
281 /* */
282 /* <Fields> */
283 /* xMin :: The horizontal minimum (left-most). */
284 /* */
285 /* yMin :: The vertical minimum (bottom-most). */
286 /* */
287 /* xMax :: The horizontal maximum (right-most). */
288 /* */
289 /* yMax :: The vertical maximum (top-most). */
290 /* */
291 typedef struct FT_BBox_
292 {
293 FT_Pos xMin, yMin;
294 FT_Pos xMax, yMax;
295
296 } FT_BBox;
297
298
299 /*************************************************************************/
300 /* */
301 /* <Macro> */
302 /* FT_MAKE_TAG */
303 /* */
304 /* <Description> */
305 /* This macro converts four letter tags which are used to label */
306 /* TrueType tables into an unsigned long to be used within FreeType. */
307 /* */
308#define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \
309 ( ( (FT_ULong)_x1 << 24 ) | \
310 ( (FT_ULong)_x2 << 16 ) | \
311 ( (FT_ULong)_x3 << 8 ) | \
312 (FT_ULong)_x4 )
313
314
315 /*************************************************************************/
316 /*************************************************************************/
317 /* */
318 /* L I S T M A N A G E M E N T */
319 /* */
320 /*************************************************************************/
321 /*************************************************************************/
322
323
324 /*************************************************************************/
325 /* */
326 /* <Type> */
327 /* FT_ListNode */
328 /* */
329 /* <Description> */
330 /* Many elements and objects in FreeType are listed through a */
331 /* FT_List record (see FT_ListRec). As its name suggests, a */
332 /* FT_ListNode is a handle to a single list element. */
333 /* */
334 typedef struct FT_ListNodeRec_* FT_ListNode;
335
336
337 /*************************************************************************/
338 /* */
339 /* <Type> */
340 /* FT_List */
341 /* */
342 /* <Description> */
343 /* A handle to a list record (see FT_ListRec). */
344 /* */
345 typedef struct FT_ListRec_* FT_List;
346
347
348 /*************************************************************************/
349 /* */
350 /* <Struct> */
351 /* FT_ListNodeRec */
352 /* */
353 /* <Description> */
354 /* A structure used to hold a single list element. */
355 /* */
356 /* <Fields> */
357 /* prev :: The previous element in the list. NULL if first. */
358 /* */
359 /* next :: The next element in the list. NULL if last. */
360 /* */
361 /* data :: A typeless pointer to the listed object. */
362 /* */
363 typedef struct FT_ListNodeRec_
364 {
365 FT_ListNode prev;
366 FT_ListNode next;
367 void* data;
368
369 } FT_ListNodeRec;
370
371
372 /*************************************************************************/
373 /* */
374 /* <Struct> */
375 /* FT_ListRec */
376 /* */
377 /* <Description> */
378 /* A structure used to hold a simple doubly-linked list. These are */
379 /* used in many parts of FreeType. */
380 /* */
381 /* <Fields> */
382 /* head :: The head (first element) of doubly-linked list. */
383 /* */
384 /* tail :: The tail (last element) of doubly-linked list. */
385 /* */
386 typedef struct FT_ListRec_
387 {
388 FT_ListNode head;
389 FT_ListNode tail;
390
391 } FT_ListRec;
392
393
394#define FT_IS_EMPTY( list ) ( (list).head == 0 )
395
396
397#endif /* FTTYPES_H */
398
399
400/* END */