1 /*
2 
3 Boost Software License - Version 1.0 - August 17th, 2003
4 
5 Permission is hereby granted, free of charge, to any person or organization
6 obtaining a copy of the software and accompanying documentation covered by
7 this license (the "Software") to use, reproduce, display, distribute,
8 execute, and transmit the Software, and to prepare derivative works of the
9 Software, and to permit third-parties to whom the Software is furnished to
10 do so, all subject to the following:
11 
12 The copyright notices in the Software and this entire statement, including
13 the above license grant, this restriction and the following disclaimer,
14 must be included in all copies of the Software, in whole or in part, and
15 all derivative works of the Software, unless such copies or derivative
16 works are solely in the form of machine-executable object code generated by
17 a source language processor.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
22 SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
23 FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
24 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 DEALINGS IN THE SOFTWARE.
26 
27 */
28 module derelict.freetype.fttypes;
29 
30 private
31 {
32     import derelict.util.compat;
33 }
34 
35 // config/ftconfig.h
36 alias short             FT_Int16;
37 alias ushort            FT_UInt16;
38 alias int               FT_Int32;
39 alias uint              FT_UInt32;
40 alias int               FT_Fast;
41 alias uint              FT_UFast;
42 
43 // fttypes.h
44 alias byte              FT_Bool;
45 alias short             FT_FWord;
46 alias ushort            FT_UFWord;
47 alias char              FT_Char;
48 alias ubyte             FT_Byte;
49 alias FT_Byte*          FT_Bytes;
50 alias FT_UInt32         FT_Tag;
51 alias char              FT_String;
52 alias short             FT_Short;
53 alias ushort            FT_UShort;
54 alias int               FT_Int;
55 alias uint              FT_UInt;
56 alias c_long            FT_Long;
57 alias c_ulong           FT_ULong;
58 
59 
60 alias short             FT_F2Dot14;
61 alias c_long            FT_F26Dot6;
62 alias c_long            FT_Fixed;
63 alias int               FT_Error;
64 alias void*             FT_Pointer;
65 
66 alias size_t            FT_Offset;
67 alias ptrdiff_t         FT_PtrDist;
68 
69 // ftimage.h
70 alias FT_Long           FT_Pos;
71 
72 // ftsystem.h
73 alias FT_MemoryRec*         FT_Memory;
74 alias FT_StreamRec*         FT_Stream;
75 
76 // ftimage.h
77 alias FT_RasterRec*         FT_Raster;
78 
79 // fttypes.h
80 alias FT_ListNodeRec*       FT_ListNode;
81 alias FT_ListRec*           FT_List;
82 
83 // freetype.h
84 alias FT_LibraryRec*        FT_Library;
85 alias FT_ModuleRec*         FT_Module;
86 alias FT_DriverRec*         FT_Driver;
87 alias FT_RendererRec*       FT_Renderer;
88 alias FT_FaceRec*           FT_Face;
89 alias FT_SizeRec*           FT_Size;
90 alias FT_GlyphSlotRec*      FT_GlyphSlot;
91 alias FT_CharMapRec*        FT_CharMap;
92 alias FT_Face_InternalRec*  FT_Face_Internal;
93 alias FT_Size_InternalRec*  FT_Size_Internal;
94 alias FT_SubGlyphRec*       FT_SubGlyph;
95 alias FT_Slot_InternalRec*  FT_Slot_Internal;
96 alias FT_Size_RequestRec*   FT_Size_Request;
97 
98 // ftmodapi.h
99 alias FT_Pointer            FT_Module_Interface;
100 
101 // t1tables.h
102 alias PS_FontInfoRec*       PS_FontInfo;
103 deprecated alias PS_FontInfoRec        T1_FontInfo;
104 alias PS_PrivateRec*        PS_Private;
105 deprecated alias PS_PrivateRec         T1_Private;
106 alias PS_DesignMapRec*      PS_DesignMap;
107 deprecated alias PS_DesignMapRec       T1_DesignMap;
108 alias PS_BlendRec*          PS_Blend;
109 deprecated alias PS_BlendRec           T1_Blend;
110 alias CID_FaceDictRec*      CID_FaceDict;
111 deprecated alias CID_FaceDictRec       CID_FontDict;
112 alias CID_FaceInfoRec*      CID_FaceInfo;
113 deprecated alias CID_FaceInfoRec       CID_Info;
114 
115 // ftbdf.h
116 alias BDF_PropertyRec*      BDF_Property;
117 
118 // ftwinfnt.h
119 alias FT_WinFNT_HeaderRec*  FT_WinFNT_Header;
120 
121 // ftglyph.h
122 alias FT_GlyphRec*          FT_Glyph;
123 alias FT_BitmapGlyphRec*    FT_BitmapGlyph;
124 alias FT_OutlineGlyphRec*   FT_OutlineGlyph;
125 
126 // ftcache.h
127 alias FTC_FaceIDRec*        FTC_FaceID;
128 alias FTC_ManagerRec*       FTC_Manager;
129 alias FTC_NodeRec*          FTC_Node;
130 alias FTC_ScalerRec*        FTC_Scaler;
131 alias FTC_CMapCacheRec*     FTC_CMapCache;
132 alias FTC_ImageTypeRec*     FTC_ImageType;
133 alias FTC_ImageCacheRec*    FTC_ImageCache;
134 alias FTC_SBitRec*          FTC_SBit;
135 alias FTC_SBitCacheRec*     FTC_SBitCache;
136 
137 // ftstroke.h
138 alias FT_StrokerRec*        FT_Stroker;
139 
140 // fttrigon.h
141 alias FT_Fixed              FT_Angle;
142 
143 // ftincrem.h
144 alias FT_IncrementalRec*    FT_Incremental;
145 alias FT_Incremental_MetricsRec* FT_Incremental_Metrics;
146 alias FT_Incremental_InterfaceRec* FT_Incremental_Interface;
147 
148 /+ other
149 alias FTC_MruNodeRec*       FTC_MruNode;
150 alias FTC_MruListRec*       FTC_MruList;
151 alias FTC_MruListClassRec*  FTC_MruListClass;
152 alias FTC_CacheRec*         FTC_Cache;
153 alias FTC_CacheClassRec*    FTC_CacheClass;
154 alias FTC_FamilyRec*        FTC_Family;
155 alias FTC_GNodeRec*         FTC_GNode;
156 alias FTC_GQueryRec*        FTC_GQuery;
157 alias FTC_GCacheRec*        FTC_GCache;
158 alias FTC_GCacheClassRec*   FTC_GCacheClass;
159 alias FTC_INodeRec*         FTC_INode;
160 alias FTC_IFamilyClassRec*  FTC_IFamilyClass;
161 alias FTC_SNodeRec*         FTC_SNode;
162 alias FTC_SFamilyClassRec*  FTC_SFamilyClass;
163 
164 alias FT_GlyphLoaderRec*    FT_GlyphLoader ;
165 alias FT_GlyphLoadRec*      FT_GlyphLoad;
166 alias FT_Driver_ClassRec*   FT_Driver_Class;
167 alias FT_AutoHinterRec*     FT_AutoHinter;
168 alias FT_AutoHinter_ServiceRec*  FT_AutoHinter_Service;
169 alias FT_ServiceDescRec*    FT_ServiceDesc;
170 alias FT_ServiceCacheRec*   FT_ServiceCache;
171 alias FT_CMapRec*           FT_CMap;
172 alias FT_CMap_ClassRec*     FT_CMap_Class;
173 
174 alias SFNT_HeaderRec*       SFNT_Header;
175 
176 alias TT_TableRec*          TT_Table;
177 alias TT_LongMetricsRec*    TT_LongMetrics;
178 
179 alias FT_Short              TT_ShortMetrics;
180 alias TT_NameEntryRec*      TT_NameEntry;
181 alias TT_NameTableRec*      TT_NameTable;
182 alias TT_GaspRangeRec*      TT_GaspRange;
183 alias TT_HdmxEntryRec*      TT_HdmxEntry;
184 alias TT_HdmxRec*           TT_Hdmx;
185 alias TT_Kern0_PairRec*     TT_Kern0_Pair;
186 alias TT_SBit_MetricsRec*   TT_SBit_Metrics;
187 alias TT_SBit_SmallMetricsRec*  TT_SBit_SmallMetrics;
188 alias TT_SBit_LineMetricsRec*   TT_SBit_LineMetrics;
189 alias TT_SBit_RangeRec*     TT_SBit_Range;
190 alias TT_SBit_StrikeRec*    TT_SBit_Strike;
191 alias TT_SBit_ComponentRec* TT_SBit_Component;
192 alias TT_SBit_ScaleRec*     TT_SBit_Scale;
193 alias TT_Post_20Rec*        TT_Post_20;
194 alias TT_Post_25Rec*        TT_Post_25;
195 alias TT_Post_NamesRec*     TT_Post_Names;
196 alias GX_BlendRec*          GX_Blend;
197 alias TT_FaceRec*           TT_Face;
198 alias TT_GlyphZoneRec*      TT_GlyphZone;
199 alias TT_ExecContextRec*    TT_ExecContext;
200 alias SFNT_Interface*       SFNT_Service;
201 alias FT_ValidatorRec*      FT_Validator;
202 alias PSH_GlobalsRec*       PSH_Globals;
203 alias PSH_Globals_FuncsRec* PSH_Globals_Funcs;
204 alias T1_HintsRec*          T1_Hints;
205 alias T1_Hints_FuncsRec*    T1_Hints_Funcs;
206 alias T2_HintsRec*          T2_Hints;
207 alias T2_Hints_FuncsRec*    T2_Hints_Funcs;
208 alias PSHinter_Interface*   PSHinter_Service;
209 // alias FT_Service_PsCMapsRec  FT_Service_PsCMapsRec;
210 alias FT_Service_PsCMapsRec* FT_Service_PsCMaps;
211 alias T1_EncodingRec*       T1_Encoding;
212 alias T1_FontRec*           T1_Font;
213 alias CID_SubrsRec*         CID_Subrs;
214 alias T1_FaceRec*           T1_Face;
215 alias CID_FaceRec*          CID_Face;
216 alias PS_TableRec*          PS_Table;
217 alias PS_Table_FuncsRec*    PS_Table_Funcs;
218 alias PS_ParserRec*         PS_Parser;
219 alias T1_TokenRec*          T1_Token;
220 alias T1_FieldRec*          T1_Field;
221 alias PS_Parser_FuncsRec*   PS_Parser_Funcs;
222 alias T1_BuilderRec*        T1_Builder;
223 alias T1_Builder_FuncsRec*  T1_Builder_Funcs;
224 alias T1_Decoder_ZoneRec*   T1_Decoder_Zone;
225 alias T1_DecoderRec*        T1_Decoder;
226 alias T1_Decoder_FuncsRec*  T1_Decoder_Funcs;
227 alias T1_CMap_ClassesRec*   T1_CMap_Classes;
228 alias PSAux_ServiceRec*     PSAux_Service;
229 alias PSAux_ServiceRec      PSAux_Interface;
230 alias TT_LoaderRec*         TT_Loader;
231 +/
232 
233 
234 // freetype.h
235 enum FT_Encoding
236 {
237   FT_ENCODING_NONE = ( ( cast(FT_UInt32)(0) << 24 ) | ( cast(FT_UInt32)(0) << 16 ) | ( cast(FT_UInt32)(0) << 8 ) | cast(FT_UInt32)(0) ) ,
238   FT_ENCODING_MS_SYMBOL = ( ( cast(FT_UInt32)('s') << 24 ) | ( cast(FT_UInt32)('y') << 16 ) | ( cast(FT_UInt32)('m') << 8 ) | cast(FT_UInt32)('b') ) ,
239   FT_ENCODING_UNICODE = ( ( cast(FT_UInt32)('u') << 24 ) | ( cast(FT_UInt32)('n') << 16 ) | ( cast(FT_UInt32)('i') << 8 ) | cast(FT_UInt32)('c') ) ,
240   FT_ENCODING_SJIS = ( ( cast(FT_UInt32)('s') << 24 ) | ( cast(FT_UInt32)('j') << 16 ) | ( cast(FT_UInt32)('i') << 8 ) | cast(FT_UInt32)('s') ) ,
241   FT_ENCODING_GB2312 = ( ( cast(FT_UInt32)('g') << 24 ) | ( cast(FT_UInt32)('b') << 16 ) | ( cast(FT_UInt32)(' ') << 8 ) | cast(FT_UInt32)(' ') ) ,
242   FT_ENCODING_BIG5 = ( ( cast(FT_UInt32)('b') << 24 ) | ( cast(FT_UInt32)('i') << 16 ) | ( cast(FT_UInt32)('g') << 8 ) | cast(FT_UInt32)('5') ) ,
243   FT_ENCODING_WANSUNG = ( ( cast(FT_UInt32)('w') << 24 ) | ( cast(FT_UInt32)('a') << 16 ) | ( cast(FT_UInt32)('n') << 8 ) | cast(FT_UInt32)('s') ) ,
244   FT_ENCODING_JOHAB = ( ( cast(FT_UInt32)('j') << 24 ) | ( cast(FT_UInt32)('o') << 16 ) | ( cast(FT_UInt32)('h') << 8 ) | cast(FT_UInt32)('a') ) ,
245   FT_ENCODING_MS_SJIS = FT_ENCODING_SJIS,
246   FT_ENCODING_MS_GB2312 = FT_ENCODING_GB2312,
247   FT_ENCODING_MS_BIG5 = FT_ENCODING_BIG5,
248   FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG,
249   FT_ENCODING_MS_JOHAB = FT_ENCODING_JOHAB,
250   FT_ENCODING_ADOBE_STANDARD = ( ( cast(FT_UInt32)('A') << 24 ) | ( cast(FT_UInt32)('D') << 16 ) | ( cast(FT_UInt32)('O') << 8 ) | cast(FT_UInt32)('B') ) ,
251   FT_ENCODING_ADOBE_EXPERT = ( ( cast(FT_UInt32)('A') << 24 ) | ( cast(FT_UInt32)('D') << 16 ) | ( cast(FT_UInt32)('B') << 8 ) | cast(FT_UInt32)('E') ) ,
252   FT_ENCODING_ADOBE_CUSTOM = ( ( cast(FT_UInt32)('A') << 24 ) | ( cast(FT_UInt32)('D') << 16 ) | ( cast(FT_UInt32)('B') << 8 ) | cast(FT_UInt32)('C') ) ,
253   FT_ENCODING_ADOBE_LATIN_1 = ( ( cast(FT_UInt32)('l') << 24 ) | ( cast(FT_UInt32)('a') << 16 ) | ( cast(FT_UInt32)('t') << 8 ) | cast(FT_UInt32)('1') ) ,
254   FT_ENCODING_OLD_LATIN_2 = ( ( cast(FT_UInt32)('l') << 24 ) | ( cast(FT_UInt32)('a') << 16 ) | ( cast(FT_UInt32)('t') << 8 ) | cast(FT_UInt32)('2') ) ,
255   FT_ENCODING_APPLE_ROMAN = ( ( cast(FT_UInt32)('a') << 24 ) | ( cast(FT_UInt32)('r') << 16 ) | ( cast(FT_UInt32)('m') << 8 ) | cast(FT_UInt32)('n') )
256 }
257 
258 enum : FT_Long
259 {
260     FT_FACE_FLAG_SCALABLE         = 1 << 0,
261     FT_FACE_FLAG_FIXED_SIZES      = 1 << 1,
262     FT_FACE_FLAG_FIXED_WIDTH      = 1 << 2,
263     FT_FACE_FLAG_SFNT             = 1 << 3,
264     FT_FACE_FLAG_HORIZONTAL       = 1 << 4,
265     FT_FACE_FLAG_VERTICAL         = 1 << 5,
266     FT_FACE_FLAG_KERNING          = 1 << 6,
267     FT_FACE_FLAG_FAST_GLYPHS      = 1 << 7,
268     FT_FACE_FLAG_MULTIPLE_MASTERS = 1 << 8,
269     FT_FACE_FLAG_GLYPH_NAMES      = 1 << 9,
270     FT_FACE_FLAG_EXTERNAL_STREAM  = 1 << 10,
271     FT_FACE_FLAG_HINTER           = 1 << 11,
272 }
273 
274 enum
275 {
276     FT_STYLE_FLAG_ITALIC          = 1 << 0,
277     FT_STYLE_FLAG_BOLD            = 1 << 1,
278 }
279 
280 enum FT_Size_Request_Type
281 {
282     FT_SIZE_REQUEST_TYPE_NOMINAL,
283     FT_SIZE_REQUEST_TYPE_REAL_DIM,
284     FT_SIZE_REQUEST_TYPE_BBOX,
285     FT_SIZE_REQUEST_TYPE_CELL,
286     FT_SIZE_REQUEST_TYPE_SCALES,
287     FT_SIZE_REQUEST_TYPE_MAX
288 }
289 
290 enum : uint
291 {
292     FT_OPEN_MEMORY           = 0x1,
293     FT_OPEN_STREAM           = 0x2,
294     FT_OPEN_DRIVER           = 0x4,
295     FT_OPEN_PATHNAME         = 0x8,
296     FT_OPEN_PARAMS           = 0x10,
297 }
298 
299 enum : uint
300 {
301     FT_LOAD_DEFAULT          = 0x0,
302     FT_LOAD_NO_SCALE         = 0x1,
303     FT_LOAD_NO_HINTING       = 0x2,
304     FT_LOAD_RENDER           = 0x4,
305     FT_LOAD_NO_BITMAP        = 0x8,
306     FT_LOAD_VERTICAL_LAYOUT  = 0x10,
307     FT_LOAD_FORCE_AUTOHINT   = 0x20,
308     FT_LOAD_CROP_BITMAP      = 0x40,
309     FT_LOAD_PEDANTIC         = 0x80,
310     FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH =  0x200,
311     FT_LOAD_NO_RECURSE       = 0x400,
312     FT_LOAD_IGNORE_TRANSFORM = 0x800,
313     FT_LOAD_MONOCHROME       = 0x1000,
314     FT_LOAD_LINEAR_DESIGN    = 0x2000,
315     FT_LOAD_SBITS_ONLY       = 0x4000,
316     FT_LOAD_NO_AUTOHINT      = 0x8000U,
317 }
318 
319 enum FT_Render_Mode
320 {
321  FT_RENDER_MODE_NORMAL = 0,
322  FT_RENDER_MODE_LIGHT,
323  FT_RENDER_MODE_MONO,
324  FT_RENDER_MODE_LCD,
325  FT_RENDER_MODE_LCD_V,
326  FT_RENDER_MODE_MAX
327 }
328 
329 enum
330 {
331     FT_LOAD_TARGET_NORMAL    = ( FT_Render_Mode.FT_RENDER_MODE_NORMAL & 15 ) << 16,
332     FT_LOAD_TARGET_LIGHT     = ( FT_Render_Mode.FT_RENDER_MODE_LIGHT & 15 ) << 16,
333     FT_LOAD_TARGET_MONO      = ( FT_Render_Mode.FT_RENDER_MODE_MONO & 15 ) << 16,
334     FT_LOAD_TARGET_LCD       = ( FT_Render_Mode.FT_RENDER_MODE_LCD & 15 ) << 16,
335     FT_LOAD_TARGET_LCD_V     = ( FT_Render_Mode.FT_RENDER_MODE_LCD_V & 15 ) << 16,
336 }
337 
338 enum FT_Kerning_Mode
339 {
340  FT_KERNING_DEFAULT = 0,
341  FT_KERNING_UNFITTED,
342  FT_KERNING_UNSCALED
343 }
344 
345 enum
346 {
347     FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS     = 1,
348     FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES = 2,
349     FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID   = 4,
350     FT_SUBGLYPH_FLAG_SCALE              = 8,
351     FT_SUBGLYPH_FLAG_XY_SCALE           = 0x40,
352     FT_SUBGLYPH_FLAG_2X2                = 0x80,
353     FT_SUBGLYPH_FLAG_USE_MY_METRICS     = 0x200,
354 }
355 
356 enum
357 {
358     FREETYPE_MAJOR  = 2,
359     FREETYPE_MINOR  = 3,
360     FREETYPE_PATCH  = 5,
361 }
362 
363 // ftimage.h
364 enum FT_Pixel_Mode
365 {
366     FT_PIXEL_MODE_NONE = 0,
367     FT_PIXEL_MODE_MONO,
368     FT_PIXEL_MODE_GRAY,
369     FT_PIXEL_MODE_GRAY2,
370     FT_PIXEL_MODE_GRAY4,
371     FT_PIXEL_MODE_LCD,
372     FT_PIXEL_MODE_LCD_V,
373     FT_PIXEL_MODE_MAX
374 }
375 
376 enum : uint
377 {
378     FT_OUTLINE_NONE            = 0x0,
379     FT_OUTLINE_OWNER           = 0x1,
380     FT_OUTLINE_EVEN_ODD_FILL   = 0x2,
381     FT_OUTLINE_REVERSE_FILL    = 0x4,
382     FT_OUTLINE_IGNORE_DROPOUTS = 0x8,
383     FT_OUTLINE_HIGH_PRECISION  = 0x100,
384     FT_OUTLINE_SINGLE_PASS     = 0x200,
385 }
386 
387 enum
388 {
389     FT_CURVE_TAG_ON          = 1,
390     FT_CURVE_TAG_CONIC       = 0,
391     FT_CURVE_TAG_CUBIC       = 2,
392     FT_CURVE_TAG_TOUCH_X     = 8,
393     FT_CURVE_TAG_TOUCH_Y     = 16,
394     FT_CURVE_TAG_TOUCH_BOTH  = FT_CURVE_TAG_TOUCH_X | FT_CURVE_TAG_TOUCH_Y,
395 }
396 
397 enum FT_Glyph_Format
398 {
399   FT_GLYPH_FORMAT_NONE = ( ( cast(uint)0 << 24 ) | ( cast(uint)0 << 16 ) | ( cast(uint)0 << 8 ) | cast(uint)0 ) ,
400   FT_GLYPH_FORMAT_COMPOSITE = ( ( cast(uint)'c' << 24 ) | ( cast(uint)'o' << 16 ) | ( cast(uint)'m' << 8 ) | cast(uint)'p' ) ,
401   FT_GLYPH_FORMAT_BITMAP = ( ( cast(uint)'b' << 24 ) | ( cast(uint)'i' << 16 ) | ( cast(uint)'t' << 8 ) | cast(uint)'s' ) ,
402   FT_GLYPH_FORMAT_OUTLINE = ( ( cast(uint)'o' << 24 ) | ( cast(uint)'u' << 16 ) | ( cast(uint)'t' << 8 ) | cast(uint)'l' ) ,
403   FT_GLYPH_FORMAT_PLOTTER = ( ( cast(uint)'p' << 24 ) | ( cast(uint)'l' << 16 ) | ( cast(uint)'o' << 8 ) | cast(uint)'t' )
404 }
405 
406 enum
407 {
408     FT_RASTER_FLAG_DEFAULT  = 0x0,
409     FT_RASTER_FLAG_AA       = 0x1,
410     FT_RASTER_FLAG_DIRECT   = 0x2,
411     FT_RASTER_FLAG_CLIP     = 0x4
412 }
413 
414 // ftmodapi.h
415 enum
416 {
417     FT_MODULE_FONT_DRIVER       = 1,
418     FT_MODULE_RENDERER          = 2,
419     FT_MODULE_HINTER            = 4,
420     FT_MODULE_STYLER            = 8,
421     FT_MODULE_DRIVER_SCALABLE   = 0x100,
422     FT_MODULE_DRIVER_NO_OUTLINES= 0x200,
423     FT_MODULE_DRIVER_HAS_HINTER = 0x400
424 }
425 
426 enum FT_TrueTypeEngineType
427 {
428     FT_TRUETYPE_ENGINE_TYPE_NONE = 0,
429     FT_TRUETYPE_ENGINE_TYPE_UNPATENTED,
430     FT_TRUETYPE_ENGINE_TYPE_PATENTED
431 
432 }
433 
434 // ftmoderr.h
435 enum
436 {
437   FT_Mod_Err_Base  = 0,
438   FT_Mod_Err_Autofit  = 0,
439   FT_Mod_Err_BDF  = 0,
440   FT_Mod_Err_Cache  = 0,
441   FT_Mod_Err_CFF  = 0,
442   FT_Mod_Err_CID  = 0,
443   FT_Mod_Err_Gzip  = 0,
444   FT_Mod_Err_LZW  = 0,
445   FT_Mod_Err_OTvalid  = 0,
446   FT_Mod_Err_PCF  = 0,
447   FT_Mod_Err_PFR  = 0,
448   FT_Mod_Err_PSaux  = 0,
449   FT_Mod_Err_PShinter  = 0,
450   FT_Mod_Err_PSnames  = 0,
451   FT_Mod_Err_Raster  = 0,
452   FT_Mod_Err_SFNT  = 0,
453   FT_Mod_Err_Smooth  = 0,
454   FT_Mod_Err_TrueType  = 0,
455   FT_Mod_Err_Type1  = 0,
456   FT_Mod_Err_Type42  = 0,
457   FT_Mod_Err_Winfonts  = 0,
458   FT_Mod_Err_Max
459 }
460 
461 // ftoutln
462 enum FT_Orientation
463 {
464     FT_ORIENTATION_TRUETYPE = 0,
465     FT_ORIENTATION_POSTSCRIPT = 1,
466     FT_ORIENTATION_FILL_RIGHT = FT_ORIENTATION_TRUETYPE,
467     FT_ORIENTATION_FILL_LEFT = FT_ORIENTATION_POSTSCRIPT
468 }
469 
470 // t1tables.h
471 enum T1_Blend_Flags
472  {
473  T1_BLEND_UNDERLINE_POSITION = 0,
474  T1_BLEND_UNDERLINE_THICKNESS,
475  T1_BLEND_ITALIC_ANGLE,
476  T1_BLEND_BLUE_VALUES,
477  T1_BLEND_OTHER_BLUES,
478  T1_BLEND_STANDARD_WIDTH,
479  T1_BLEND_STANDARD_HEIGHT,
480  T1_BLEND_STEM_SNAP_WIDTHS,
481  T1_BLEND_STEM_SNAP_HEIGHTS,
482  T1_BLEND_BLUE_SCALE,
483  T1_BLEND_BLUE_SHIFT,
484  T1_BLEND_FAMILY_BLUES,
485  T1_BLEND_FAMILY_OTHER_BLUES,
486  T1_BLEND_FORCE_BOLD,
487  T1_BLEND_MAX
488 }
489 
490 // ttnameid.h
491 // NOTE: _lots_ of missing #defines which _could_ be made into enums
492 
493 // tttables.h
494 enum FT_Sfnt_Tag
495 {
496     ft_sfnt_head = 0,
497     ft_sfnt_maxp = 1,
498     ft_sfnt_os2  = 2,
499     ft_sfnt_hhea = 3,
500     ft_sfnt_vhea = 4,
501     ft_sfnt_post = 5,
502     ft_sfnt_pclt = 6,
503     sfnt_max
504 }
505 
506 // ftbdf.h
507 enum BDF_PropertyType
508 {
509  BDF_PROPERTY_TYPE_NONE = 0,
510  BDF_PROPERTY_TYPE_ATOM = 1,
511  BDF_PROPERTY_TYPE_INTEGER = 2,
512  BDF_PROPERTY_TYPE_CARDINAL = 3
513 }
514 
515 // ftglyph.h
516 enum FT_Glyph_BBox_Mode
517 {
518  FT_GLYPH_BBOX_UNSCALED = 0,
519  FT_GLYPH_BBOX_SUBPIXELS = 0,
520  FT_GLYPH_BBOX_GRIDFIT = 1,
521  FT_GLYPH_BBOX_TRUNCATE = 2,
522  FT_GLYPH_BBOX_PIXELS = 3
523 }
524 
525 // ftotval.h
526 enum
527 {
528   FT_VALIDATE_BASE = 0x0100,
529   FT_VALIDATE_GDEF = 0x0200,
530   FT_VALIDATE_GPOS = 0x0400,
531   FT_VALIDATE_GSUB = 0x0800,
532   FT_VALIDATE_JSTF = 0x1000,
533   FT_VALIDATE_OT   = FT_VALIDATE_BASE | FT_VALIDATE_GDEF | FT_VALIDATE_GPOS | FT_VALIDATE_GSUB | FT_VALIDATE_JSTF
534 }
535 
536 // ftgxval.h
537 enum
538 {
539   // pulled just a few #defines (some aren't for external use anyway)
540   FT_VALIDATE_GX_LENGTH = 10,
541   FT_VALIDATE_GX_START = 0x4000,
542 
543   FT_VALIDATE_feat = FT_VALIDATE_GX_START << 0,
544   FT_VALIDATE_mort = FT_VALIDATE_GX_START << 1,
545   FT_VALIDATE_morx = FT_VALIDATE_GX_START << 2,
546   FT_VALIDATE_bsln = FT_VALIDATE_GX_START << 3,
547   FT_VALIDATE_just = FT_VALIDATE_GX_START << 4,
548   FT_VALIDATE_kern = FT_VALIDATE_GX_START << 5,
549   FT_VALIDATE_opbd = FT_VALIDATE_GX_START << 6,
550   FT_VALIDATE_trak = FT_VALIDATE_GX_START << 7,
551   FT_VALIDATE_prop = FT_VALIDATE_GX_START << 8,
552   FT_VALIDATE_lcar = FT_VALIDATE_GX_START << 9,
553   FT_VALIDATE_GX = FT_VALIDATE_feat | FT_VALIDATE_mort | FT_VALIDATE_morx | FT_VALIDATE_bsln | FT_VALIDATE_just | FT_VALIDATE_kern | FT_VALIDATE_opbd | FT_VALIDATE_trak | FT_VALIDATE_prop | FT_VALIDATE_lcar,
554 
555   FT_VALIDATE_MS = FT_VALIDATE_GX_START << 0,
556   FT_VALIDATE_APPLE = FT_VALIDATE_GX_START << 1,
557   FT_VALIDATE_CKERN = FT_VALIDATE_MS | FT_VALIDATE_APPLE
558 }
559 
560 // ftstroke.h
561 enum FT_Stroker_LineJoin
562 {
563  FT_STROKER_LINEJOIN_ROUND = 0,
564  FT_STROKER_LINEJOIN_BEVEL,
565  FT_STROKER_LINEJOIN_MITER
566 }
567 
568 enum FT_Stroker_LineCap
569 {
570  FT_STROKER_LINECAP_BUTT = 0,
571  FT_STROKER_LINECAP_ROUND,
572  FT_STROKER_LINECAP_SQUARE
573 }
574 
575 enum FT_StrokerBorder
576 {
577  FT_STROKER_BORDER_LEFT = 0,
578  FT_STROKER_BORDER_RIGHT
579 }
580 
581 // fttrigon.h
582 enum
583 {
584     FT_ANGLE_PI     = 180 << 16,
585     FT_ANGLE_2PI    = FT_ANGLE_PI * 2,
586     FT_ANGLE_PI2    = FT_ANGLE_PI / 2,
587     FT_ANGLE_PI4    = FT_ANGLE_PI / 4
588 }
589 
590 // ftlcdfil.h
591 enum FT_LcdFilter
592 {
593  FT_LCD_FILTER_NONE    = 0,
594  FT_LCD_FILTER_DEFAULT = 1,
595  FT_LCD_FILTER_LIGHT   = 2,
596  FT_LCD_FILTER_LEGACY  = 16,
597  FT_LCD_FILTER_MAX
598 }
599 
600 // ftgasp.h
601 enum
602 {
603     FT_GASP_NO_TABLE        = -1,
604     FT_GASP_DO_GRIDFIT      = 0x01,
605     FT_GASP_DO_GRAY         = 0x02,
606     FT_GASP_SYMMETRIC_SMOOTHING = 0x08,
607     FT_GASP_SYMMETRIC_GRIDFIT   = 0x10
608 }
609 
610 /* other
611 version(Windows)
612 {
613     enum  { _JBLEN = 16 }
614 }
615 else
616 {
617     enum { _JBLEN = 10 }
618 }
619 */
620 
621 enum
622 {
623   FT_Err_Ok  = 0x00,
624   FT_Err_Cannot_Open_Resource  = 0x01 + 0 ,
625   FT_Err_Unknown_File_Format  = 0x02 + 0 ,
626   FT_Err_Invalid_File_Format  = 0x03 + 0 ,
627   FT_Err_Invalid_Version  = 0x04 + 0 ,
628   FT_Err_Lower_Module_Version  = 0x05 + 0 ,
629   FT_Err_Invalid_Argument  = 0x06 + 0 ,
630   FT_Err_Unimplemented_Feature  = 0x07 + 0 ,
631   FT_Err_Invalid_Table  = 0x08 + 0 ,
632   FT_Err_Invalid_Offset  = 0x09 + 0 ,
633   FT_Err_Invalid_Glyph_Index  = 0x10 + 0 ,
634   FT_Err_Invalid_Character_Code  = 0x11 + 0 ,
635   FT_Err_Invalid_Glyph_Format  = 0x12 + 0 ,
636   FT_Err_Cannot_Render_Glyph  = 0x13 + 0 ,
637   FT_Err_Invalid_Outline  = 0x14 + 0 ,
638   FT_Err_Invalid_Composite  = 0x15 + 0 ,
639   FT_Err_Too_Many_Hints  = 0x16 + 0 ,
640   FT_Err_Invalid_Pixel_Size  = 0x17 + 0 ,
641   FT_Err_Invalid_Handle  = 0x20 + 0 ,
642   FT_Err_Invalid_Library_Handle  = 0x21 + 0 ,
643   FT_Err_Invalid_Driver_Handle  = 0x22 + 0 ,
644   FT_Err_Invalid_Face_Handle  = 0x23 + 0 ,
645   FT_Err_Invalid_Size_Handle  = 0x24 + 0 ,
646   FT_Err_Invalid_Slot_Handle  = 0x25 + 0 ,
647   FT_Err_Invalid_CharMap_Handle  = 0x26 + 0 ,
648   FT_Err_Invalid_Cache_Handle  = 0x27 + 0 ,
649   FT_Err_Invalid_Stream_Handle  = 0x28 + 0 ,
650   FT_Err_Too_Many_Drivers  = 0x30 + 0 ,
651   FT_Err_Too_Many_Extensions  = 0x31 + 0 ,
652   FT_Err_Out_Of_Memory  = 0x40 + 0 ,
653   FT_Err_Unlisted_Object  = 0x41 + 0 ,
654   FT_Err_Cannot_Open_Stream  = 0x51 + 0 ,
655   FT_Err_Invalid_Stream_Seek  = 0x52 + 0 ,
656   FT_Err_Invalid_Stream_Skip  = 0x53 + 0 ,
657   FT_Err_Invalid_Stream_Read  = 0x54 + 0 ,
658   FT_Err_Invalid_Stream_Operation  = 0x55 + 0 ,
659   FT_Err_Invalid_Frame_Operation  = 0x56 + 0 ,
660   FT_Err_Nested_Frame_Access  = 0x57 + 0 ,
661   FT_Err_Invalid_Frame_Read  = 0x58 + 0 ,
662   FT_Err_Raster_Uninitialized  = 0x60 + 0 ,
663   FT_Err_Raster_Corrupted  = 0x61 + 0 ,
664   FT_Err_Raster_Overflow  = 0x62 + 0 ,
665   FT_Err_Raster_Negative_Height  = 0x63 + 0 ,
666   FT_Err_Too_Many_Caches  = 0x70 + 0 ,
667   FT_Err_Invalid_Opcode  = 0x80 + 0 ,
668   FT_Err_Too_Few_Arguments  = 0x81 + 0 ,
669   FT_Err_Stack_Overflow  = 0x82 + 0 ,
670   FT_Err_Code_Overflow  = 0x83 + 0 ,
671   FT_Err_Bad_Argument  = 0x84 + 0 ,
672   FT_Err_Divide_By_Zero  = 0x85 + 0 ,
673   FT_Err_Invalid_Reference  = 0x86 + 0 ,
674   FT_Err_Debug_OpCode  = 0x87 + 0 ,
675   FT_Err_ENDF_In_Exec_Stream  = 0x88 + 0 ,
676   FT_Err_Nested_DEFS  = 0x89 + 0 ,
677   FT_Err_Invalid_CodeRange  = 0x8A + 0 ,
678   FT_Err_Execution_Too_Long  = 0x8B + 0 ,
679   FT_Err_Too_Many_Function_Defs  = 0x8C + 0 ,
680   FT_Err_Too_Many_Instruction_Defs  = 0x8D + 0 ,
681   FT_Err_Table_Missing  = 0x8E + 0 ,
682   FT_Err_Horiz_Header_Missing  = 0x8F + 0 ,
683   FT_Err_Locations_Missing  = 0x90 + 0 ,
684   FT_Err_Name_Table_Missing  = 0x91 + 0 ,
685   FT_Err_CMap_Table_Missing  = 0x92 + 0 ,
686   FT_Err_Hmtx_Table_Missing  = 0x93 + 0 ,
687   FT_Err_Post_Table_Missing  = 0x94 + 0 ,
688   FT_Err_Invalid_Horiz_Metrics  = 0x95 + 0 ,
689   FT_Err_Invalid_CharMap_Format  = 0x96 + 0 ,
690   FT_Err_Invalid_PPem  = 0x97 + 0 ,
691   FT_Err_Invalid_Vert_Metrics  = 0x98 + 0 ,
692   FT_Err_Could_Not_Find_Context  = 0x99 + 0 ,
693   FT_Err_Invalid_Post_Table_Format  = 0x9A + 0 ,
694   FT_Err_Invalid_Post_Table  = 0x9B + 0 ,
695   FT_Err_Syntax_Error  = 0xA0 + 0 ,
696   FT_Err_Stack_Underflow  = 0xA1 + 0 ,
697   FT_Err_Ignore  = 0xA2 + 0 ,
698   FT_Err_Missing_Startfont_Field  = 0xB0 + 0 ,
699   FT_Err_Missing_Font_Field  = 0xB1 + 0 ,
700   FT_Err_Missing_Size_Field  = 0xB2 + 0 ,
701   FT_Err_Missing_Chars_Field  = 0xB3 + 0 ,
702   FT_Err_Missing_Startchar_Field  = 0xB4 + 0 ,
703   FT_Err_Missing_Encoding_Field  = 0xB5 + 0 ,
704   FT_Err_Missing_Bbx_Field  = 0xB6 + 0 ,
705   FT_Err_Max
706 }
707 
708 /*
709 enum FT_Frame_Op
710 {
711  ft_frame_end = 0,
712  ft_frame_start =  ((1  << 2 ) | ( 0 << 1 ) | 0 ) ,
713  ft_frame_byte =  ( ( 2  << 2  ) | ( 0 << 1 ) | 0 ) ,
714  ft_frame_schar =  ( ( 2  << 2  ) | ( 0 << 1 ) | 1 ) ,
715  ft_frame_ushort_be =  ( ( 3  << 2  ) | ( 0 << 1 ) | 0 ) ,
716  ft_frame_short_be =  ( ( 3  << 2  ) | ( 0 << 1 ) | 1 ) ,
717  ft_frame_ushort_le =  ( ( 3  << 2  ) | ( 1 << 1 ) | 0 ) ,
718  ft_frame_short_le =  ( ( 3  << 2  ) | ( 1 << 1 ) | 1 ) ,
719  ft_frame_ulong_be =  ( ( 4  << 2  ) | ( 0 << 1 ) | 0 ) ,
720  ft_frame_long_be =  ( ( 4  << 2  ) | ( 0 << 1 ) | 1 ) ,
721  ft_frame_ulong_le =  ( ( 4  << 2  ) | ( 1 << 1 ) | 0 ) ,
722  ft_frame_long_le =  ( ( 4  << 2  ) | ( 1 << 1 ) | 1 ) ,
723  ft_frame_uoff3_be =  ( ( 5  << 2  ) | ( 0 << 1 ) | 0 ) ,
724  ft_frame_off3_be =  ( ( 5  << 2  ) | ( 0 << 1 ) | 1 ) ,
725  ft_frame_uoff3_le =  ( ( 5  << 2  ) | ( 1 << 1 ) | 0 ) ,
726  ft_frame_off3_le =  ( ( 5  << 2  ) | ( 1 << 1 ) | 1 ) ,
727  ft_frame_bytes =  ( ( 6  << 2  ) | ( 0 << 1 ) | 0 ) ,
728  ft_frame_skip =  ( ( 6  << 2  ) | ( 0 << 1 ) | 1 )
729 }
730 
731 enum FT_ValidationLevel
732 {
733  FT_VALIDATE_DEFAULT = 0,
734  FT_VALIDATE_TIGHT,
735  FT_VALIDATE_PARANOID
736 }
737 
738 enum T1_EncodingType
739 {
740  T1_ENCODING_TYPE_NONE = 0,
741  T1_ENCODING_TYPE_ARRAY,
742  T1_ENCODING_TYPE_STANDARD,
743  T1_ENCODING_TYPE_ISOLATIN1,
744  T1_ENCODING_TYPE_EXPERT
745 }
746 
747 enum T1_TokenType
748 {
749  T1_TOKEN_TYPE_NONE = 0,
750  T1_TOKEN_TYPE_ANY,
751  T1_TOKEN_TYPE_STRING,
752  T1_TOKEN_TYPE_ARRAY,
753  T1_TOKEN_TYPE_MAX
754 }
755 
756 enum T1_FieldType
757 {
758  T1_FIELD_TYPE_NONE = 0,
759  T1_FIELD_TYPE_BOOL,
760  T1_FIELD_TYPE_INTEGER,
761  T1_FIELD_TYPE_FIXED,
762  T1_FIELD_TYPE_FIXED_1000,
763  T1_FIELD_TYPE_STRING,
764  T1_FIELD_TYPE_KEY,
765  T1_FIELD_TYPE_BBOX,
766  T1_FIELD_TYPE_INTEGER_ARRAY,
767  T1_FIELD_TYPE_FIXED_ARRAY,
768  T1_FIELD_TYPE_CALLBACK,
769  T1_FIELD_TYPE_MAX
770 }
771 
772 enum T1_FieldLocation
773 {
774  T1_FIELD_LOCATION_CID_INFO,
775  T1_FIELD_LOCATION_FONT_DICT,
776  T1_FIELD_LOCATION_FONT_INFO,
777  T1_FIELD_LOCATION_PRIVATE,
778  T1_FIELD_LOCATION_BBOX,
779  T1_FIELD_LOCATION_MAX
780 }
781 
782 enum T1_ParseState
783 {
784  T1_Parse_Start,
785  T1_Parse_Have_Width,
786  T1_Parse_Have_Moveto,
787  T1_Parse_Have_Path
788 }
789 */
790 
791 struct FT_RasterRec;
792 struct FT_LibraryRec;
793 struct FT_ModuleRec;
794 struct FT_DriverRec;
795 struct FT_RendererRec;
796 struct FT_Face_InternalRec;
797 struct FT_Size_InternalRec;
798 struct FT_SubGlyphRec;
799 struct FT_Slot_InternalRec;
800 
801 struct FTC_FaceIDRec;
802 struct FTC_ManagerRec;
803 struct FTC_NodeRec;
804 struct FTC_CMapCacheRec;
805 struct FTC_ImageCacheRec;
806 struct FTC_SBitCacheRec;
807 struct FT_StrokerRec;
808 struct FT_IncrementalRec;
809 
810 // ftsystem.h
811 union FT_StreamDesc
812 {
813  int value;
814  void* pointer;
815 }
816 
817 struct FT_MemoryRec
818 {
819  void* user;
820  FT_Alloc_Func alloc;
821  FT_Free_Func free;
822  FT_Realloc_Func realloc;
823 }
824 
825 struct FT_StreamRec
826 {
827  ubyte* base;
828  c_ulong size;
829  c_ulong pos;
830  FT_StreamDesc descriptor;
831  FT_StreamDesc pathname;
832  FT_Stream_IoFunc read;
833  FT_Stream_CloseFunc close;
834  FT_Memory memory;
835  ubyte* cursor;
836  ubyte* limit;
837 }
838 
839 // ftimage.h
840 struct FT_Vector
841 {
842  FT_Pos x;
843  FT_Pos y;
844 }
845 
846 struct FT_BBox
847 {
848  FT_Pos xMin, yMin;
849  FT_Pos xMax, yMax;
850 }
851 
852 struct FT_Bitmap
853 {
854  int rows;
855  int width;
856  int pitch;
857  ubyte* buffer;
858  short num_grays;
859  byte pixel_mode;
860  byte palette_mode;
861  void* palette;
862 }
863 
864 struct FT_Outline
865 {
866  short n_contours;
867  short n_points;
868  FT_Vector* points;
869  byte* tags;
870  short* contours;
871  int flags;
872 }
873 
874 struct FT_Outline_Funcs
875 {
876  FT_Outline_MoveToFunc move_to;
877  FT_Outline_LineToFunc line_to;
878  FT_Outline_ConicToFunc conic_to;
879  FT_Outline_CubicToFunc cubic_to;
880  int shift;
881  FT_Pos delta;
882 }
883 
884 struct FT_Span
885 {
886  short x;
887  ushort len;
888  ubyte coverage;
889 }
890 
891 struct FT_Raster_Params
892 {
893  const FT_Bitmap* target;
894  const void* source;
895  int flags;
896  FT_SpanFunc gray_spans;
897  FT_SpanFunc black_spans;
898  FT_Raster_BitTest_Func bit_test;
899  FT_Raster_BitSet_Func bit_set;
900  void* user;
901  FT_BBox clip_box;
902 }
903 
904 struct FT_Raster_Funcs
905 {
906  FT_Glyph_Format glyph_format;
907  FT_Raster_NewFunc raster_new;
908  FT_Raster_ResetFunc raster_reset;
909  FT_Raster_SetModeFunc raster_set_mode;
910  FT_Raster_RenderFunc raster_render;
911  FT_Raster_DoneFunc raster_done;
912 }
913 
914 // fttypes.h
915 struct FT_UnitVector
916 {
917  FT_F2Dot14 x;
918  FT_F2Dot14 y;
919 }
920 
921 struct FT_Matrix
922 {
923  FT_Fixed xx, xy;
924  FT_Fixed yx, yy;
925 }
926 
927 struct FT_Data
928 {
929  const FT_Byte* pointer;
930  FT_Int length;
931 }
932 
933 struct FT_Generic
934 {
935  void* data;
936  FT_Generic_Finalizer finalizer;
937 }
938 
939 struct FT_ListNodeRec
940 {
941  FT_ListNode prev;
942  FT_ListNode next;
943  void* data;
944 }
945 
946 struct FT_ListRec
947 {
948  FT_ListNode head;
949  FT_ListNode tail;
950 }
951 
952 // freetype.h
953 struct FT_Glyph_Metrics
954 {
955  FT_Pos width;
956  FT_Pos height;
957  FT_Pos horiBearingX;
958  FT_Pos horiBearingY;
959  FT_Pos horiAdvance;
960  FT_Pos vertBearingX;
961  FT_Pos vertBearingY;
962  FT_Pos vertAdvance;
963 }
964 
965 struct FT_Bitmap_Size
966 {
967  FT_Short height;
968  FT_Short width;
969  FT_Pos size;
970  FT_Pos x_ppem;
971  FT_Pos y_ppem;
972 }
973 
974 struct FT_CharMapRec
975 {
976  FT_Face face;
977  FT_Encoding encoding;
978  FT_UShort platform_id;
979  FT_UShort encoding_id;
980 }
981 
982 struct FT_FaceRec
983 {
984  FT_Long num_faces;
985  FT_Long face_index;
986  FT_Long face_flags;
987  FT_Long style_flags;
988  FT_Long num_glyphs;
989  FT_String* family_name;
990  FT_String* style_name;
991  FT_Int num_fixed_sizes;
992  FT_Bitmap_Size* available_sizes;
993  FT_Int num_charmaps;
994  FT_CharMap* charmaps;
995  FT_Generic generic;
996  FT_BBox bbox;
997  FT_UShort units_per_EM;
998  FT_Short ascender;
999  FT_Short descender;
1000  FT_Short height;
1001  FT_Short max_advance_width;
1002  FT_Short max_advance_height;
1003  FT_Short underline_position;
1004  FT_Short underline_thickness;
1005  FT_GlyphSlot glyph;
1006  FT_Size size;
1007  FT_CharMap charmap;
1008  FT_Driver driver;
1009  FT_Memory memory;
1010  FT_Stream stream;
1011  FT_ListRec sizes_list;
1012  FT_Generic autohint;
1013  void* extensions;
1014  FT_Face_Internal internal;
1015 }
1016 
1017 struct FT_Size_Metrics
1018 {
1019  FT_UShort x_ppem;
1020  FT_UShort y_ppem;
1021 
1022  FT_Fixed x_scale;
1023  FT_Fixed y_scale;
1024 
1025  FT_Pos ascender;
1026  FT_Pos descender;
1027  FT_Pos height;
1028  FT_Pos max_advance;
1029 }
1030 
1031 struct FT_SizeRec
1032 {
1033  FT_Face face;
1034  FT_Generic generic;
1035  FT_Size_Metrics metrics;
1036  FT_Size_Internal internal;
1037 }
1038 
1039 struct FT_GlyphSlotRec
1040 {
1041  FT_Library library;
1042  FT_Face face;
1043  FT_GlyphSlot next;
1044  FT_UInt reserved;
1045  FT_Generic generic;
1046  FT_Glyph_Metrics metrics;
1047  FT_Fixed linearHoriAdvance;
1048  FT_Fixed linearVertAdvance;
1049  FT_Vector advance;
1050  FT_Glyph_Format format;
1051  FT_Bitmap bitmap;
1052  FT_Int bitmap_left;
1053  FT_Int bitmap_top;
1054  FT_Outline outline;
1055  FT_UInt num_subglyphs;
1056  FT_SubGlyph subglyphs;
1057  void* control_data;
1058  c_long control_len;
1059  FT_Pos lsb_delta;
1060  FT_Pos rsb_delta;
1061  void* other;
1062  FT_Slot_Internal internal;
1063 }
1064 
1065 struct FT_Parameter
1066 {
1067  FT_ULong tag;
1068  FT_Pointer data;
1069 }
1070 
1071 struct FT_Open_Args
1072 {
1073  FT_UInt flags;
1074  FT_Byte* memory_base;
1075  FT_Long memory_size;
1076  FT_String* pathname;
1077  FT_Stream stream;
1078  FT_Module driver;
1079  FT_Int num_params;
1080  FT_Parameter* params;
1081 }
1082 
1083 struct FT_Size_RequestRec
1084 {
1085     FT_Size_Request_Type  type;
1086     FT_Long               width;
1087     FT_Long               height;
1088     FT_UInt               horiResolution;
1089     FT_UInt               vertResolution;
1090 }
1091 
1092 // ftmodapi.h
1093 struct FT_Module_Class
1094 {
1095  FT_ULong module_flags;
1096  FT_Long module_size;
1097  FT_String* module_name;
1098  FT_Fixed module_version;
1099  FT_Fixed module_requires;
1100  void* module_interface;
1101  FT_Module_Constructor module_init;
1102  FT_Module_Destructor module_done;
1103  FT_Module_Requester get_interface;
1104 }
1105 
1106 // ftrender.h
1107 struct FT_Glyph_Class   // typedef'd in ftglyph.h
1108 {
1109  FT_Long glyph_size;
1110  FT_Glyph_Format glyph_format;
1111  FT_Glyph_InitFunc glyph_init;
1112  FT_Glyph_DoneFunc glyph_done;
1113  FT_Glyph_CopyFunc glyph_copy;
1114  FT_Glyph_TransformFunc glyph_transform;
1115  FT_Glyph_GetBBoxFunc glyph_bbox;
1116  FT_Glyph_PrepareFunc glyph_prepare;
1117 }
1118 
1119 struct FT_Renderer_Class
1120 {
1121  FT_Module_Class root;
1122  FT_Glyph_Format glyph_format;
1123  FT_Renderer_RenderFunc render_glyph;
1124  FT_Renderer_TransformFunc transform_glyph;
1125  FT_Renderer_GetCBoxFunc get_glyph_cbox;
1126  FT_Renderer_SetModeFunc set_mode;
1127  FT_Raster_Funcs* raster_class;
1128 }
1129 
1130 // t1tables.h
1131 struct PS_FontInfoRec
1132  {
1133  FT_String* _version;
1134  FT_String* notice;
1135  FT_String* full_name;
1136  FT_String* family_name;
1137  FT_String* weight;
1138  FT_Long italic_angle;
1139  FT_Bool is_fixed_pitch;
1140  FT_Short underline_position;
1141  FT_UShort underline_thickness;
1142 }
1143 
1144 struct PS_PrivateRec
1145 {
1146  FT_Int unique_id;
1147  FT_Int lenIV;
1148  FT_Byte num_blue_values;
1149  FT_Byte num_other_blues;
1150  FT_Byte num_family_blues;
1151  FT_Byte num_family_other_blues;
1152  FT_Short[14] blue_values;
1153  FT_Short[10] other_blues;
1154  FT_Short[14] family_blues;
1155  FT_Short[10] family_other_blues;
1156  FT_Fixed blue_scale;
1157  FT_Int blue_shift;
1158  FT_Int blue_fuzz;
1159  FT_UShort[1] standard_width;
1160  FT_UShort[1] standard_height;
1161  FT_Byte num_snap_widths;
1162  FT_Byte num_snap_heights;
1163  FT_Bool force_bold;
1164  FT_Bool round_stem_up;
1165  FT_Short[13] snap_widths;
1166  FT_Short[13] snap_heights;
1167  FT_Fixed expansion_factor;
1168  FT_Long language_group;
1169  FT_Long password;
1170  FT_Short[2] min_feature;
1171 }
1172 
1173 struct PS_DesignMapRec
1174 {
1175  FT_Byte num_points;
1176  FT_Long* design_points;
1177  FT_Fixed* blend_points;
1178 }
1179 
1180 struct PS_BlendRec
1181 {
1182  FT_UInt num_designs;
1183  FT_UInt num_axis;
1184  FT_String*[4] axis_names;
1185  FT_Fixed*[16] design_pos;
1186  PS_DesignMapRec[4] design_map;
1187  FT_Fixed* weight_vector;
1188  FT_Fixed* default_weight_vector;
1189  PS_FontInfo[16+1] font_infos;
1190  PS_Private[16+1] privates;
1191  FT_ULong blend_bitflags;
1192  FT_BBox*[16+1] bboxes;
1193 }
1194 
1195 struct CID_FaceDictRec
1196 {
1197  PS_PrivateRec private_dict;
1198  FT_UInt len_buildchar;
1199  FT_Fixed forcebold_threshold;
1200  FT_Pos stroke_width;
1201  FT_Fixed expansion_factor;
1202  FT_Byte paint_type;
1203  FT_Byte font_type;
1204  FT_Matrix font_matrix;
1205  FT_Vector font_offset;
1206  FT_UInt num_subrs;
1207  FT_ULong subrmap_offset;
1208  FT_Int sd_bytes;
1209 }
1210 
1211 struct CID_FaceInfoRec
1212  {
1213  FT_String* cid_font_name;
1214  FT_Fixed cid_version;
1215  FT_Int cid_font_type;
1216  FT_String* registry;
1217  FT_String* ordering;
1218  FT_Int supplement;
1219  PS_FontInfoRec font_info;
1220  FT_BBox font_bbox;
1221  FT_ULong uid_base;
1222  FT_Int num_xuid;
1223  FT_ULong[16] xuid;
1224  FT_ULong cidmap_offset;
1225  FT_Int fd_bytes;
1226  FT_Int gd_bytes;
1227  FT_ULong cid_count;
1228  FT_Int num_dicts;
1229  CID_FaceDict font_dicts;
1230  FT_ULong data_offset;
1231 }
1232 
1233 alias int PS_Dict_Keys;
1234 enum
1235 {
1236     PS_DICT_FONT_TYPE,
1237     PS_DICT_FONT_MATRIX,
1238     PS_DICT_FONT_BBOX,
1239     PS_DICT_PAINT_TYPE,
1240     PS_DICT_FONT_NAME,
1241     PS_DICT_UNIQUE_ID,
1242     PS_DICT_NUM_CHAR_STRINGS,
1243     PS_DICT_CHAR_STRING_KEY,
1244     PS_DICT_CHAR_STRING,
1245     PS_DICT_ENCODING_TYPE,
1246     PS_DICT_ENCODING_ENTRY,
1247     PS_DICT_NUM_SUBRS,
1248     PS_DICT_SUBR,
1249     PS_DICT_STD_HW,
1250     PS_DICT_STD_VW,
1251     PS_DICT_NUM_BLUE_VALUES,
1252     PS_DICT_BLUE_VALUE,
1253     PS_DICT_BLUE_FUZZ,
1254     PS_DICT_NUM_OTHER_BLUES,
1255     PS_DICT_OTHER_BLUE,
1256     PS_DICT_NUM_FAMILY_BLUES,
1257     PS_DICT_FAMILY_BLUE,
1258     PS_DICT_NUM_FAMILY_OTHER_BLUES,
1259     PS_DICT_FAMILY_OTHER_BLUE,
1260     PS_DICT_BLUE_SCALE,
1261     PS_DICT_BLUE_SHIFT,
1262     PS_DICT_NUM_STEM_SNAP_H,
1263     PS_DICT_STEM_SNAP_H,
1264     PS_DICT_NUM_STEM_SNAP_V,
1265     PS_DICT_STEM_SNAP_V,
1266     PS_DICT_FORCE_BOLD,
1267     PS_DICT_RND_STEM_UP,
1268     PS_DICT_MIN_FEATURE,
1269     PS_DICT_LEN_IV,
1270     PS_DICT_PASSWORD,
1271     PS_DICT_LANGUAGE_GROUP,
1272     PS_DICT_VERSION,
1273     PS_DICT_NOTICE,
1274     PS_DICT_FULL_NAME,
1275     PS_DICT_FAMILY_NAME,
1276     PS_DICT_WEIGHT,
1277     PS_DICT_IS_FIXED_PITCH,
1278     PS_DICT_UNDERLINE_POSITION,
1279     PS_DICT_UNDERLINE_THICKNESS,
1280     PS_DICT_FS_TYPE,
1281     PS_DICT_ITALIC_ANGLE,
1282     PS_DICT_MAX = PS_DICT_ITALIC_ANGLE
1283 }
1284 
1285 // tttables.h
1286 struct TT_Header
1287 {
1288  FT_Fixed Table_Version;
1289  FT_Fixed Font_Revision;
1290  FT_Long CheckSum_Adjust;
1291  FT_Long Magic_Number;
1292  FT_UShort Flags;
1293  FT_UShort Units_Per_EM;
1294  FT_Long[2] Created;
1295  FT_Long[2] Modified;
1296  FT_Short xMin;
1297  FT_Short yMin;
1298  FT_Short xMax;
1299  FT_Short yMax;
1300  FT_UShort Mac_Style;
1301  FT_UShort Lowest_Rec_PPEM;
1302  FT_Short Font_Direction;
1303  FT_Short Index_To_Loc_Format;
1304  FT_Short Glyph_Data_Format;
1305 }
1306 
1307 struct TT_HoriHeader
1308 {
1309  FT_Fixed Version;
1310  FT_Short Ascender;
1311  FT_Short Descender;
1312  FT_Short Line_Gap;
1313  FT_UShort advance_Width_Max;
1314  FT_Short min_Left_Side_Bearing;
1315  FT_Short min_Right_Side_Bearing;
1316  FT_Short xMax_Extent;
1317  FT_Short caret_Slope_Rise;
1318  FT_Short caret_Slope_Run;
1319  FT_Short caret_Offset;
1320  FT_Short[4] Reserved;
1321  FT_Short metric_Data_Format;
1322  FT_UShort number_Of_HMetrics;
1323  void* long_metrics;
1324  void* short_metrics;
1325 }
1326 
1327 struct TT_VertHeader
1328 {
1329  FT_Fixed Version;
1330  FT_Short Ascender;
1331  FT_Short Descender;
1332  FT_Short Line_Gap;
1333  FT_UShort advance_Height_Max;
1334  FT_Short min_Top_Side_Bearing;
1335  FT_Short min_Bottom_Side_Bearing;
1336  FT_Short yMax_Extent;
1337  FT_Short caret_Slope_Rise;
1338  FT_Short caret_Slope_Run;
1339  FT_Short caret_Offset;
1340  FT_Short[4] Reserved;
1341  FT_Short metric_Data_Format;
1342  FT_UShort number_Of_VMetrics;
1343  void* long_metrics;
1344  void* short_metrics;
1345 }
1346 
1347 struct TT_OS2
1348 {
1349  FT_UShort _version;
1350  FT_Short xAvgCharWidth;
1351  FT_UShort usWeightClass;
1352  FT_UShort usWidthClass;
1353  FT_Short fsType;
1354  FT_Short ySubscriptXSize;
1355  FT_Short ySubscriptYSize;
1356  FT_Short ySubscriptXOffset;
1357  FT_Short ySubscriptYOffset;
1358  FT_Short ySuperscriptXSize;
1359  FT_Short ySuperscriptYSize;
1360  FT_Short ySuperscriptXOffset;
1361  FT_Short ySuperscriptYOffset;
1362  FT_Short yStrikeoutSize;
1363  FT_Short yStrikeoutPosition;
1364  FT_Short sFamilyClass;
1365  FT_Byte[10] panose;
1366  FT_ULong ulUnicodeRange1;
1367  FT_ULong ulUnicodeRange2;
1368  FT_ULong ulUnicodeRange3;
1369  FT_ULong ulUnicodeRange4;
1370  FT_Char[4] achVendID;
1371  FT_UShort fsSelection;
1372  FT_UShort usFirstCharIndex;
1373  FT_UShort usLastCharIndex;
1374  FT_Short sTypoAscender;
1375  FT_Short sTypoDescender;
1376  FT_Short sTypoLineGap;
1377  FT_UShort usWinAscent;
1378  FT_UShort usWinDescent;
1379  FT_ULong ulCodePageRange1;
1380  FT_ULong ulCodePageRange2;
1381  FT_Short sxHeight;
1382  FT_Short sCapHeight;
1383  FT_UShort usDefaultChar;
1384  FT_UShort usBreakChar;
1385  FT_UShort usMaxContext;
1386 }
1387 
1388 struct TT_Postscript
1389 {
1390  FT_Fixed FormatType;
1391  FT_Fixed italicAngle;
1392  FT_Short underlinePosition;
1393  FT_Short underlineThickness;
1394  FT_ULong isFixedPitch;
1395  FT_ULong minMemType42;
1396  FT_ULong maxMemType42;
1397  FT_ULong minMemType1;
1398  FT_ULong maxMemType1;
1399 }
1400 
1401 struct TT_PCLT
1402 {
1403  FT_Fixed Version;
1404  FT_ULong FontNumber;
1405  FT_UShort Pitch;
1406  FT_UShort xHeight;
1407  FT_UShort Style;
1408  FT_UShort TypeFamily;
1409  FT_UShort CapHeight;
1410  FT_UShort SymbolSet;
1411  FT_Char[16] TypeFace;
1412  FT_Char[8] CharacterComplement;
1413  FT_Char[6] FileName;
1414  FT_Char StrokeWeight;
1415  FT_Char WidthType;
1416  FT_Byte SerifStyle;
1417  FT_Byte Reserved;
1418 }
1419 
1420 struct TT_MaxProfile
1421 {
1422  FT_Fixed _version;
1423  FT_UShort numGlyphs;
1424  FT_UShort maxPoints;
1425  FT_UShort maxContours;
1426  FT_UShort maxCompositePoints;
1427  FT_UShort maxCompositeContours;
1428  FT_UShort maxZones;
1429  FT_UShort maxTwilightPoints;
1430  FT_UShort maxStorage;
1431  FT_UShort maxFunctionDefs;
1432  FT_UShort maxInstructionDefs;
1433  FT_UShort maxStackElements;
1434  FT_UShort maxSizeOfInstructions;
1435  FT_UShort maxComponentElements;
1436  FT_UShort maxComponentDepth;
1437 }
1438 
1439 // ftbdf.h
1440 struct BDF_PropertyRec
1441 {
1442  BDF_PropertyType type;
1443  union u
1444  {
1445    char* atom;
1446    FT_Int32 integer;
1447    FT_UInt32 cardinal;
1448  }
1449 }
1450 
1451 // ftwinfnt.h
1452 struct FT_WinFNT_HeaderRec
1453 {
1454  FT_UShort _version;
1455  FT_ULong file_size;
1456  FT_Byte[60] copyright;
1457  FT_UShort file_type;
1458  FT_UShort nominal_point_size;
1459  FT_UShort vertical_resolution;
1460  FT_UShort horizontal_resolution;
1461  FT_UShort ascent;
1462  FT_UShort internal_leading;
1463  FT_UShort external_leading;
1464  FT_Byte italic;
1465  FT_Byte underline;
1466  FT_Byte strike_out;
1467  FT_UShort weight;
1468  FT_Byte charset;
1469  FT_UShort pixel_width;
1470  FT_UShort pixel_height;
1471  FT_Byte pitch_and_family;
1472  FT_UShort avg_width;
1473  FT_UShort max_width;
1474  FT_Byte first_char;
1475  FT_Byte last_char;
1476  FT_Byte default_char;
1477  FT_Byte break_char;
1478  FT_UShort bytes_per_row;
1479  FT_ULong device_offset;
1480  FT_ULong face_name_offset;
1481  FT_ULong bits_pointer;
1482  FT_ULong bits_offset;
1483  FT_Byte reserved;
1484  FT_ULong flags;
1485  FT_UShort A_space;
1486  FT_UShort B_space;
1487  FT_UShort C_space;
1488  FT_UShort color_table_offset;
1489  FT_ULong[4] reserved1;
1490 }
1491 
1492 // ftglyph.h
1493 struct FT_GlyphRec
1494 {
1495  FT_Library library;
1496  FT_Glyph_Class* clazz;
1497  FT_Glyph_Format format;
1498  FT_Vector advance;
1499 }
1500 
1501 struct FT_BitmapGlyphRec
1502 {
1503  FT_GlyphRec root;
1504  FT_Int left;
1505  FT_Int top;
1506  FT_Bitmap bitmap;
1507 }
1508 
1509 struct FT_OutlineGlyphRec
1510 {
1511  FT_GlyphRec root;
1512  FT_Outline outline;
1513 }
1514 
1515 // ftcache.h
1516 struct FTC_ScalerRec
1517 {
1518  FTC_FaceID face_id;
1519  FT_UInt width;
1520  FT_UInt height;
1521  FT_Int pixel;
1522  FT_UInt x_res;
1523  FT_UInt y_res;
1524 }
1525 
1526 struct FTC_ImageTypeRec
1527 {
1528  FTC_FaceID face_id;
1529  FT_Int width;
1530  FT_Int height;
1531  FT_Int32 flags;
1532 }
1533 
1534 struct FTC_SBitRec
1535 {
1536  FT_Byte width;
1537  FT_Byte height;
1538  FT_Char left;
1539  FT_Char top;
1540  FT_Byte format;
1541  FT_Byte max_grays;
1542  FT_Short pitch;
1543  FT_Char xadvance;
1544  FT_Char yadvance;
1545  FT_Byte* buffer;
1546 }
1547 
1548 // ftmm.h
1549 struct FT_MM_Axis
1550 {
1551  FT_String* name;
1552  FT_Long minimum;
1553  FT_Long maximum;
1554 }
1555 
1556 struct FT_Multi_Master
1557 {
1558  FT_UInt num_axis;
1559  FT_UInt num_designs;
1560  FT_MM_Axis[4] axis;
1561 }
1562 
1563 struct FT_Var_Axis
1564 {
1565  FT_String* name;
1566  FT_Fixed minimum;
1567  FT_Fixed def;
1568  FT_Fixed maximum;
1569  FT_ULong tag;
1570  FT_UInt strid;
1571 }
1572 
1573 struct FT_Var_Named_Style
1574 {
1575  FT_Fixed* coords;
1576  FT_UInt strid;
1577 }
1578 
1579 struct FT_MM_Var
1580 {
1581  FT_UInt num_axis;
1582  FT_UInt num_designs;
1583  FT_UInt num_namedstyles;
1584  FT_Var_Axis* axis;
1585  FT_Var_Named_Style* namedstyle;
1586 }
1587 
1588 // ftsnames.h
1589 struct FT_SfntName
1590 {
1591  FT_UShort platform_id;
1592  FT_UShort encoding_id;
1593  FT_UShort language_id;
1594  FT_UShort name_id;
1595  FT_Byte* string;
1596  FT_UInt string_len;
1597 }
1598 
1599 // ftincrem.h
1600 struct FT_Incremental_MetricsRec
1601 {
1602  FT_Long bearing_x;
1603  FT_Long bearing_y;
1604  FT_Long advance;
1605 }
1606 
1607 struct FT_Incremental_FuncsRec
1608 {
1609  FT_Incremental_GetGlyphDataFunc get_glyph_data;
1610  FT_Incremental_FreeGlyphDataFunc free_glyph_data;
1611  FT_Incremental_GetGlyphMetricsFunc get_glyph_metrics;
1612 }
1613 
1614 struct FT_Incremental_InterfaceRec
1615 {
1616  FT_Incremental_FuncsRec* funcs;
1617  FT_Incremental object;
1618 }
1619 
1620 /+ other
1621 struct FTC_MruNodeRec
1622 {
1623  FTC_MruNode next;
1624  FTC_MruNode prev;
1625 }
1626 
1627 struct FTC_MruListClassRec
1628 {
1629  FT_UInt node_size;
1630  FTC_MruNode_CompareFunc node_compare;
1631  FTC_MruNode_InitFunc node_init;
1632  FTC_MruNode_ResetFunc node_reset;
1633  FTC_MruNode_DoneFunc node_done;
1634 }
1635 
1636 struct FTC_MruListRec
1637 {
1638  FT_UInt num_nodes;
1639  FT_UInt max_nodes;
1640  FTC_MruNode nodes;
1641  FT_Pointer data;
1642  FTC_MruListClassRec clazz;
1643  FT_Memory memory;
1644 }
1645 
1646 struct FTC_NodeRec
1647 {
1648  FTC_MruNodeRec mru;
1649  FTC_Node link;
1650  FT_UInt32 hash;
1651  FT_UShort cache_index;
1652  FT_Short ref_count;
1653 }
1654 
1655 struct FTC_CacheClassRec
1656 {
1657  FTC_Node_NewFunc node_new;
1658  FTC_Node_WeightFunc node_weight;
1659  FTC_Node_CompareFunc node_compare;
1660  FTC_Node_CompareFunc node_remove_faceid;
1661  FTC_Node_FreeFunc node_free;
1662  FT_UInt cache_size;
1663  FTC_Cache_InitFunc cache_init;
1664  FTC_Cache_DoneFunc cache_done;
1665 }
1666 
1667 struct FTC_CacheRec
1668 {
1669  FT_UFast p;
1670  FT_UFast mask;
1671  FT_Long slack;
1672  FTC_Node* buckets;
1673  FTC_CacheClassRec clazz;
1674  FTC_Manager manager;
1675  FT_Memory memory;
1676  FT_UInt index;
1677  FTC_CacheClass org_class;
1678 }
1679 
1680 struct FTC_ManagerRec
1681 {
1682  FT_Library library;
1683  FT_Memory memory;
1684  FTC_Node nodes_list;
1685  FT_ULong max_weight;
1686  FT_ULong cur_weight;
1687  FT_UInt num_nodes;
1688  FTC_Cache[16] caches;
1689  FT_UInt num_caches;
1690  FTC_MruListRec faces;
1691  FTC_MruListRec sizes;
1692  FT_Pointer request_data;
1693  FTC_Face_Requester request_face;
1694 }
1695 
1696 struct FTC_FamilyRec
1697 {
1698  FTC_MruNodeRec mrunode;
1699  FT_UInt num_nodes;
1700  FTC_Cache cache;
1701  FTC_MruListClass clazz;
1702 }
1703 
1704 struct FTC_GNodeRec
1705 {
1706  FTC_NodeRec node;
1707  FTC_Family family;
1708  FT_UInt gindex;
1709 }
1710 
1711 struct FTC_GQueryRec
1712 {
1713  FT_UInt gindex;
1714  FTC_Family family;
1715 }
1716 
1717 struct FTC_GCacheRec
1718 {
1719  FTC_CacheRec cache;
1720  FTC_MruListRec families;
1721 }
1722 
1723 struct FTC_GCacheClassRec
1724 {
1725  FTC_CacheClassRec clazz;
1726  FTC_MruListClass family_class;
1727 }
1728 
1729 struct FTC_INodeRec
1730 {
1731  FTC_GNodeRec gnode;
1732  FT_Glyph glyph;
1733 }
1734 
1735 struct FTC_IFamilyClassRec
1736 {
1737  FTC_MruListClassRec clazz;
1738  FTC_IFamily_LoadGlyphFunc family_load_glyph;
1739 }
1740 
1741 struct FTC_SNodeRec
1742 {
1743  FTC_GNodeRec gnode;
1744  FT_UInt count;
1745  FTC_SBitRec[16] sbits;
1746 }
1747 
1748 struct FTC_SFamilyClassRec
1749 {
1750  FTC_MruListClassRec clazz;
1751  FTC_SFamily_GetCountFunc family_get_count;
1752  FTC_SFamily_LoadGlyphFunc family_load_glyph;
1753 }
1754 
1755 struct FT_SubGlyphRec
1756 {
1757  FT_Int index;
1758  FT_UShort flags;
1759  FT_Int arg1;
1760  FT_Int arg2;
1761  FT_Matrix transform;
1762 }
1763 
1764 struct FT_GlyphLoadRec
1765 {
1766  FT_Outline outline;
1767  FT_Vector* extra_points;
1768  FT_UInt num_subglyphs;
1769  FT_SubGlyph subglyphs;
1770 }
1771 
1772 struct FT_GlyphLoaderRec
1773 {
1774  FT_Memory memory;
1775  FT_UInt max_points;
1776  FT_UInt max_contours;
1777  FT_UInt max_subglyphs;
1778  FT_Bool use_extra;
1779  FT_GlyphLoadRec base;
1780  FT_GlyphLoadRec current;
1781  void* other;
1782 }
1783 
1784 struct FT_Driver_ClassRec
1785 {
1786  FT_Module_Class root;
1787  FT_Long face_object_size;
1788  FT_Long size_object_size;
1789  FT_Long slot_object_size;
1790  FT_Face_InitFunc init_face;
1791  FT_Face_DoneFunc done_face;
1792  FT_Size_InitFunc init_size;
1793  FT_Size_DoneFunc done_size;
1794  FT_Slot_InitFunc init_slot;
1795  FT_Slot_DoneFunc done_slot;
1796  FT_Size_ResetPointsFunc set_char_sizes;
1797  FT_Size_ResetPixelsFunc set_pixel_sizes;
1798  FT_Slot_LoadFunc load_glyph;
1799  FT_Face_GetKerningFunc get_kerning;
1800  FT_Face_AttachFunc attach_file;
1801  FT_Face_GetAdvancesFunc get_advances;
1802 }
1803 
1804 struct FT_AutoHinter_ServiceRec
1805 {
1806  FT_AutoHinter_GlobalResetFunc reset_face;
1807  FT_AutoHinter_GlobalGetFunc get_global_hints;
1808  FT_AutoHinter_GlobalDoneFunc done_global_hints;
1809  FT_AutoHinter_GlyphLoadFunc load_glyph;
1810 }
1811 
1812 struct FT_ServiceDescRec
1813 {
1814  char* serv_id;
1815  void* serv_data;
1816 }
1817 
1818 struct FT_ServiceCacheRec
1819 {
1820  FT_Pointer service_POSTSCRIPT_FONT_NAME;
1821  FT_Pointer service_MULTI_MASTERS;
1822  FT_Pointer service_GLYPH_DICT;
1823  FT_Pointer service_PFR_METRICS;
1824  FT_Pointer service_WINFNT;
1825 }
1826 
1827 struct FT_CMapRec
1828 {
1829  FT_CharMapRec charmap;
1830  FT_CMap_Class clazz;
1831 }
1832 
1833 struct FT_CMap_ClassRec
1834 {
1835  FT_ULong size;
1836  FT_CMap_InitFunc init;
1837  FT_CMap_DoneFunc done;
1838  FT_CMap_CharIndexFunc char_index;
1839  FT_CMap_CharNextFunc char_next;
1840 }
1841 
1842 struct FT_Face_InternalRec
1843 {
1844  FT_UShort max_points;
1845  FT_Short max_contours;
1846  FT_Matrix transform_matrix;
1847  FT_Vector transform_delta;
1848  FT_Int transform_flags;
1849  FT_ServiceCacheRec services;
1850 }
1851 
1852 struct FT_Slot_InternalRec
1853 {
1854  FT_GlyphLoader loader;
1855  FT_UInt flags;
1856  FT_Bool glyph_transformed;
1857  FT_Matrix glyph_matrix;
1858  FT_Vector glyph_delta;
1859  void* glyph_hints;
1860 }
1861 
1862 struct FT_ModuleRec
1863 {
1864  FT_Module_Class* clazz;
1865  FT_Library library;
1866  FT_Memory memory;
1867  FT_Generic generic;
1868 }
1869 
1870 struct FT_RendererRec
1871 {
1872  FT_ModuleRec root;
1873  FT_Renderer_Class* clazz;
1874  FT_Glyph_Format glyph_format;
1875  FT_Glyph_Class glyph_class;
1876  FT_Raster raster;
1877  FT_Raster_RenderFunc  raster_render;
1878  FT_Renderer_RenderFunc render;
1879 }
1880 
1881 struct FT_DriverRec
1882 {
1883  FT_ModuleRec root;
1884  FT_Driver_Class clazz;
1885  FT_ListRec faces_list;
1886  void* extensions;
1887  FT_GlyphLoader glyph_loader;
1888 }
1889 
1890 struct FT_LibraryRec
1891 {
1892  FT_Memory memory;
1893  FT_Generic generic;
1894  FT_Int version_major;
1895  FT_Int version_minor;
1896  FT_Int version_patch;
1897  FT_UInt num_modules;
1898  FT_Module[32] modules;
1899  FT_ListRec renderers;
1900  FT_Renderer cur_renderer;
1901  FT_Module auto_hinter;
1902  FT_Byte* raster_pool;
1903  FT_ULong raster_pool_size;
1904  FT_DebugHook_Func[4] debug_hooks;
1905 }
1906 
1907 struct FT_Frame_Field
1908 {
1909  FT_Byte value;
1910  FT_Byte size;
1911  FT_UShort offset;
1912 }
1913 
1914 struct TTC_HeaderRec
1915 {
1916  FT_ULong tag;
1917  FT_Fixed _version;
1918  FT_Long count;
1919  FT_ULong* offsets;
1920 }
1921 
1922 struct SFNT_HeaderRec
1923 {
1924  FT_ULong format_tag;
1925  FT_UShort num_tables;
1926  FT_UShort search_range;
1927  FT_UShort entry_selector;
1928  FT_UShort range_shift;
1929  FT_ULong offset;
1930 }
1931 
1932 struct TT_TableRec
1933  {
1934  FT_ULong Tag;
1935  FT_ULong CheckSum;
1936  FT_ULong Offset;
1937  FT_ULong Length;
1938 }
1939 
1940 struct TT_LongMetricsRec
1941 {
1942  FT_UShort advance;
1943  FT_Short bearing;
1944 }
1945 
1946 struct TT_NameEntryRec
1947 {
1948  FT_UShort platformID;
1949  FT_UShort encodingID;
1950  FT_UShort languageID;
1951  FT_UShort nameID;
1952  FT_UShort stringLength;
1953  FT_ULong stringOffset;
1954  FT_Byte* string;
1955 }
1956 
1957 struct TT_NameTableRec
1958 {
1959  FT_UShort format;
1960  FT_UInt numNameRecords;
1961  FT_UInt storageOffset;
1962  TT_NameEntryRec* names;
1963  FT_Stream stream;
1964 }
1965 
1966 struct TT_GaspRangeRec
1967 {
1968  FT_UShort maxPPEM;
1969  FT_UShort gaspFlag;
1970 }
1971 
1972 struct TT_GaspRec
1973 {
1974  FT_UShort _version;
1975  FT_UShort numRanges;
1976  TT_GaspRange gaspRanges;
1977 }
1978 
1979 struct TT_HdmxEntryRec
1980 {
1981  FT_Byte ppem;
1982  FT_Byte max_width;
1983  FT_Byte* widths;
1984 }
1985 
1986 struct TT_HdmxRec
1987 {
1988  FT_UShort _version;
1989  FT_Short num_records;
1990  TT_HdmxEntry records;
1991 }
1992 
1993 struct TT_Kern0_PairRec
1994 {
1995  FT_UShort left;
1996  FT_UShort right;
1997  FT_FWord value;
1998 }
1999 
2000 struct TT_SBit_MetricsRec
2001 {
2002  FT_Byte height;
2003  FT_Byte width;
2004  FT_Char horiBearingX;
2005  FT_Char horiBearingY;
2006  FT_Byte horiAdvance;
2007  FT_Char vertBearingX;
2008  FT_Char vertBearingY;
2009  FT_Byte vertAdvance;
2010 }
2011 
2012 struct TT_SBit_SmallMetricsRec
2013 {
2014  FT_Byte height;
2015  FT_Byte width;
2016  FT_Char bearingX;
2017  FT_Char bearingY;
2018  FT_Byte advance;
2019 }
2020 
2021 struct TT_SBit_LineMetricsRec
2022 {
2023  FT_Char ascender;
2024  FT_Char descender;
2025  FT_Byte max_width;
2026  FT_Char caret_slope_numerator;
2027  FT_Char caret_slope_denominator;
2028  FT_Char caret_offset;
2029  FT_Char min_origin_SB;
2030  FT_Char min_advance_SB;
2031  FT_Char max_before_BL;
2032  FT_Char min_after_BL;
2033  FT_Char[2] pads;
2034 }
2035 
2036 struct TT_SBit_RangeRec
2037 {
2038  FT_UShort first_glyph;
2039  FT_UShort last_glyph;
2040  FT_UShort index_format;
2041  FT_UShort image_format;
2042  FT_ULong image_offset;
2043  FT_ULong image_size;
2044  TT_SBit_MetricsRec metrics;
2045  FT_ULong num_glyphs;
2046  FT_ULong* glyph_offsets;
2047  FT_UShort* glyph_codes;
2048  FT_ULong table_offset;
2049 }
2050 
2051 struct TT_SBit_StrikeRec
2052 {
2053  FT_Int num_ranges;
2054  TT_SBit_Range sbit_ranges;
2055  FT_ULong ranges_offset;
2056  FT_ULong color_ref;
2057  TT_SBit_LineMetricsRec hori;
2058  TT_SBit_LineMetricsRec vert;
2059  FT_UShort start_glyph;
2060  FT_UShort end_glyph;
2061  FT_Byte x_ppem;
2062  FT_Byte y_ppem;
2063  FT_Byte bit_depth;
2064  FT_Char flags;
2065 }
2066 
2067 struct TT_SBit_ComponentRec
2068 {
2069  FT_UShort glyph_code;
2070  FT_Char x_offset;
2071  FT_Char y_offset;
2072 }
2073 
2074 struct TT_SBit_ScaleRec
2075 {
2076  TT_SBit_LineMetricsRec hori;
2077  TT_SBit_LineMetricsRec vert;
2078  FT_Byte x_ppem;
2079  FT_Byte y_ppem;
2080  FT_Byte x_ppem_substitute;
2081  FT_Byte y_ppem_substitute;
2082 }
2083 
2084 struct TT_Post_20Rec
2085 {
2086  FT_UShort num_glyphs;
2087  FT_UShort num_names;
2088  FT_UShort* glyph_indices;
2089  FT_Char** glyph_names;
2090 }
2091 
2092 struct TT_Post_25Rec
2093 {
2094  FT_UShort num_glyphs;
2095  FT_Char* offsets;
2096 }
2097 
2098 struct TT_Post_NamesRec
2099 {
2100  FT_Bool loaded;
2101  union names
2102  {
2103  TT_Post_20Rec format_20;
2104  TT_Post_25Rec format_25;
2105  }
2106 }
2107 
2108 struct TT_FaceRec
2109 {
2110  FT_FaceRec root;
2111  TTC_HeaderRec ttc_header;
2112  FT_ULong format_tag;
2113  FT_UShort num_tables;
2114  TT_Table dir_tables;
2115  TT_Header header;
2116  TT_HoriHeader horizontal;
2117  TT_MaxProfile max_profile;
2118  FT_ULong max_components;
2119  FT_Bool vertical_info;
2120  TT_VertHeader vertical;
2121  FT_UShort num_names;
2122  TT_NameTableRec name_table;
2123  TT_OS2 os2;
2124  TT_Postscript postscript;
2125  FT_Byte* cmap_table;
2126  FT_ULong cmap_size;
2127  TT_Loader_GotoTableFunc goto_table;
2128  TT_Loader_StartGlyphFunc access_glyph_frame;
2129  TT_Loader_EndGlyphFunc forget_glyph_frame;
2130  TT_Loader_ReadGlyphFunc read_glyph_header;
2131  TT_Loader_ReadGlyphFunc read_simple_glyph;
2132  TT_Loader_ReadGlyphFunc read_composite_glyph;
2133  void* sfnt;
2134  void* psnames;
2135  TT_HdmxRec hdmx;
2136  TT_GaspRec gasp;
2137  TT_PCLT pclt;
2138  FT_ULong num_sbit_strikes;
2139  TT_SBit_Strike sbit_strikes;
2140  FT_ULong num_sbit_scales;
2141  TT_SBit_Scale sbit_scales;
2142  TT_Post_NamesRec postscript_names;
2143  FT_UShort num_locations;
2144  FT_Long* glyph_locations;
2145  FT_ULong glyf_len;
2146  FT_ULong font_program_size;
2147  FT_Byte* font_program;
2148  FT_ULong cvt_program_size;
2149  FT_Byte* cvt_program;
2150  FT_ULong cvt_size;
2151  FT_Short* cvt;
2152  FT_Int num_kern_pairs;
2153  FT_Int kern_table_index;
2154  TT_Kern0_Pair kern_pairs;
2155  TT_Interpreter interpreter;
2156  FT_Bool unpatented_hinting;
2157  FT_Bool doblend;
2158  GX_Blend blend;
2159  FT_Generic extra;
2160  char* postscript_name;
2161 }
2162 
2163 struct TT_GlyphZoneRec
2164 {
2165  FT_Memory memory;
2166  FT_UShort max_points;
2167  FT_UShort max_contours;
2168  FT_UShort n_points;
2169  FT_Short n_contours;
2170  FT_Vector* org;
2171  FT_Vector* cur;
2172  FT_Byte* tags;
2173  FT_UShort* contours;
2174 }
2175 
2176 struct TT_LoaderRec
2177 {
2178  FT_Face face;
2179  FT_Size size;
2180  FT_GlyphSlot glyph;
2181  FT_GlyphLoader gloader;
2182  FT_ULong load_flags;
2183  FT_UInt glyph_index;
2184  FT_Stream stream;
2185  FT_Int byte_len;
2186  FT_Short n_contours;
2187  FT_BBox bbox;
2188  FT_Int left_bearing;
2189  FT_Int advance;
2190  FT_Int top_bearing;
2191  FT_Int vadvance;
2192  FT_Int linear;
2193  FT_Bool linear_def;
2194  FT_Bool preserve_pps;
2195  FT_Vector pp1;
2196  FT_Vector pp2;
2197  FT_Vector pp3;
2198  FT_Vector pp4;
2199  FT_ULong glyf_offset;
2200  TT_GlyphZoneRec base;
2201  TT_GlyphZoneRec zone;
2202  TT_ExecContext exec;
2203  FT_Byte* instructions;
2204  FT_ULong ins_pos;
2205  void* other;
2206 }
2207 
2208 struct SFNT_Interface
2209 {
2210  TT_Loader_GotoTableFunc goto_table;
2211  TT_Init_Face_Func init_face;
2212  TT_Load_Face_Func load_face;
2213  TT_Done_Face_Func done_face;
2214  FT_Module_Requester get_interface;
2215  TT_Load_Any_Func load_any;
2216  TT_Load_SFNT_HeaderRec_Func load_sfnt_header;
2217  TT_Load_Directory_Func load_directory;
2218  TT_Load_Table_Func load_header;
2219  TT_Load_Metrics_Func load_metrics;
2220  TT_Load_Table_Func load_charmaps;
2221  TT_Load_Table_Func load_max_profile;
2222  TT_Load_Table_Func load_os2;
2223  TT_Load_Table_Func load_psnames;
2224  TT_Load_Table_Func load_names;
2225  TT_Free_Table_Func free_names;
2226  TT_Load_Table_Func load_hdmx;
2227  TT_Free_Table_Func free_hdmx;
2228  TT_Load_Table_Func load_kerning;
2229  TT_Load_Table_Func load_gasp;
2230  TT_Load_Table_Func load_pclt;
2231  TT_Load_Table_Func load_bitmap_header;
2232  TT_Set_SBit_Strike_Func set_sbit_strike;
2233  TT_Load_Table_Func load_sbits;
2234  TT_Find_SBit_Image_Func find_sbit_image;
2235  TT_Load_SBit_Metrics_Func load_sbit_metrics;
2236  TT_Load_SBit_Image_Func load_sbit_image;
2237  TT_Free_Table_Func free_sbits;
2238  TT_Face_GetKerningFunc get_kerning;
2239  TT_Get_PS_Name_Func get_psname;
2240  TT_Free_Table_Func free_psnames;
2241 }
2242 
2243 struct FT_ValidatorRec
2244 {
2245  FT_Byte* base;
2246  FT_Byte* limit;
2247  FT_ValidationLevel level;
2248  FT_Error error;
2249  int[_JBLEN]  jump_buffer;
2250 }
2251 
2252 struct PSH_Globals_FuncsRec
2253 {
2254  PSH_Globals_NewFunc create;
2255  PSH_Globals_SetScaleFunc set_scale;
2256  PSH_Globals_DestroyFunc destroy;
2257 }
2258 
2259 struct T1_Hints_FuncsRec
2260 {
2261  T1_Hints hints;
2262  T1_Hints_OpenFunc open;
2263  T1_Hints_CloseFunc close;
2264  T1_Hints_SetStemFunc stem;
2265  T1_Hints_SetStem3Func stem3;
2266  T1_Hints_ResetFunc reset;
2267  T1_Hints_ApplyFunc apply;
2268 }
2269 
2270 struct T2_Hints_FuncsRec
2271 {
2272  T2_Hints hints;
2273  T2_Hints_OpenFunc open;
2274  T2_Hints_CloseFunc close;
2275  T2_Hints_StemsFunc stems;
2276  T2_Hints_MaskFunc hintmask;
2277  T2_Hints_CounterFunc counter;
2278  T2_Hints_ApplyFunc apply;
2279 }
2280 
2281 struct PSHinter_Interface
2282 {
2283  PSH_Globals_Funcs function( FT_Module mod ) get_globals_funcs;
2284  T1_Hints_Funcs function( FT_Module mod ) get_t1_funcs;
2285  T2_Hints_Funcs function( FT_Module mod ) get_t2_funcs;
2286 }
2287 
2288 struct PS_UniMap
2289 {
2290  FT_UInt unicode;
2291  FT_UInt glyph_index;
2292 }
2293 
2294 struct PS_Unicodes
2295 {
2296  FT_UInt num_maps;
2297  PS_UniMap* maps;
2298 }
2299 
2300 struct FT_Service_PsCMapsRec
2301 {
2302  PS_Unicode_ValueFunc unicode_value;
2303 
2304  PS_Unicodes_InitFunc unicodes_init;
2305  PS_Unicodes_CharIndexFunc unicodes_char_index;
2306  PS_Unicodes_CharNextFunc unicodes_char_next;
2307 
2308  PS_Macintosh_Name_Func macintosh_name;
2309  PS_Adobe_Std_Strings_Func adobe_std_strings;
2310  ushort* adobe_std_encoding;
2311  ushort* adobe_expert_encoding;
2312 }
2313 
2314 struct T1_EncodingRec
2315 {
2316  FT_Int num_chars;
2317  FT_Int code_first;
2318  FT_Int code_last;
2319  FT_UShort* char_index;
2320  FT_String** char_name;
2321 }
2322 
2323 
2324 struct T1_FontRec
2325 {
2326  PS_FontInfoRec font_info;
2327  PS_PrivateRec private_dict;
2328  FT_String* font_name;
2329  T1_EncodingType encoding_type;
2330  T1_EncodingRec encoding;
2331  FT_Byte* subrs_block;
2332  FT_Byte* charstrings_block;
2333  FT_Byte* glyph_names_block;
2334  FT_Int num_subrs;
2335  FT_Byte** subrs;
2336  FT_PtrDist* subrs_len;
2337  FT_Int num_glyphs;
2338  FT_String** glyph_names;
2339  FT_Byte** charstrings;
2340  FT_PtrDist* charstrings_len;
2341  FT_Byte paint_type;
2342  FT_Byte font_type;
2343  FT_Matrix font_matrix;
2344  FT_Vector font_offset;
2345  FT_BBox font_bbox;
2346  FT_Long font_id;
2347  FT_Fixed stroke_width;
2348 }
2349 
2350 struct CID_SubrsRec
2351 {
2352  FT_UInt num_subrs;
2353  FT_Byte** code;
2354 }
2355 
2356 struct T1_FaceRec
2357 {
2358  FT_FaceRec root;
2359  T1_FontRec type1;
2360  void* psnames;
2361  void* psaux;
2362  void* afm_data;
2363  FT_CharMapRec[2] charmaprecs;
2364  FT_CharMap[2] charmaps;
2365  PS_Unicodes unicode_map;
2366  PS_Blend blend;
2367  void* pshinter;
2368 }
2369 
2370 struct CID_FaceRec
2371 {
2372  FT_FaceRec root;
2373  void* psnames;
2374  void* psaux;
2375  CID_FaceInfoRec cid;
2376  void* afm_data;
2377  FT_Byte* binary_data;
2378  FT_Stream cid_stream;
2379  CID_Subrs subrs;
2380  void* pshinter;
2381 }
2382 
2383 struct PS_Table_FuncsRec
2384 {
2385  FT_Error function( PS_Table table, FT_Int count, FT_Memory memory ) init;
2386  void       function( PS_Table table ) done;
2387  FT_Error function( PS_Table table, FT_Int idx, void* object, FT_PtrDist length ) add;
2388  void      function( PS_Table table ) release;
2389 }
2390 
2391 struct PS_TableRec
2392 {
2393  FT_Byte* block;
2394  FT_Offset cursor;
2395  FT_Offset capacity;
2396  FT_Long init;
2397  FT_Int max_elems;
2398  FT_Int num_elems;
2399  FT_Byte** elements;
2400  FT_PtrDist* lengths;
2401  FT_Memory memory;
2402  PS_Table_FuncsRec funcs;
2403 }
2404 
2405 struct T1_TokenRec
2406 {
2407  FT_Byte* start;
2408  FT_Byte* limit;
2409  T1_TokenType type;
2410 }
2411 
2412 struct T1_FieldRec
2413 {
2414  char* ident;
2415  T1_FieldLocation location;
2416  T1_FieldType type;
2417  T1_Field_ParseFunc reader;
2418  FT_UInt offset;
2419  FT_Byte size;
2420  FT_UInt array_max;
2421  FT_UInt count_offset;
2422 }
2423 
2424 struct PS_Parser_FuncsRec
2425 {
2426  void         function( PS_Parser parser, FT_Byte* base, FT_Byte* limit, FT_Memory memory ) init;
2427  void         function( PS_Parser parser ) done;
2428  void         function( PS_Parser parser ) skip_spaces;
2429  void         function( PS_Parser parser ) skip_PS_token;
2430  FT_Long    function( PS_Parser parser ) to_int;
2431  FT_Fixed    function( PS_Parser parser, FT_Int power_ten ) to_fixed;
2432  FT_Error    function( PS_Parser parser, FT_Byte* bytes, FT_Long max_bytes, FT_Long* pnum_bytes, FT_Bool delimiters ) to_bytes;
2433  FT_Int        function( PS_Parser parser, FT_Int max_coords, FT_Short* coords ) to_coord_array;
2434  FT_Int        function( PS_Parser parser, FT_Int max_values, FT_Fixed* values, FT_Int power_ten ) to_fixed_array;
2435  void        function( PS_Parser parser, T1_Token token ) to_token;
2436  void        function( PS_Parser parser, T1_Token tokens, FT_UInt max_tokens, FT_Int* pnum_tokens ) to_token_array;
2437  FT_Error    function( PS_Parser parser, in T1_Field field, void** objects,  FT_UInt max_objects,  FT_ULong* pflags ) load_field;
2438  FT_Error    function( PS_Parser parser, in T1_Field field, void** objects, FT_UInt max_objects, FT_ULong* pflags ) load_field_table;
2439 }
2440 
2441 struct PS_ParserRec
2442 {
2443  FT_Byte* cursor;
2444  FT_Byte* base;
2445  FT_Byte* limit;
2446  FT_Error error;
2447  FT_Memory memory;
2448  PS_Parser_FuncsRec funcs;
2449 }
2450 
2451 struct T1_Builder_FuncsRec
2452 {
2453  void function( T1_Builder builder, FT_Face face, FT_Size size, FT_GlyphSlot slot, FT_Bool hinting ) init;
2454  void function( T1_Builder builder ) done;
2455 
2456  T1_Builder_Check_Points_Func check_points;
2457  T1_Builder_Add_Point_Func add_point;
2458  T1_Builder_Add_Point1_Func add_point1;
2459  T1_Builder_Add_Contour_Func add_contour;
2460  T1_Builder_Start_Point_Func start_point;
2461  T1_Builder_Close_Contour_Func close_contour;
2462 }
2463 
2464 struct T1_BuilderRec
2465 {
2466  FT_Memory memory;
2467  FT_Face face;
2468  FT_GlyphSlot glyph;
2469  FT_GlyphLoader loader;
2470  FT_Outline* base;
2471  FT_Outline* current;
2472  FT_Vector last;
2473  FT_Fixed scale_x;
2474  FT_Fixed scale_y;
2475  FT_Pos pos_x;
2476  FT_Pos pos_y;
2477  FT_Vector left_bearing;
2478  FT_Vector advance;
2479  FT_BBox bbox;
2480  T1_ParseState parse_state;
2481  FT_Bool load_points;
2482  FT_Bool no_recurse;
2483  FT_Bool shift;
2484  FT_Bool metrics_only;
2485  void* hints_funcs;
2486  void* hints_globals;
2487  T1_Builder_FuncsRec funcs;
2488 }
2489 
2490 struct T1_Decoder_ZoneRec
2491 {
2492  FT_Byte* cursor;
2493  FT_Byte* base;
2494  FT_Byte* limit;
2495 }
2496 
2497 struct T1_Decoder_FuncsRec
2498 {
2499  FT_Error function( T1_Decoder, FT_Face, FT_Size, FT_GlyphSlot, FT_Byte**, PS_Blend, FT_Bool, FT_Render_Mode, T1_Decoder_Callback ) init;
2500  void      function( T1_Decoder decoder ) done;
2501  FT_Error function( T1_Decoder decoder, FT_Byte* base, FT_UInt len ) parse_charstrings;
2502 }
2503 
2504 struct T1_DecoderRec
2505 {
2506  T1_BuilderRec builder;
2507  FT_Long[256] stack;
2508  FT_Long* top;
2509  T1_Decoder_ZoneRec[16+1] zones;
2510  T1_Decoder_Zone zone;
2511  FT_Service_PsCMaps psnames;
2512  FT_UInt num_glyphs;
2513  FT_Byte** glyph_names;
2514  FT_Int lenIV;
2515  FT_UInt num_subrs;
2516  FT_Byte** subrs;
2517  FT_PtrDist* subrs_len;
2518  FT_Matrix font_matrix;
2519  FT_Vector font_offset;
2520  FT_Int flex_state;
2521  FT_Int num_flex_vectors;
2522  FT_Vector[7] flex_vectors;
2523  PS_Blend blend;
2524  FT_Render_Mode hint_mode;
2525  T1_Decoder_Callback parse_callback;
2526  T1_Decoder_FuncsRec funcs;
2527 }
2528 
2529 struct T1_CMap_ClassesRec
2530 {
2531  FT_CMap_Class standard;
2532  FT_CMap_Class expert;
2533  FT_CMap_Class custom;
2534  FT_CMap_Class unicode;
2535 }
2536 
2537 struct PSAux_ServiceRec
2538 {
2539  PS_Table_FuncsRec* ps_table_funcs;
2540  PS_Parser_FuncsRec* ps_parser_funcs;
2541  T1_Builder_FuncsRec* t1_builder_funcs;
2542  T1_Decoder_FuncsRec* t1_decoder_funcs;
2543  void function( FT_Byte* buffer, FT_Offset length, FT_UShort seed ) t1_decrypt;
2544  T1_CMap_Classes t1_cmap_classes;
2545 }
2546 +/
2547 
2548 extern(C)
2549 {
2550     // ftsystem.h
2551     alias void* function( FT_Memory memory, c_long size )
2552         FT_Alloc_Func;
2553     alias void  function( FT_Memory memory, void* block )
2554         FT_Free_Func;
2555     alias void* function( FT_Memory memory, c_long cur_size, c_long new_size, void* block )
2556         FT_Realloc_Func;
2557 
2558     alias c_ulong function( FT_Stream stream, c_ulong offset, ubyte* buffer, c_ulong count )
2559         FT_Stream_IoFunc;
2560     alias void           function( FT_Stream stream )
2561         FT_Stream_CloseFunc;
2562 
2563     // ftimage.h
2564     alias int function( in FT_Vector* to, void* user )
2565         FT_Outline_MoveToFunc;
2566     alias int function( in FT_Vector* to, void* user )
2567         FT_Outline_LineToFunc;
2568     alias int function( in FT_Vector* control, in FT_Vector* to, void* user )
2569         FT_Outline_ConicToFunc;
2570     alias int function( in FT_Vector* control1, in FT_Vector* control2, in FT_Vector* to, void* user )
2571         FT_Outline_CubicToFunc;
2572 
2573     alias void function( int y, int count, FT_Span* spans, void* user )
2574         FT_SpanFunc;
2575     alias int  function( int y, int x, void* user )
2576         FT_Raster_BitTest_Func;
2577     alias void function( int y, int x, void* user )
2578         FT_Raster_BitSet_Func;
2579 
2580     alias int function( void* memory, FT_Raster* raster )
2581         FT_Raster_NewFunc;
2582     alias void function( FT_Raster raster )
2583         FT_Raster_DoneFunc;
2584     alias void function( FT_Raster raster, ubyte* pool_base, uint pool_size )
2585         FT_Raster_ResetFunc;
2586     alias int function( FT_Raster raster,uint mode, void* args )
2587         FT_Raster_SetModeFunc;
2588     alias int function( FT_Raster raster, FT_Raster_Params* params )
2589         FT_Raster_RenderFunc;
2590 
2591     // fttypes.h
2592     alias void function(void* object)
2593         FT_Generic_Finalizer;
2594 
2595     // ftlist.h
2596     alias FT_Error function( FT_ListNode node, void* user ) FT_List_Iterator;
2597     alias void     function( FT_Memory memory, void* data, void* user ) FT_List_Destructor;
2598 
2599     // ftmodapi.h
2600     alias FT_Error     function( FT_Module mod ) FT_Module_Constructor;
2601     alias void         function( FT_Module mod ) FT_Module_Destructor;
2602     alias FT_Module_Interface function( FT_Module mod, CCPTR name ) FT_Module_Requester;
2603 
2604     alias void function( void* arg ) FT_DebugHook_Func;
2605 
2606     // ftrender.h
2607     alias FT_Error function( FT_Glyph glyph, FT_GlyphSlot slot ) FT_Glyph_InitFunc;
2608     alias void function( FT_Glyph glyph ) FT_Glyph_DoneFunc;
2609     alias void function( FT_Glyph glyph, in FT_Matrix* matrix, in FT_Vector* delta ) FT_Glyph_TransformFunc;
2610     alias void function( FT_Glyph glyph, FT_BBox* abbox ) FT_Glyph_GetBBoxFunc;
2611     alias FT_Error function( FT_Glyph source, FT_Glyph target ) FT_Glyph_CopyFunc;
2612     alias FT_Error function( FT_Glyph glyph, FT_GlyphSlot slot ) FT_Glyph_PrepareFunc;
2613 
2614     alias FT_Error function( FT_Renderer renderer, FT_GlyphSlot slot, FT_UInt mode, in FT_Vector* origin ) FT_Renderer_RenderFunc;
2615     alias FT_Error function( FT_Renderer renderer, FT_GlyphSlot slot, in FT_Matrix* matrix, in FT_Vector* delta ) FT_Renderer_TransformFunc;
2616     alias void function( FT_Renderer renderer, FT_GlyphSlot slot, FT_BBox* cbox ) FT_Renderer_GetCBoxFunc;
2617     alias FT_Error function( FT_Renderer renderer, FT_ULong mode_tag, FT_Pointer mode_ptr ) FT_Renderer_SetModeFunc;
2618 
2619     // ftcache.h
2620     alias FT_Error function( FTC_FaceID face_id, FT_Library library, FT_Pointer request_data, FT_Face* aface ) FTC_Face_Requester;
2621 
2622     // ftincrem.h
2623     alias FT_Error function( FT_Incremental incremental, FT_UInt glyph_index, FT_Data* adata ) FT_Incremental_GetGlyphDataFunc;
2624     alias void      function( FT_Incremental incremental, FT_Data* data ) FT_Incremental_FreeGlyphDataFunc;
2625     alias FT_Error function( FT_Incremental incremental, FT_UInt glyph_index, FT_Bool vertical, FT_Incremental_MetricsRec *ametrics ) FT_Incremental_GetGlyphMetricsFunc;
2626 
2627     /+ other
2628     alias FT_Bool function( FTC_MruNode node, FT_Pointer key ) FTC_MruNode_CompareFunc;
2629     alias FT_Error function( FTC_MruNode node, FT_Pointer key, FT_Pointer data ) FTC_MruNode_InitFunc;
2630     alias FT_Error function( FTC_MruNode node, FT_Pointer key, FT_Pointer data ) FTC_MruNode_ResetFunc;
2631     alias void function( FTC_MruNode node, FT_Pointer data ) FTC_MruNode_DoneFunc;
2632 
2633     alias FT_Error function( FTC_Node *pnode, FT_Pointer query, FTC_Cache cache ) FTC_Node_NewFunc;
2634     alias FT_ULong function( FTC_Node node, FTC_Cache cache ) FTC_Node_WeightFunc;
2635     alias FT_Bool  function( FTC_Node node, FT_Pointer key, FTC_Cache cache ) FTC_Node_CompareFunc;
2636     alias void      function( FTC_Node node, FTC_Cache cache ) FTC_Node_FreeFunc;
2637     alias FT_Error function( FTC_Cache cache ) FTC_Cache_InitFunc;
2638     alias void      function( FTC_Cache cache ) FTC_Cache_DoneFunc;
2639 
2640     alias FT_Error function( FTC_Family family, FT_UInt gindex, FTC_Cache cache, FT_Glyph *aglyph ) FTC_IFamily_LoadGlyphFunc;
2641 
2642     alias FT_UInt     function( FTC_Family family, FTC_Manager manager ) FTC_SFamily_GetCountFunc;
2643     alias FT_Error function( FTC_Family family, FT_UInt gindex, FTC_Manager manager, FT_Face *aface ) FTC_SFamily_LoadGlyphFunc;
2644 
2645     alias FT_Error function( FT_Stream stream, FT_Face face, FT_Int typeface_index, FT_Int num_params, FT_Parameter* parameters ) FT_Face_InitFunc;
2646     alias void     function( FT_Face face ) FT_Face_DoneFunc;
2647     alias FT_Error function( FT_Size size ) FT_Size_InitFunc;
2648     alias void      function( FT_Size size ) FT_Size_DoneFunc;
2649     alias FT_Error function( FT_GlyphSlot slot )FT_Slot_InitFunc;
2650     alias void     function( FT_GlyphSlot slot ) FT_Slot_DoneFunc;
2651     alias FT_Error function( FT_Size size, FT_F26Dot6 char_width, FT_F26Dot6 char_height, FT_UInt horz_resolution, FT_UInt vert_resolution ) FT_Size_ResetPointsFunc;
2652     alias FT_Error function( FT_Size size, FT_UInt pixel_width, FT_UInt pixel_height ) FT_Size_ResetPixelsFunc;
2653     alias FT_Error function( FT_GlyphSlot slot, FT_Size size, FT_UInt glyph_index, FT_Int32 load_flags ) FT_Slot_LoadFunc;
2654     alias FT_UInt  function( FT_CharMap charmap, FT_Long charcode ) FT_CharMap_CharIndexFunc;
2655     alias FT_Long  function( FT_CharMap charmap, FT_Long charcode ) FT_CharMap_CharNextFunc;
2656     alias FT_Error function( FT_Face face, FT_UInt left_glyph, FT_UInt right_glyph, FT_Vector* kerning ) FT_Face_GetKerningFunc;
2657     alias FT_Error function( FT_Face face, FT_Stream stream ) FT_Face_AttachFunc;
2658     alias FT_Error function( FT_Face face, FT_UInt first, FT_UInt count, FT_Bool vertical, FT_UShort* advances ) FT_Face_GetAdvancesFunc;
2659 
2660     alias void         function( FT_AutoHinter hinter, FT_Face face, void** global_hints, int* global_len ) FT_AutoHinter_GlobalGetFunc;
2661     alias void         function( FT_AutoHinter hinter, void* global ) FT_AutoHinter_GlobalDoneFunc;
2662     alias void        function( FT_AutoHinter hinter, FT_Face face ) FT_AutoHinter_GlobalResetFunc;
2663     alias FT_Error     function( FT_AutoHinter hinter, FT_GlyphSlot slot, FT_Size size, FT_UInt glyph_index, FT_Int32 load_flags ) FT_AutoHinter_GlyphLoadFunc;
2664 
2665     alias FT_Error function( FT_CMap cmap, FT_Pointer init_data ) FT_CMap_InitFunc;
2666     alias void      function( FT_CMap cmap ) FT_CMap_DoneFunc;
2667     alias FT_UInt  function( FT_CMap cmap, FT_UInt32 char_code ) FT_CMap_CharIndexFunc;
2668     alias FT_UInt  function( FT_CMap cmap, FT_UInt32 *achar_code ) FT_CMap_CharNextFunc;
2669 
2670     alias CCPTR       function( FT_Face face ) FT_Face_GetPostscriptNameFunc;
2671     alias FT_Error      function( FT_Face face, FT_UInt glyph_index, FT_Pointer buffer, FT_UInt buffer_max ) FT_Face_GetGlyphNameFunc;
2672     alias FT_UInt        function( FT_Face face, FT_String* glyph_name ) FT_Face_GetGlyphNameIndexFunc;
2673 
2674     alias FT_Error function( void* exec_context ) TT_Interpreter;
2675 
2676     alias FT_Error function( TT_Face face, FT_ULong tag, FT_Stream stream, FT_ULong* length ) TT_Loader_GotoTableFunc;
2677     alias FT_Error function( TT_Loader loader, FT_UInt glyph_index, FT_ULong offset, FT_UInt byte_count ) TT_Loader_StartGlyphFunc;
2678     alias FT_Error function( TT_Loader loader ) TT_Loader_ReadGlyphFunc;
2679     alias void      function( TT_Loader loader ) TT_Loader_EndGlyphFunc;
2680 
2681     alias FT_Error function( FT_Stream stream, TT_Face face, FT_Int face_index, FT_Int num_params, FT_Parameter* params ) TT_Init_Face_Func;
2682     alias FT_Error function( FT_Stream stream, TT_Face face, FT_Int face_index, FT_Int num_params, FT_Parameter* params ) TT_Load_Face_Func;
2683     alias void     function( TT_Face face ) TT_Done_Face_Func;
2684     alias FT_Error function( TT_Face face, FT_Stream stream, FT_Long face_index, SFNT_Header sfnt ) TT_Load_SFNT_HeaderRec_Func;
2685     alias FT_Error function( TT_Face face, FT_Stream stream, SFNT_Header sfnt ) TT_Load_Directory_Func;
2686     alias FT_Error function( TT_Face face, FT_ULong tag, FT_Long offset, FT_Byte *buffer, FT_ULong* length ) TT_Load_Any_Func;
2687     alias FT_Error function( TT_Face face, FT_UInt glyph_index, FT_ULong strike_index, TT_SBit_Range *arange, TT_SBit_Strike *astrike, FT_ULong *aglyph_offset ) TT_Find_SBit_Image_Func;
2688     alias FT_Error function( FT_Stream stream, TT_SBit_Range range, TT_SBit_Metrics metrics ) TT_Load_SBit_Metrics_Func;
2689     alias FT_Error function( TT_Face face, FT_ULong strike_index, FT_UInt glyph_index, FT_UInt load_flags, FT_Stream stream, FT_Bitmap *amap, TT_SBit_MetricsRec *ametrics ) TT_Load_SBit_Image_Func;
2690     alias FT_Error function( TT_Face face, FT_UInt x_ppem, FT_UInt y_ppem, FT_ULong *astrike_index ) TT_Set_SBit_Strike_Func;
2691     alias FT_Error function( TT_Face face, FT_UInt idx, FT_String** PSname ) TT_Get_PS_Name_Func;
2692     alias FT_Error function( TT_Face face, FT_Stream stream, FT_Bool vertical ) TT_Load_Metrics_Func;
2693     alias FT_Error function( TT_Face face, FT_Stream stream ) TT_Load_Table_Func;
2694     alias void      function( TT_Face face ) TT_Free_Table_Func;
2695     alias FT_Int     function( TT_Face face, FT_UInt left_glyph, FT_UInt right_glyph ) TT_Face_GetKerningFunc;
2696 
2697     alias FT_Error function( FT_Memory memory, T1_Private* private_dict, PSH_Globals* aglobals ) PSH_Globals_NewFunc;
2698     alias FT_Error function( PSH_Globals globals, FT_Fixed x_scale, FT_Fixed y_scale, FT_Fixed x_delta, FT_Fixed y_delta ) PSH_Globals_SetScaleFunc;
2699     alias void     function( PSH_Globals globals ) PSH_Globals_DestroyFunc;
2700 
2701     alias void         function( T1_Hints hints ) T1_Hints_OpenFunc;
2702     alias void         function( T1_Hints hints, FT_UInt dimension, FT_Long* coords ) T1_Hints_SetStemFunc;
2703     alias void         function( T1_Hints hints, FT_UInt dimension, FT_Long* coords ) T1_Hints_SetStem3Func;
2704     alias void         function( T1_Hints hints, FT_UInt end_point ) T1_Hints_ResetFunc;
2705     alias FT_Error    function( T1_Hints hints, FT_UInt end_point ) T1_Hints_CloseFunc;
2706     alias FT_Error     function( T1_Hints hints, FT_Outline* outline, PSH_Globals globals, FT_Render_Mode hint_mode ) T1_Hints_ApplyFunc;
2707 
2708     alias void        function( T2_Hints hints ) T2_Hints_OpenFunc;
2709     alias void         function( T2_Hints hints, FT_UInt dimension, FT_UInt count, FT_Fixed* coordinates ) T2_Hints_StemsFunc;
2710     alias void        function( T2_Hints hints, FT_UInt end_point, FT_UInt bit_count, in FT_Byte* bytes ) T2_Hints_MaskFunc;
2711     alias void        function( T2_Hints hints, FT_UInt bit_count, in FT_Byte* bytes ) T2_Hints_CounterFunc;
2712     alias FT_Error     function( T2_Hints hints, FT_UInt end_point ) T2_Hints_CloseFunc;
2713     alias FT_Error    function( T2_Hints hints, FT_Outline* outline, PSH_Globals globals, FT_Render_Mode hint_mode ) T2_Hints_ApplyFunc;
2714 
2715     alias FT_UInt32     function( char* glyph_name ) PS_Unicode_ValueFunc;
2716     alias FT_UInt        function( FT_UInt num_glyphs, char** glyph_names, FT_ULong unicode ) PS_Unicode_Index_Func;
2717     alias char*        function( FT_UInt name_index ) PS_Macintosh_Name_Func;
2718     alias char*         function( FT_UInt string_index ) PS_Adobe_Std_Strings_Func;
2719 
2720     alias FT_Error function( FT_Memory memory, FT_UInt num_glyphs, char** glyph_names, PS_Unicodes* unicodes ) PS_Unicodes_InitFunc;
2721     alias FT_UInt     function( PS_Unicodes* unicodes, FT_UInt unicode ) PS_Unicodes_CharIndexFunc;
2722     alias FT_ULong function( PS_Unicodes* unicodes, FT_ULong unicode ) PS_Unicodes_CharNextFunc;
2723 
2724     alias void  function( FT_Face face, FT_Pointer parser ) T1_Field_ParseFunc;
2725 
2726     alias FT_Error function( T1_Builder builder, FT_Int count ) T1_Builder_Check_Points_Func;
2727     alias void      function( T1_Builder builder, FT_Pos x, FT_Pos y, FT_Byte flag ) T1_Builder_Add_Point_Func;
2728     alias FT_Error function( T1_Builder builder, FT_Pos x, FT_Pos y ) T1_Builder_Add_Point1_Func;
2729     alias FT_Error function( T1_Builder builder ) T1_Builder_Add_Contour_Func;
2730     alias FT_Error function( T1_Builder builder, FT_Pos x, FT_Pos y ) T1_Builder_Start_Point_Func;
2731     alias void     function( T1_Builder builder ) T1_Builder_Close_Contour_Func;
2732 
2733     alias FT_Error function( T1_Decoder decoder, FT_UInt glyph_index ) T1_Decoder_Callback;
2734     +/
2735 }
2736 
2737 // freetype.h
2738 int FT_LOAD_TARGET_( int x )
2739 {
2740     return ( ( x & 15 ) << 16 );
2741 }
2742 
2743 int FT_LOAD_TARGET_MODE( int x )
2744 {
2745     return ( ( x >> 16 ) & 15 );
2746 }
2747 
2748 int FT_HAS_HORIZONTAL(FT_FaceRec* face)
2749 {
2750     return face.face_flags & FT_FACE_FLAG_HORIZONTAL;
2751 }
2752 
2753 int FT_HAS_VERTICAL(FT_FaceRec* face)
2754 {
2755     return face.face_flags & FT_FACE_FLAG_VERTICAL;
2756 }
2757 
2758 int FT_HAS_KERNING(FT_FaceRec* face)
2759 {
2760     return face.face_flags & FT_FACE_FLAG_KERNING;
2761 }
2762 
2763 int FT_IS_SCALABLE(FT_FaceRec* face)
2764 {
2765     return face.face_flags & FT_FACE_FLAG_SCALABLE;
2766 }
2767 
2768 int FT_IS_SFNT(FT_FaceRec* face)
2769 {
2770     return face.face_flags & FT_FACE_FLAG_SFNT;
2771 }
2772 
2773 int FT_IS_FIXED_WIDTH(FT_FaceRec* face)
2774 {
2775     return face.face_flags & FT_FACE_FLAG_FIXED_WIDTH;
2776 }
2777 
2778 int FT_HAS_FIXED_SIZES(FT_FaceRec* face)
2779 {
2780     return face.face_flags & FT_FACE_FLAG_FIXED_SIZES;
2781 }
2782 
2783 int FT_HAS_FAST_GLYPHS(FT_FaceRec* face)
2784 {
2785     return false;
2786 }
2787 
2788 int FT_HAS_GLYPH_NAMES(FT_FaceRec* face)
2789 {
2790     return face.face_flags & FT_FACE_FLAG_GLYPH_NAMES;
2791 }
2792 
2793 int FT_HAS_MULTIPLE_MASTERS(FT_FaceRec* face)
2794 {
2795     return face.face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS;
2796 }
2797 
2798 // Other macros. Second version is D-specific, but works fine.
2799 template FT_MAKE_TAG(char x1, char x2, char x3, char x4) {
2800     const uint FT_MAKE_TAG = ((cast(uint)x1) << 24) + ((cast(uint)x2) << 16) + ((cast(uint)x3) << 8) + x4;
2801 }
2802 
2803 template FT_MAKE_TAG(char[4] x) {
2804     const uint FT_MAKE_TAG = ((cast(uint)x[0]) << 24) + ((cast(uint)x[1]) << 16) + ((cast(uint)x[2]) << 8) + x[3];
2805 }
2806 
2807 /***********************************************************************
2808  * Extra macros carried over from Freetype.  Something needs to be done?
2809  ***********************************************************************/
2810 
2811 /+ fterrdef.h
2812 // (list not updated to version 2.3.5)
2813  FT_NOERRORDEF_( Ok, 0x00, "no error" )
2814  FT_ERRORDEF_( Cannot_Open_Resource, 0x01, "cannot open resource" )
2815  FT_ERRORDEF_( Unknown_File_Format, 0x02, "unknown file format" )
2816  FT_ERRORDEF_( Invalid_File_Format, 0x03, "broken file" )
2817  FT_ERRORDEF_( Invalid_Version, 0x04, "invalid FreeType version" )
2818  FT_ERRORDEF_( Lower_Module_Version, 0x05, "module version is too low" )
2819  FT_ERRORDEF_( Invalid_Argument, 0x06, "invalid argument" )
2820  FT_ERRORDEF_( Unimplemented_Feature, 0x07, "unimplemented feature" )
2821  FT_ERRORDEF_( Invalid_Table, 0x08, "broken table" )
2822  FT_ERRORDEF_( Invalid_Offset, 0x09, "broken offset within table" )
2823  FT_ERRORDEF_( Invalid_Glyph_Index, 0x10, "invalid glyph index" )
2824  FT_ERRORDEF_( Invalid_Character_Code, 0x11, "invalid character code" )
2825  FT_ERRORDEF_( Invalid_Glyph_Format, 0x12, "unsupported glyph image format" )
2826  FT_ERRORDEF_( Cannot_Render_Glyph, 0x13, "cannot render this glyph format" )
2827  FT_ERRORDEF_( Invalid_Outline, 0x14, "invalid outline" )
2828  FT_ERRORDEF_( Invalid_Composite, 0x15, "invalid composite glyph" )
2829  FT_ERRORDEF_( Too_Many_Hints, 0x16, "too many hints" )
2830  FT_ERRORDEF_( Invalid_Pixel_Size, 0x17, "invalid pixel size" )
2831  FT_ERRORDEF_( Invalid_Handle, 0x20, "invalid object handle" )
2832  FT_ERRORDEF_( Invalid_Library_Handle, 0x21, "invalid library handle" )
2833  FT_ERRORDEF_( Invalid_Driver_Handle, 0x22, "invalid module handle" )
2834  FT_ERRORDEF_( Invalid_Face_Handle, 0x23, "invalid face handle" )
2835  FT_ERRORDEF_( Invalid_Size_Handle, 0x24, "invalid size handle" )
2836  FT_ERRORDEF_( Invalid_Slot_Handle, 0x25, "invalid glyph slot handle" )
2837  FT_ERRORDEF_( Invalid_CharMap_Handle, 0x26, "invalid charmap handle" )
2838  FT_ERRORDEF_( Invalid_Cache_Handle, 0x27, "invalid cache manager handle" )
2839  FT_ERRORDEF_( Invalid_Stream_Handle, 0x28, "invalid stream handle" )
2840  FT_ERRORDEF_( Too_Many_Drivers, 0x30, "too many modules" )
2841  FT_ERRORDEF_( Too_Many_Extensions, 0x31, "too many extensions" )
2842  FT_ERRORDEF_( Out_Of_Memory, 0x40, "out of memory" )
2843  FT_ERRORDEF_( Unlisted_Object, 0x41, "unlisted object" )
2844  FT_ERRORDEF_( Cannot_Open_Stream, 0x51, "cannot open stream" )
2845  FT_ERRORDEF_( Invalid_Stream_Seek, 0x52, "invalid stream seek" )
2846  FT_ERRORDEF_( Invalid_Stream_Skip, 0x53, "invalid stream skip" )
2847  FT_ERRORDEF_( Invalid_Stream_Read, 0x54, "invalid stream read" )
2848  FT_ERRORDEF_( Invalid_Stream_Operation, 0x55, "invalid stream operation" )
2849  FT_ERRORDEF_( Invalid_Frame_Operation, 0x56, "invalid frame operation" )
2850  FT_ERRORDEF_( Nested_Frame_Access, 0x57, "nested frame access" )
2851  FT_ERRORDEF_( Invalid_Frame_Read, 0x58, "invalid frame read" )
2852  FT_ERRORDEF_( Raster_Uninitialized, 0x60, "raster uninitialized" )
2853  FT_ERRORDEF_( Raster_Corrupted, 0x61, "raster corrupted" )
2854  FT_ERRORDEF_( Raster_Overflow, 0x62, "raster overflow" )
2855  FT_ERRORDEF_( Raster_Negative_Height, 0x63, "negative height while rastering" )
2856  FT_ERRORDEF_( Too_Many_Caches, 0x70, "too many registered caches" )
2857  FT_ERRORDEF_( Invalid_Opcode, 0x80, "invalid opcode" )
2858  FT_ERRORDEF_( Too_Few_Arguments, 0x81, "too few arguments" )
2859  FT_ERRORDEF_( Stack_Overflow, 0x82, "stack overflow" )
2860  FT_ERRORDEF_( Code_Overflow, 0x83, "code overflow" )
2861  FT_ERRORDEF_( Bad_Argument, 0x84, "bad argument" )
2862  FT_ERRORDEF_( Divide_By_Zero, 0x85, "division by zero" )
2863  FT_ERRORDEF_( Invalid_Reference, 0x86, "invalid reference" )
2864  FT_ERRORDEF_( Debug_OpCode, 0x87, "found debug opcode" )
2865  FT_ERRORDEF_( ENDF_In_Exec_Stream, 0x88, "found ENDF opcode in execution stream" )
2866  FT_ERRORDEF_( Nested_DEFS, 0x89, "nested DEFS" )
2867  FT_ERRORDEF_( Invalid_CodeRange, 0x8A, "invalid code range" )
2868  FT_ERRORDEF_( Execution_Too_Long, 0x8B, "execution context too long" )
2869  FT_ERRORDEF_( Too_Many_Function_Defs, 0x8C, "too many function definitions" )
2870  FT_ERRORDEF_( Too_Many_Instruction_Defs, 0x8D, "too many instruction definitions" )
2871  FT_ERRORDEF_( Table_Missing, 0x8E, "SFNT font table missing" )
2872  FT_ERRORDEF_( Horiz_Header_Missing, 0x8F, "horizontal header (hhea) table missing" )
2873  FT_ERRORDEF_( Locations_Missing, 0x90, "locations (loca) table missing" )
2874  FT_ERRORDEF_( Name_Table_Missing, 0x91, "name table missing" )
2875  FT_ERRORDEF_( CMap_Table_Missing, 0x92, "character map (cmap) table missing" )
2876  FT_ERRORDEF_( Hmtx_Table_Missing, 0x93, "horizontal metrics (hmtx) table missing" )
2877  FT_ERRORDEF_( Post_Table_Missing, 0x94, "PostScript (post) table missing" )
2878  FT_ERRORDEF_( Invalid_Horiz_Metrics, 0x95, "invalid horizontal metrics" )
2879  FT_ERRORDEF_( Invalid_CharMap_Format, 0x96, "invalid character map (cmap) format" )
2880  FT_ERRORDEF_( Invalid_PPem, 0x97, "invalid ppem value" )
2881  FT_ERRORDEF_( Invalid_Vert_Metrics, 0x98, "invalid vertical metrics" )
2882  FT_ERRORDEF_( Could_Not_Find_Context, 0x99, "could not find context" )
2883  FT_ERRORDEF_( Invalid_Post_Table_Format, 0x9A, "invalid PostScript (post) table format" )
2884  FT_ERRORDEF_( Invalid_Post_Table, 0x9B, "invalid PostScript (post) table" )
2885  FT_ERRORDEF_( Syntax_Error, 0xA0, "opcode syntax error" )
2886  FT_ERRORDEF_( Stack_Underflow, 0xA1, "argument stack underflow" )
2887  FT_ERRORDEF_( Ignore, 0xA2, "ignore" )
2888  FT_ERRORDEF_( Missing_Startfont_Field, 0xB0, "`STARTFONT' field missing" )
2889  FT_ERRORDEF_( Missing_Font_Field, 0xB1, "`FONT' field missing" )
2890  FT_ERRORDEF_( Missing_Size_Field, 0xB2, "`SIZE' field missing" )
2891  FT_ERRORDEF_( Missing_Chars_Field, 0xB3, "`CHARS' field missing" )
2892  FT_ERRORDEF_( Missing_Startchar_Field, 0xB4, "`STARTCHAR' field missing" )
2893  FT_ERRORDEF_( Missing_Encoding_Field, 0xB5, "`ENCODING' field missing" )
2894  FT_ERRORDEF_( Missing_Bbx_Field, 0xB6, "`BBX' field missing" )
2895 +/