added "iv.dynstring"
[iv.d.git] / freetype.d
blobe5cc02ce9bebe06e77c10afe44d941fa61e817e3
1 /*
2 * Boost Software License - Version 1.0 - August 17th, 2003
4 * Permission is hereby granted, free of charge, to any person or organization
5 * obtaining a copy of the software and accompanying documentation covered by
6 * this license (the "Software") to use, reproduce, display, distribute,
7 * execute, and transmit the Software, and to prepare derivative works of the
8 * Software, and to permit third-parties to whom the Software is furnished to
9 * do so, all subject to the following:
11 * The copyright notices in the Software and this entire statement, including
12 * the above license grant, this restriction and the following disclaimer,
13 * must be included in all copies of the Software, in whole or in part, and
14 * all derivative works of the Software, unless such copies or derivative
15 * works are solely in the form of machine-executable object code generated by
16 * a source language processor.
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
21 * SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
22 * FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
23 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24 * DEALINGS IN THE SOFTWARE.
26 module iv.freetype /*is aliced*/;
27 pragma(lib, "freetype");
28 import iv.alice;
29 import core.stdc.config;
31 extern(C) nothrow:
33 // config/ftconfig.h
34 alias FT_Int16 = short;
35 alias FT_UInt16 = ushort;
36 alias FT_Int32 = int;
37 alias FT_UInt32 = uint;
38 alias FT_Fast = int;
39 alias FT_UFast = uint;
40 alias FT_Int64 = long;
41 alias FT_Uint64 = ulong;
43 // fttypes.h
44 alias FT_Bool = ubyte;
45 alias FT_FWord = short;
46 alias FT_UFWord = ushort;
47 alias FT_Char = char;
48 alias FT_Byte = ubyte;
49 alias FT_Bytes = FT_Byte*;
50 alias FT_Tag = FT_UInt32;
51 alias FT_String = char;
52 alias FT_Short = short;
53 alias FT_UShort = ushort;
54 alias FT_Int = int;
55 alias FT_UInt = uint;
56 alias FT_Long = c_long;
57 alias FT_ULong = c_ulong;
58 alias FT_F2Dot14 = short;
59 alias FT_F26Dot6 = c_long;
60 alias FT_Fixed = c_long;
61 alias FT_Error = int;
62 alias FT_Pointer = void*;
63 alias FT_Offset = usize;
64 alias FT_PtrDist = ptrdiff_t;
66 struct FT_UnitVector {
67 FT_F2Dot14 x;
68 FT_F2Dot14 y;
71 struct FT_Matrix {
72 FT_Fixed xx, xy;
73 FT_Fixed yx, yy;
76 struct FT_Data {
77 const(FT_Byte)* pointer;
78 FT_Int length;
81 extern(C) nothrow {
82 alias FT_Generic_Finalizer = void function (void* object);
85 struct FT_Generic {
86 void* data;
87 FT_Generic_Finalizer finalizer;
90 FT_Tag FT_MAKE_TAG (char x1, char x2, char x3, char x4) pure nothrow @safe @nogc {
91 pragma(inline, true);
92 return cast(FT_UInt32)((x1<<24)|(x2<<16)|(x3<<8)|x4);
96 alias FT_ListNode = FT_ListNodeRec*;
97 alias FT_List = FT_ListRec*;
99 struct FT_ListNodeRec {
100 FT_ListNode prev;
101 FT_ListNode next;
102 void* data;
105 struct FT_ListRec {
106 FT_ListNode head;
107 FT_ListNode tail;
110 // freetype.h
111 struct FT_Glyph_Metrics {
112 FT_Pos width;
113 FT_Pos height;
114 FT_Pos horiBearingX;
115 FT_Pos horiBearingY;
116 FT_Pos horiAdvance;
117 FT_Pos vertBearingX;
118 FT_Pos vertBearingY;
119 FT_Pos vertAdvance;
122 struct FT_Bitmap_Size {
123 FT_Short height;
124 FT_Short width;
125 FT_Pos size;
126 FT_Pos x_ppem;
127 FT_Pos y_ppem;
130 struct FT_LibraryRec;
131 struct FT_ModuleRec;
132 struct FT_DriverRec;
133 struct FT_RendererRec;
135 alias FT_Library = FT_LibraryRec*;
136 alias FT_Module = FT_ModuleRec*;
137 alias FT_Driver = FT_DriverRec*;
138 alias FT_Renderer = FT_RendererRec*;
139 alias FT_Face = FT_FaceRec*;
140 alias FT_Size = FT_SizeRec*;
141 alias FT_GlyphSlot = FT_GlyphSlotRec*;
142 alias FT_CharMap = FT_CharMapRec*;
144 alias FT_ENC_TAG = FT_MAKE_TAG;
146 alias FT_Encoding = FT_Tag;
147 enum : FT_Tag {
148 FT_ENCODING_NONE = 0,
149 FT_ENCODING_MS_SYMBOL = FT_MAKE_TAG('s','y','m','b'),
150 FT_ENCODING_UNICODE = FT_MAKE_TAG('u','n','i','c'),
151 FT_ENCODING_SJIS = FT_MAKE_TAG('s','j','i','s'),
152 FT_ENCODING_GB2312 = FT_MAKE_TAG('g','b',' ',' '),
153 FT_ENCODING_BIG5 = FT_MAKE_TAG('b','i','g','5' ),
154 FT_ENCODING_WANSUNG = FT_MAKE_TAG('w','a','n','s'),
155 FT_ENCODING_JOHAB = FT_MAKE_TAG('j','o','h','a'),
156 FT_ENCODING_MS_SJIS = FT_ENCODING_SJIS,
157 FT_ENCODING_MS_GB2312 = FT_ENCODING_GB2312,
158 FT_ENCODING_MS_BIG5 = FT_ENCODING_BIG5,
159 FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG,
160 FT_ENCODING_MS_JOHAB = FT_ENCODING_JOHAB,
161 FT_ENCODING_ADOBE_STANDARD = FT_MAKE_TAG('A','D','O','B'),
162 FT_ENCODING_ADOBE_EXPERT = FT_MAKE_TAG('A','D','B','E'),
163 FT_ENCODING_ADOBE_CUSTOM = FT_MAKE_TAG('A','D','B','C'),
164 FT_ENCODING_ADOBE_LATIN_1 = FT_MAKE_TAG('l','a','t','1'),
165 FT_ENCODING_OLD_LATIN_2 = FT_MAKE_TAG('l','a','t','2'),
166 FT_ENCODING_APPLE_ROMAN = FT_MAKE_TAG('a','r','m','n'),
169 struct FT_CharMapRec {
170 FT_Face face;
171 FT_Encoding encoding;
172 FT_UShort platform_id;
173 FT_UShort encoding_id;
176 struct FT_Face_InternalRec;
177 alias FT_Face_Internal = FT_Face_InternalRec*;
179 struct FT_FaceRec {
180 FT_Long num_faces;
181 FT_Long face_index;
182 FT_Long face_flags;
183 FT_Long style_flags;
184 FT_Long num_glyphs;
185 FT_String* family_name;
186 FT_String* style_name;
187 FT_Int num_fixed_sizes;
188 FT_Bitmap_Size* available_sizes;
189 FT_Int num_charmaps;
190 FT_CharMap* charmaps;
191 FT_Generic generic;
192 FT_BBox bbox;
193 FT_UShort units_per_EM;
194 FT_Short ascender;
195 FT_Short descender;
196 FT_Short height;
197 FT_Short max_advance_width;
198 FT_Short max_advance_height;
199 FT_Short underline_position;
200 FT_Short underline_thickness;
201 FT_GlyphSlot glyph;
202 FT_Size size;
203 FT_CharMap charmap;
204 FT_Driver driver;
205 FT_Memory memory;
206 FT_Stream stream;
207 FT_ListRec sizes_list;
208 FT_Generic autohint;
209 void* extensions;
210 FT_Face_Internal internal;
213 enum FT_FACE_FLAG_SCALABLE = 1U<<0;
214 enum FT_FACE_FLAG_FIXED_SIZES = 1U<<1;
215 enum FT_FACE_FLAG_FIXED_WIDTH = 1U<<2;
216 enum FT_FACE_FLAG_SFNT = 1U<<3;
217 enum FT_FACE_FLAG_HORIZONTAL = 1U<<4;
218 enum FT_FACE_FLAG_VERTICAL = 1U<<5;
219 enum FT_FACE_FLAG_KERNING = 1U<<6;
220 enum FT_FACE_FLAG_FAST_GLYPHS = 1U<<7;
221 enum FT_FACE_FLAG_MULTIPLE_MASTERS = 1U<<8;
222 enum FT_FACE_FLAG_GLYPH_NAMES = 1U<<9;
223 enum FT_FACE_FLAG_EXTERNAL_STREAM = 1U<<10;
224 enum FT_FACE_FLAG_HINTER = 1U<<11;
225 enum FT_FACE_FLAG_CID_KEYED = 1U<<12;
226 enum FT_FACE_FLAG_TRICKY = 1U<<13;
227 enum FT_FACE_FLAG_COLOR = 1U<<14;
229 pure nothrow @safe @nogc {
230 bool FT_HAS_HORIZONTAL (FT_FaceRec* face) { pragma(inline, true); return (face.face_flags&FT_FACE_FLAG_HORIZONTAL) != 0; }
231 bool FT_HAS_VERTICAL (FT_FaceRec* face) { pragma(inline, true); return (face.face_flags&FT_FACE_FLAG_VERTICAL) != 0; }
232 bool FT_HAS_KERNING (FT_FaceRec* face) { pragma(inline, true); return (face.face_flags&FT_FACE_FLAG_KERNING) != 0; }
233 bool FT_IS_SCALABLE (FT_FaceRec* face) { pragma(inline, true); return (face.face_flags&FT_FACE_FLAG_SCALABLE) != 0; }
234 bool FT_IS_SFNT (FT_FaceRec* face) { pragma(inline, true); return (face.face_flags&FT_FACE_FLAG_SFNT) != 0; }
235 bool FT_IS_FIXED_WIDTH (FT_FaceRec* face) { pragma(inline, true); return (face.face_flags&FT_FACE_FLAG_FIXED_WIDTH) != 0; }
236 bool FT_HAS_FIXED_SIZES (FT_FaceRec* face) { pragma(inline, true); return (face.face_flags&FT_FACE_FLAG_FIXED_SIZES) != 0; }
237 bool FT_HAS_FAST_GLYPHS (FT_FaceRec* face) { pragma(inline, true); return false; }
238 bool FT_HAS_GLYPH_NAMES (FT_FaceRec* face) { pragma(inline, true); return (face.face_flags&FT_FACE_FLAG_GLYPH_NAMES) != 0; }
239 bool FT_HAS_MULTIPLE_MASTERS (FT_FaceRec* face) { pragma(inline, true); return (face.face_flags&FT_FACE_FLAG_MULTIPLE_MASTERS) != 0; }
240 bool FT_IS_CID_KEYED (FT_FaceRec* face) { pragma(inline, true); return (face.face_flags&FT_FACE_FLAG_CID_KEYED) != 0; }
241 bool FT_IS_TRICKY (FT_FaceRec* face) { pragma(inline, true); return (face.face_flags&FT_FACE_FLAG_TRICKY) != 0; }
242 bool FT_HAS_COLOR (FT_FaceRec* face) { pragma(inline, true); return (face.face_flags&FT_FACE_FLAG_COLOR) != 0; }
245 enum FT_STYLE_FLAG_ITALIC = 1<<0;
246 enum FT_STYLE_FLAG_BOLD = 1<<1;
248 struct FT_Size_InternalRec;
249 alias FT_Size_Internal = FT_Size_InternalRec*;
251 struct FT_Size_Metrics {
252 FT_UShort x_ppem;
253 FT_UShort y_ppem;
255 FT_Fixed x_scale;
256 FT_Fixed y_scale;
258 FT_Pos ascender;
259 FT_Pos descender;
260 FT_Pos height;
261 FT_Pos max_advance;
264 struct FT_SizeRec {
265 FT_Face face;
266 FT_Generic generic;
267 FT_Size_Metrics metrics;
268 FT_Size_Internal internal;
271 struct FT_SubGlyphRec;
272 struct FT_Slot_InternalRec;
273 alias FT_SubGlyph = FT_SubGlyphRec*;
274 alias FT_Slot_Internal = FT_Slot_InternalRec*;
276 struct FT_GlyphSlotRec {
277 FT_Library library;
278 FT_Face face;
279 FT_GlyphSlot next;
280 FT_UInt reserved;
281 FT_Generic generic;
282 FT_Glyph_Metrics metrics;
283 FT_Fixed linearHoriAdvance;
284 FT_Fixed linearVertAdvance;
285 FT_Vector advance;
286 FT_Glyph_Format format;
287 FT_Bitmap bitmap;
288 FT_Int bitmap_left;
289 FT_Int bitmap_top;
290 FT_Outline outline;
291 FT_UInt num_subglyphs;
292 FT_SubGlyph subglyphs;
293 void* control_data;
294 c_long control_len;
295 FT_Pos lsb_delta;
296 FT_Pos rsb_delta;
297 void* other;
298 FT_Slot_Internal internal;
301 enum FT_OPEN_MEMORY = 0x1U;
302 enum FT_OPEN_STREAM = 0x2U;
303 enum FT_OPEN_DRIVER = 0x4U;
304 enum FT_OPEN_PATHNAME = 0x8U;
305 enum FT_OPEN_PARAMS = 0x10U;
307 struct FT_Parameter {
308 FT_ULong tag;
309 FT_Pointer data;
312 struct FT_Open_Args {
313 FT_UInt flags;
314 const(FT_Byte)* memory_base;
315 FT_Long memory_size;
316 FT_String* pathname;
317 FT_Stream stream;
318 FT_Module driver;
319 FT_Int num_params;
320 FT_Parameter* params;
323 alias FT_Size_Request_Type = int;
324 enum {
325 FT_SIZE_REQUEST_TYPE_NOMINAL,
326 FT_SIZE_REQUEST_TYPE_REAL_DIM,
327 FT_SIZE_REQUEST_TYPE_BBOX,
328 FT_SIZE_REQUEST_TYPE_CELL,
329 FT_SIZE_REQUEST_TYPE_SCALES,
330 FT_SIZE_REQUEST_TYPE_MAX
333 struct FT_Size_RequestRec {
334 FT_Size_Request_Type type;
335 FT_Long width;
336 FT_Long height;
337 FT_UInt horiResolution;
338 FT_UInt vertResolution;
341 alias FT_Size_Request = FT_Size_RequestRec*;
343 enum FT_LOAD_DEFAULT = 0x0U;
344 enum FT_LOAD_NO_SCALE = 1U<<0;
345 enum FT_LOAD_NO_HINTING = 1U<<1;
346 enum FT_LOAD_RENDER = 1U<<2;
347 enum FT_LOAD_NO_BITMAP = 1U<<3;
348 enum FT_LOAD_VERTICAL_LAYOUT = 1U<<4;
349 enum FT_LOAD_FORCE_AUTOHINT = 1U<<5;
350 enum FT_LOAD_CROP_BITMAP = 1U<<6;
351 enum FT_LOAD_PEDANTIC = 1U<<7;
352 enum FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH = 1U<<9;
353 enum FT_LOAD_NO_RECURSE = 1U<<10;
354 enum FT_LOAD_IGNORE_TRANSFORM = 1U<<11;
355 enum FT_LOAD_MONOCHROME = 1U<<12;
356 enum FT_LOAD_LINEAR_DESIGN = 1U<<13;
357 enum FT_LOAD_NO_AUTOHINT = 1U<<15;
358 enum FT_LOAD_COLOR = 1U<<20;
359 enum FT_LOAD_COMPUTE_METRICS = 1U<<21;
361 enum FT_LOAD_TARGET_NORMAL = (FT_RENDER_MODE_NORMAL&15)<<16;
362 enum FT_LOAD_TARGET_LIGHT = (FT_RENDER_MODE_LIGHT&15)<<16;
363 enum FT_LOAD_TARGET_MONO = (FT_RENDER_MODE_MONO&15)<<16;
364 enum FT_LOAD_TARGET_LCD = (FT_RENDER_MODE_LCD&15)<<16;
365 enum FT_LOAD_TARGET_LCD_V = (FT_RENDER_MODE_LCD_V&15)<<16;
367 FT_Render_Mode FT_LOAD_TARGET_MODE (uint x) pure nothrow @safe @nogc { pragma(inline, true); return cast(FT_Render_Mode)((x>>16)&15); }
369 alias FT_Render_Mode = uint;
370 enum {
371 FT_RENDER_MODE_NORMAL = 0,
372 FT_RENDER_MODE_LIGHT,
373 FT_RENDER_MODE_MONO,
374 FT_RENDER_MODE_LCD,
375 FT_RENDER_MODE_LCD_V,
376 FT_RENDER_MODE_MAX
379 alias FT_Kerning_Mode = int;
380 enum /*FT_Kerning_Mode*/ {
381 FT_KERNING_DEFAULT = 0,
382 FT_KERNING_UNFITTED,
383 FT_KERNING_UNSCALED
386 enum FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS = 1;
387 enum FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES = 2;
388 enum FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID = 4;
389 enum FT_SUBGLYPH_FLAG_SCALE = 8;
390 enum FT_SUBGLYPH_FLAG_XY_SCALE = 0x40;
391 enum FT_SUBGLYPH_FLAG_2X2 = 0x80;
392 enum FT_SUBGLYPH_FLAG_USE_MY_METRICS = 0x200;
394 enum FT_FSTYPE_INSTALLABLE_EMBEDDING = 0x0000;
395 enum FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING = 0x0002;
396 enum FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING = 0x0004;
397 enum FT_FSTYPE_EDITABLE_EMBEDDING = 0x0008;
398 enum FT_FSTYPE_NO_SUBSETTING = 0x0100;
399 enum FT_FSTYPE_BITMAP_EMBEDDING_ONLY = 0x0200;
401 enum {
402 FREETYPE_MAJOR = 2,
403 FREETYPE_MINOR = 6,
404 FREETYPE_PATCH = 3,
407 // ftadvanc.h
408 enum FT_ADVANCE_FLAG_FAST_ONLY = 0x20000000;
410 // ftautoh.h
411 enum FT_AUTOHINTER_SCRIPT_NONE = 0;
412 enum FT_AUTOHINTER_SCRIPT_LATIN = 1;
413 enum FT_AUTOHINTER_SCRIPT_CJK = 2;
414 enum FT_AUTOHINTER_SCRIPT_INDIC = 3;
416 struct FT_Prop_GlyphToScriptMap {
417 FT_Face face;
418 FT_UShort* map;
421 struct FT_Prop_IncreaseXHeight {
422 FT_Face face;
423 FT_UInt32 limit;
426 // ftbdf.h
427 version(linux) {
428 alias BDF_PropertyType = int;
429 enum {
430 BDF_PROPERTY_TYPE_NONE = 0,
431 BDF_PROPERTY_TYPE_ATOM = 1,
432 BDF_PROPERTY_TYPE_INTEGER = 2,
433 BDF_PROPERTY_TYPE_CARDINAL = 3
436 alias BDF_Property = BDF_PropertyRec*;
438 struct BDF_PropertyRec {
439 BDF_PropertyType type;
440 union u {
441 char* atom;
442 FT_Int32 integer;
443 FT_UInt32 cardinal;
448 // ftcache.h
449 alias FTC_FaceID = FT_Pointer;
450 extern(C) nothrow {
451 alias FTC_Face_Requester = FT_Error function (FTC_FaceID face_id, FT_Library library, FT_Pointer request_data, FT_Face* aface);
454 struct FTC_ManagerRec;
455 struct FTC_NodeRec;
457 alias FTC_Manager = FTC_ManagerRec*;
458 alias FTC_Node = FTC_NodeRec*;
460 struct FTC_ScalerRec {
461 FTC_FaceID face_id;
462 FT_UInt width;
463 FT_UInt height;
464 FT_Int pixel;
465 FT_UInt x_res;
466 FT_UInt y_res;
469 alias FTC_Scaler = FTC_ScalerRec*;
471 struct FTC_CMapCacheRec;
472 alias FTC_CMapCache = FTC_CMapCacheRec*;
474 struct FTC_ImageTypeRec {
475 FTC_FaceID face_id;
476 FT_UInt width;
477 FT_UInt height;
478 FT_Int32 flags;
482 alias FTC_ImageType = FTC_ImageTypeRec*;
484 struct FTC_ImageCacheRec;
485 alias FTC_ImageCache = FTC_ImageCacheRec*;
487 alias FTC_SBit = FTC_SBitRec*;
489 struct FTC_SBitRec {
490 FT_Byte width;
491 FT_Byte height;
492 FT_Char left;
493 FT_Char top;
494 FT_Byte format;
495 FT_Byte max_grays;
496 FT_Short pitch;
497 FT_Char xadvance;
498 FT_Char yadvance;
499 FT_Byte* buffer;
502 struct FTC_SBitCacheRec;
503 alias FTC_SBitCache = FTC_SBitCacheRec*;
505 // ftcffdrv.h
506 enum FT_CFF_HINTING_FREETYPE = 0;
507 enum FT_CFF_HINTING_ADOBE = 1;
509 // fterrdef.h
510 enum FT_Err_Ok = 0x00;
511 enum FT_Err_Cannot_Open_Resource = 0x01;
512 enum FT_Err_Unknown_File_Format = 0x02;
513 enum FT_Err_Invalid_File_Format = 0x03;
514 enum FT_Err_Invalid_Version = 0x04;
515 enum FT_Err_Lower_Module_Version = 0x05;
516 enum FT_Err_Invalid_Argument = 0x06;
517 enum FT_Err_Unimplemented_Feature = 0x07;
518 enum FT_Err_Invalid_Table = 0x08;
519 enum FT_Err_Invalid_Offset = 0x09;
520 enum FT_Err_Array_Too_Large = 0x0A;
521 enum FT_Err_Missing_Module = 0x0B;
522 enum FT_Err_Missing_Property = 0x0C;
524 enum FT_Err_Invalid_Glyph_Index = 0x10;
525 enum FT_Err_Invalid_Character_Code = 0x11;
526 enum FT_Err_Invalid_Glyph_Format = 0x12;
527 enum FT_Err_Cannot_Render_Glyph = 0x13;
528 enum FT_Err_Invalid_Outline = 0x14;
529 enum FT_Err_Invalid_Composite = 0x15;
530 enum FT_Err_Too_Many_Hints = 0x16;
531 enum FT_Err_Invalid_Pixel_Size = 0x17;
533 enum FT_Err_Invalid_Handle = 0x20;
534 enum FT_Err_Invalid_Library_Handle = 0x21;
535 enum FT_Err_Invalid_Driver_Handle = 0x22;
536 enum FT_Err_Invalid_Face_Handle = 0x23;
537 enum FT_Err_Invalid_Size_Handle = 0x24;
538 enum FT_Err_Invalid_Slot_Handle = 0x25;
539 enum FT_Err_Invalid_CharMap_Handle = 0x26;
540 enum FT_Err_Invalid_Cache_Handle = 0x27;
541 enum FT_Err_Invalid_Stream_Handle = 0x28;
543 enum FT_Err_Too_Many_Drivers = 0x30;
544 enum FT_Err_Too_Many_Extensions = 0x31;
546 enum FT_Err_Out_Of_Memory = 0x40;
547 enum FT_Err_Unlisted_Object = 0x41;
549 enum FT_Err_Cannot_Open_Stream = 0x51;
550 enum FT_Err_Invalid_Stream_Seek = 0x52;
551 enum FT_Err_Invalid_Stream_Skip = 0x53;
552 enum FT_Err_Invalid_Stream_Read = 0x54;
553 enum FT_Err_Invalid_Stream_Operation = 0x55;
554 enum FT_Err_Invalid_Frame_Operation = 0x56;
555 enum FT_Err_Nested_Frame_Access = 0x57;
556 enum FT_Err_Invalid_Frame_Read = 0x58;
558 enum FT_Err_Raster_Uninitialized = 0x60;
559 enum FT_Err_Raster_Corrupted = 0x61;
560 enum FT_Err_Raster_Overflow = 0x62;
561 enum FT_Err_Raster_Negative_Height = 0x63;
563 enum FT_Err_Too_Many_Caches = 0x70;
565 enum FT_Err_Invalid_Opcode = 0x80;
566 enum FT_Err_Too_Few_Arguments = 0x81;
567 enum FT_Err_Stack_Overflow = 0x82;
568 enum FT_Err_Code_Overflow = 0x83;
569 enum FT_Err_Bad_Argument = 0x84;
570 enum FT_Err_Divide_By_Zero = 0x85;
571 enum FT_Err_Invalid_Reference = 0x86;
572 enum FT_Err_Debug_OpCode = 0x87;
573 enum FT_Err_ENDF_In_Exec_Stream = 0x88;
574 enum FT_Err_Nested_DEFS = 0x89;
575 enum FT_Err_Invalid_CodeRange = 0x8A;
576 enum FT_Err_Execution_Too_Long = 0x8B;
577 enum FT_Err_Too_Many_Function_Defs = 0x8C;
578 enum FT_Err_Too_Many_Instruction_Defs = 0x8D;
579 enum FT_Err_Table_Missing = 0x8E;
580 enum FT_Err_Horiz_Header_Missing = 0x8F;
581 enum FT_Err_Locations_Missing = 0x90;
582 enum FT_Err_Name_Table_Missing = 0x91;
583 enum FT_Err_CMap_Table_Missing = 0x92;
584 enum FT_Err_Hmtx_Table_Missing = 0x93;
585 enum FT_Err_Post_Table_Missing = 0x94;
586 enum FT_Err_Invalid_Horiz_Metrics = 0x95;
587 enum FT_Err_Invalid_CharMap_Format = 0x96;
588 enum FT_Err_Invalid_PPem = 0x97;
589 enum FT_Err_Invalid_Vert_Metrics = 0x98;
590 enum FT_Err_Could_Not_Find_Context = 0x99;
591 enum FT_Err_Invalid_Post_Table_Format = 0x9A;
592 enum FT_Err_Invalid_Post_Table = 0x9B;
594 enum FT_Err_Syntax_Error = 0xA0;
595 enum FT_Err_Stack_Underflow = 0xA1;
596 enum FT_Err_Ignore = 0xA2;
597 enum FT_Err_No_Unicode_Glyph_Name = 0xA3;
598 enum FT_Err_Glyph_Too_Big = 0xA4;
600 enum FT_Err_Missing_Startfont_Field = 0xB0;
601 enum FT_Err_Missing_Font_Field = 0xB1;
602 enum FT_Err_Missing_Size_Field = 0xB2;
603 enum FT_Err_Missing_Fontboundingbox_Field = 0xB3;
604 enum FT_Err_Missing_Chars_Field = 0xB4;
605 enum FT_Err_Missing_Startchar_Field = 0xB5;
606 enum FT_Err_Missing_Encoding_Field = 0xB6;
607 enum FT_Err_Missing_Bbx_Field = 0xB7;
608 enum FT_Err_Bbx_Too_Big = 0xB8;
609 enum FT_Err_Corrupted_Font_Header = 0xB9;
610 enum FT_Err_Corrupted_Font_Glyphs = 0xBA;
612 //FT_Err_Max,
614 // ftgasp.h
615 enum FT_GASP_NO_TABLE = -1;
616 enum FT_GASP_DO_GRIDFIT = 0x01;
617 enum FT_GASP_DO_GRAY = 0x02;
618 enum FT_GASP_SYMMETRIC_SMOOTHING = 0x08;
619 enum FT_GASP_SYMMETRIC_GRIDFIT = 0x10;
621 // ftglyph.h
622 alias FT_Glyph = FT_GlyphRec*;
624 struct FT_GlyphRec {
625 FT_Library library;
626 FT_Glyph_Class* clazz;
627 FT_Glyph_Format format;
628 FT_Vector advance;
631 alias FT_BitmapGlyph = FT_BitmapGlyphRec*;
633 struct FT_BitmapGlyphRec {
634 FT_GlyphRec root;
635 FT_Int left;
636 FT_Int top;
637 FT_Bitmap bitmap;
640 alias FT_OutlineGlyph = FT_OutlineGlyphRec*;
642 struct FT_OutlineGlyphRec {
643 FT_GlyphRec root;
644 FT_Outline outline;
647 alias FT_Glyph_BBox_Mode = int;
648 enum FT_GLYPH_BBOX_UNSCALED = 0;
649 enum FT_GLYPH_BBOX_SUBPIXELS = 0;
650 enum FT_GLYPH_BBOX_GRIDFIT = 1;
651 enum FT_GLYPH_BBOX_TRUNCATE = 2;
652 enum FT_GLYPH_BBOX_PIXELS = 3;
654 // ftgxval.h
655 enum {
656 FT_VALIDATE_feat_INDEX = 0,
657 FT_VALIDATE_mort_INDEX = 1,
658 FT_VALIDATE_morx_INDEX = 2,
659 FT_VALIDATE_bsln_INDEX = 3,
660 FT_VALIDATE_just_INDEX = 4,
661 FT_VALIDATE_kern_INDEX = 5,
662 FT_VALIDATE_opbd_INDEX = 6,
663 FT_VALIDATE_trak_INDEX = 7,
664 FT_VALIDATE_prop_INDEX = 8,
665 FT_VALIDATE_lcar_INDEX = 9,
666 FT_VALIDATE_GX_LAST_INDEX = FT_VALIDATE_lcar_INDEX,
667 FT_VALIDATE_GX_LENGTH = FT_VALIDATE_GX_LAST_INDEX+1,
669 FT_VALIDATE_GX_START = 0x4000,
670 FT_VALIDATE_feat = FT_VALIDATE_GX_START<<FT_VALIDATE_feat_INDEX,
671 FT_VALIDATE_mort = FT_VALIDATE_GX_START<<FT_VALIDATE_mort_INDEX,
672 FT_VALIDATE_morx = FT_VALIDATE_GX_START<<FT_VALIDATE_morx_INDEX,
673 FT_VALIDATE_bsln = FT_VALIDATE_GX_START<<FT_VALIDATE_bsln_INDEX,
674 FT_VALIDATE_just = FT_VALIDATE_GX_START<<FT_VALIDATE_just_INDEX,
675 FT_VALIDATE_kern = FT_VALIDATE_GX_START<<FT_VALIDATE_kern_INDEX,
676 FT_VALIDATE_opbd = FT_VALIDATE_GX_START<<FT_VALIDATE_opbd_INDEX,
677 FT_VALIDATE_trak = FT_VALIDATE_GX_START<<FT_VALIDATE_trak_INDEX,
678 FT_VALIDATE_prop = FT_VALIDATE_GX_START<<FT_VALIDATE_prop_INDEX,
679 FT_VALIDATE_lcar = FT_VALIDATE_GX_START<<FT_VALIDATE_lcar_INDEX,
681 FT_VALIDATE_GX = FT_VALIDATE_feat|
682 FT_VALIDATE_mort|
683 FT_VALIDATE_morx|
684 FT_VALIDATE_bsln|
685 FT_VALIDATE_just|
686 FT_VALIDATE_kern|
687 FT_VALIDATE_opbd|
688 FT_VALIDATE_trak|
689 FT_VALIDATE_prop|
690 FT_VALIDATE_lcar,
692 FT_VALIDATE_MS = FT_VALIDATE_GX_START<<0,
693 FT_VALIDATE_APPLE = FT_VALIDATE_GX_START<<1,
694 FT_VALIDATE_CKERN = FT_VALIDATE_MS|FT_VALIDATE_APPLE,
697 // ftimage.h
698 alias FT_Pos = c_long;
700 struct FT_Vector {
701 FT_Pos x;
702 FT_Pos y;
705 struct FT_BBox {
706 FT_Pos xMin, yMin;
707 FT_Pos xMax, yMax;
710 alias FT_Pixel_Mode = int;
711 enum {
712 FT_PIXEL_MODE_NONE = 0,
713 FT_PIXEL_MODE_MONO,
714 FT_PIXEL_MODE_GRAY,
715 FT_PIXEL_MODE_GRAY2,
716 FT_PIXEL_MODE_GRAY4,
717 FT_PIXEL_MODE_LCD,
718 FT_PIXEL_MODE_LCD_V,
719 FT_PIXEL_MODE_MAX
722 struct FT_Bitmap {
723 uint rows;
724 uint width;
725 int pitch;
726 ubyte* buffer;
727 ushort num_grays;
728 ubyte pixel_mode;
729 ubyte palette_mode;
730 void* palette;
733 struct FT_Outline {
734 short n_contours;
735 short n_points;
736 FT_Vector* points;
737 byte* tags;
738 short* contours;
739 int flags;
742 enum FT_OUTLINE_CONTOURS_MAX = short.max;
743 enum FT_OUTLINE_POINTS_MAX = short.max;
745 enum FT_OUTLINE_NONE = 0x0U;
746 enum FT_OUTLINE_OWNER = 0x1U;
747 enum FT_OUTLINE_EVEN_ODD_FILL = 0x2U;
748 enum FT_OUTLINE_REVERSE_FILL = 0x4U;
749 enum FT_OUTLINE_IGNORE_DROPOUTS = 0x8U;
750 enum FT_OUTLINE_HIGH_PRECISION = 0x100U;
751 enum FT_OUTLINE_SINGLE_PASS = 0x200U;
753 enum FT_CURVE_TAG_ON = 1;
754 enum FT_CURVE_TAG_CONIC = 0;
755 enum FT_CURVE_TAG_CUBIC = 2;
756 enum FT_CURVE_TAG_TOUCH_X = 8;
757 enum FT_CURVE_TAG_TOUCH_Y = 16;
758 enum FT_CURVE_TAG_TOUCH_BOTH = FT_CURVE_TAG_TOUCH_X|FT_CURVE_TAG_TOUCH_Y;
760 extern(C) nothrow {
761 alias FT_Outline_MoveToFunc = int function (const(FT_Vector)*, void*);
762 alias FT_Outline_LineToFunc = int function (const(FT_Vector)*, void*);
763 alias FT_Outline_ConicToFunc = int function (const(FT_Vector)*, const(FT_Vector)*, void*);
764 alias FT_Outline_CubicToFunc = int function (const(FT_Vector)*, const(FT_Vector)*, const(FT_Vector)*, void*);
767 struct FT_Outline_Funcs {
768 FT_Outline_MoveToFunc move_to;
769 FT_Outline_LineToFunc line_to;
770 FT_Outline_ConicToFunc conic_to;
771 FT_Outline_CubicToFunc cubic_to;
772 int shift;
773 FT_Pos delta;
776 alias FT_Glyph_Format = FT_Tag;
777 enum : FT_Tag {
778 FT_GLYPH_FORMAT_NONE = 0,
779 FT_GLYPH_FORMAT_COMPOSITE = FT_MAKE_TAG('c','o','m','p'),
780 FT_GLYPH_FORMAT_BITMAP = FT_MAKE_TAG('b','i','t','s'),
781 FT_GLYPH_FORMAT_OUTLINE = FT_MAKE_TAG('o','u','t','l'),
782 FT_GLYPH_FORMAT_PLOTTER = FT_MAKE_TAG('p','l','o','t'),
785 struct FT_RasterRec;
786 alias FT_Raster = FT_RasterRec*;
788 struct FT_Span {
789 short x;
790 ushort len;
791 ubyte coverage;
794 extern(C) nothrow {
795 alias FT_SpanFunc = void function (int, int, FT_Span*, void*);
798 enum FT_RASTER_FLAG_DEFAULT = 0x0;
799 enum FT_RASTER_FLAG_AA = 0x1;
800 enum FT_RASTER_FLAG_DIRECT = 0x2;
801 enum FT_RASTER_FLAG_CLIP = 0x4;
803 struct FT_Raster_Params {
804 const(FT_Bitmap)* target;
805 const(void)* source;
806 int flags;
807 FT_SpanFunc gray_spans;
808 void* black_spans;
809 void* bit_test;
810 void* bit_set;
811 void* user;
812 FT_BBox clip_box;
815 extern(C) nothrow {
816 alias FT_Raster_NewFunc = int function (void*, FT_Raster*);
817 alias FT_Raster_DoneFunc = void function (FT_Raster);
818 alias FT_Raster_ResetFunc = void function (FT_Raster, ubyte*, uint);
819 alias FT_Raster_SetModeFunc = int function (FT_Raster, uint, void*);
820 alias FT_Raster_RenderFunc = int function (FT_Raster, FT_Raster_Params*);
824 struct FT_Raster_Funcs {
825 FT_Glyph_Format glyph_format;
826 FT_Raster_NewFunc raster_new;
827 FT_Raster_ResetFunc raster_reset;
828 FT_Raster_SetModeFunc raster_set_mode;
829 FT_Raster_RenderFunc raster_render;
830 FT_Raster_DoneFunc raster_done;
833 // ftincrem.h
834 struct FT_IncrementalRec;
835 alias FT_Incremental = FT_IncrementalRec*;
837 struct FT_Incremental_MetricsRec {
838 FT_Long bearing_x;
839 FT_Long bearing_y;
840 FT_Long advance;
843 alias FT_Incremental_Metrics = FT_Incremental_MetricsRec*;
845 extern(C) nothrow {
846 alias FT_Incremental_GetGlyphDataFunc = FT_Error function (FT_Incremental, FT_UInt, FT_Data*);
847 alias FT_Incremental_FreeGlyphDataFunc = void function (FT_Incremental, FT_Data*);
848 alias FT_Incremental_GetGlyphMetricsFunc = FT_Error function (FT_Incremental, FT_UInt, FT_Bool, FT_Incremental_MetricsRec*);
851 struct FT_Incremental_FuncsRec {
852 FT_Incremental_GetGlyphDataFunc get_glyph_data;
853 FT_Incremental_FreeGlyphDataFunc free_glyph_data;
854 FT_Incremental_GetGlyphMetricsFunc get_glyph_metrics;
857 struct FT_Incremental_InterfaceRec {
858 FT_Incremental_FuncsRec* funcs;
859 FT_Incremental object;
862 enum FT_PARAM_TAG_INCREMENTAL = FT_MAKE_TAG('i','n','c','r');
864 alias FT_Incremental_Interface = FT_Incremental_InterfaceRec*;
866 // ftlcdfil.h
867 alias FT_LcdFilter = int;
868 enum {
869 FT_LCD_FILTER_NONE = 0,
870 FT_LCD_FILTER_DEFAULT = 1,
871 FT_LCD_FILTER_LIGHT = 2,
872 FT_LCD_FILTER_LEGACY1 = 3,
873 FT_LCD_FILTER_LEGACY = 16,
874 FT_LCD_FILTER_MAX
877 // ftlist.h
878 extern(C) nothrow {
879 alias FT_List_Iterator = FT_Error function (FT_ListNode, void*);
880 alias FT_List_Destructor = void function (FT_Memory, void*, void*);
883 // ftmm.h
884 struct FT_MM_Axis {
885 FT_String* name;
886 FT_Long minimum;
887 FT_Long maximum;
890 struct FT_Multi_Master {
891 FT_UInt num_axis;
892 FT_UInt num_designs;
893 FT_MM_Axis[4] axis;
896 struct FT_Var_Axis {
897 FT_String* name;
898 FT_Fixed minimum;
899 FT_Fixed def;
900 FT_Fixed maximum;
901 FT_ULong tag;
902 FT_UInt strid;
905 struct FT_Var_Named_Style {
906 FT_Fixed* coords;
907 FT_UInt strid;
910 struct FT_MM_Var {
911 FT_UInt num_axis;
912 FT_UInt num_designs;
913 FT_UInt num_namedstyles;
914 FT_Var_Axis* axis;
915 FT_Var_Named_Style* namedstyle;
918 // ftmodapi.h
919 enum FT_MODULE_FONT_DRIVER = 1;
920 enum FT_MODULE_RENDERER = 2;
921 enum FT_MODULE_HINTER = 4;
922 enum FT_MODULE_STYLER = 8;
923 enum FT_MODULE_DRIVER_SCALABLE = 0x100;
924 enum FT_MODULE_DRIVER_NO_OUTLINES = 0x200;
925 enum FT_MODULE_DRIVER_HAS_HINTER = 0x400;
926 enum FT_MODULE_DRIVER_HINTS_LIGHTLY = 0x800;
928 alias FT_Module_Interface = FT_Pointer;
930 extern(C) nothrow {
931 alias FT_Module_Constructor = FT_Error function (FT_Module);
932 alias FT_Module_Destructor = void function (FT_Module);
933 alias FT_Module_Requester = FT_Module_Interface function (FT_Module, const(char)*);
936 struct FT_Module_Class {
937 FT_ULong module_flags;
938 FT_Long module_size;
939 FT_String* module_name;
940 FT_Fixed module_version;
941 FT_Fixed module_requires;
942 void* module_interface;
943 FT_Module_Constructor module_init;
944 FT_Module_Destructor module_done;
945 FT_Module_Requester get_interface;
948 extern(C) nothrow {
949 alias FT_DebugHook_Func = void function (void*);
952 alias FT_TrueTypeEngineType = int;
953 enum {
954 FT_TRUETYPE_ENGINE_TYPE_NONE = 0,
955 FT_TRUETYPE_ENGINE_TYPE_UNPATENTED,
956 FT_TRUETYPE_ENGINE_TYPE_PATENTED
959 // ftmoderr.h
960 enum FT_Mod_Err_Base = 0x000;
961 enum FT_Mod_Err_Autofit = 0x100;
962 enum FT_Mod_Err_BDF = 0x200;
963 enum FT_Mod_Err_Bzip2 = 0x300;
964 enum FT_Mod_Err_Cache = 0x400;
965 enum FT_Mod_Err_CFF = 0x500;
966 enum FT_Mod_Err_CID = 0x600;
967 enum FT_Mod_Err_Gzip = 0x700;
968 enum FT_Mod_Err_LZW = 0x800;
969 enum FT_Mod_Err_OTvalid = 0x900;
970 enum FT_Mod_Err_PCF = 0xA00;
971 enum FT_Mod_Err_PFR = 0xB00;
972 enum FT_Mod_Err_PSaux = 0xC00;
973 enum FT_Mod_Err_PShinter = 0xD00;
974 enum FT_Mod_Err_PSnames = 0xE00;
975 enum FT_Mod_Err_Raster = 0xF00;
976 enum FT_Mod_Err_SFNT = 0x1000;
977 enum FT_Mod_Err_Smooth = 0x1100;
978 enum FT_Mod_Err_TrueType = 0x1200;
979 enum FT_Mod_Err_Type1 = 0x1300;
980 enum FT_Mod_Err_Type42 = 0x1400;
981 enum FT_Mod_Err_Winfonts = 0x1500;
982 enum FT_Mod_Err_GXvalid = 0x1600;
983 //FT_Mod_Err_Max,
985 // ftotval.h
986 enum {
987 FT_VALIDATE_BASE = 0x0100,
988 FT_VALIDATE_GDEF = 0x0200,
989 FT_VALIDATE_GPOS = 0x0400,
990 FT_VALIDATE_GSUB = 0x0800,
991 FT_VALIDATE_JSTF = 0x1000,
992 FT_VALIDATE_MATH = 0x2000,
993 FT_VALIDATE_OT = FT_VALIDATE_BASE|
994 FT_VALIDATE_GDEF|
995 FT_VALIDATE_GPOS|
996 FT_VALIDATE_GSUB|
997 FT_VALIDATE_JSTF|
998 FT_VALIDATE_MATH,
1001 // ftoutln
1002 alias FT_Orientation = int;
1003 enum {
1004 FT_ORIENTATION_TRUETYPE = 0,
1005 FT_ORIENTATION_POSTSCRIPT = 1,
1006 FT_ORIENTATION_FILL_RIGHT = FT_ORIENTATION_TRUETYPE,
1007 FT_ORIENTATION_FILL_LEFT = FT_ORIENTATION_POSTSCRIPT
1010 // ftrender.h
1011 extern(C) nothrow {
1012 alias FT_Glyph_InitFunc = FT_Error function (FT_Glyph, FT_GlyphSlot);
1013 alias FT_Glyph_DoneFunc = void function (FT_Glyph);
1014 alias FT_Glyph_TransformFunc = void function (FT_Glyph, const(FT_Matrix)* matrix, const(FT_Vector)*);
1015 alias FT_Glyph_GetBBoxFunc = void function (FT_Glyph, FT_BBox*);
1016 alias FT_Glyph_CopyFunc = FT_Error function (FT_Glyph, FT_Glyph);
1017 alias FT_Glyph_PrepareFunc = FT_Error function (FT_Glyph, FT_GlyphSlot);
1020 struct FT_Glyph_Class { // typedef'd in ftglyph.h
1021 FT_Long glyph_size;
1022 FT_Glyph_Format glyph_format;
1023 FT_Glyph_InitFunc glyph_init;
1024 FT_Glyph_DoneFunc glyph_done;
1025 FT_Glyph_CopyFunc glyph_copy;
1026 FT_Glyph_TransformFunc glyph_transform;
1027 FT_Glyph_GetBBoxFunc glyph_bbox;
1028 FT_Glyph_PrepareFunc glyph_prepare;
1031 extern(C) nothrow {
1032 alias FT_Renderer_RenderFunc = FT_Error function (FT_Renderer, FT_GlyphSlot, FT_UInt, const(FT_Vector)*);
1033 alias FT_Renderer_TransformFunc = FT_Error function (FT_Renderer, FT_GlyphSlot, const(FT_Matrix)*, const(FT_Vector)*);
1034 alias FT_Renderer_GetCBoxFunc = void function (FT_Renderer, FT_GlyphSlot, FT_BBox*);
1035 alias FT_Renderer_SetModeFunc = FT_Error function (FT_Renderer, FT_ULong, FT_Pointer);
1038 struct FT_Renderer_Class {
1039 FT_Module_Class root;
1040 FT_Glyph_Format glyph_format;
1041 FT_Renderer_RenderFunc render_glyph;
1042 FT_Renderer_TransformFunc transform_glyph;
1043 FT_Renderer_GetCBoxFunc get_glyph_cbox;
1044 FT_Renderer_SetModeFunc set_mode;
1045 FT_Raster_Funcs* raster_class;
1048 // ftsnames.h
1049 struct FT_SfntName {
1050 FT_UShort platform_id;
1051 FT_UShort encoding_id;
1052 FT_UShort language_id;
1053 FT_UShort name_id;
1054 FT_Byte* string;
1055 FT_UInt string_len;
1058 enum FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY = FT_MAKE_TAG('i','g','p','f');
1059 enum FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY = FT_MAKE_TAG('i','g','p','s');
1061 // ftstroke.h
1062 struct FT_StrokerRec;
1063 alias FT_Stroker = FT_StrokerRec*;
1065 alias FT_Stroker_LineJoin = int;
1066 enum {
1067 FT_STROKER_LINEJOIN_ROUND = 0,
1068 FT_STROKER_LINEJOIN_BEVEL,
1069 FT_STROKER_LINEJOIN_MITER
1072 alias FT_Stroker_LineCap = int;
1073 enum {
1074 FT_STROKER_LINECAP_BUTT = 0,
1075 FT_STROKER_LINECAP_ROUND,
1076 FT_STROKER_LINECAP_SQUARE
1079 alias FT_StrokerBorder = int;
1080 enum {
1081 FT_STROKER_BORDER_LEFT = 0,
1082 FT_STROKER_BORDER_RIGHT
1085 // ftsystem.h
1086 alias FT_Memory = FT_MemoryRec*;
1088 extern(C) nothrow {
1089 alias FT_Alloc_Func = void* function (FT_Memory, c_long);
1090 alias FT_Free_Func = void function (FT_Memory, void*);
1091 alias FT_Realloc_Func = void* function (FT_Memory, c_long, c_long, void*);
1094 struct FT_MemoryRec {
1095 void* user;
1096 FT_Alloc_Func alloc;
1097 FT_Free_Func free;
1098 FT_Realloc_Func realloc;
1101 alias FT_Stream = FT_StreamRec*;
1103 union FT_StreamDesc {
1104 int value;
1105 void* pointer;
1108 extern(C) nothrow {
1109 alias FT_Stream_IoFunc = c_ulong function (FT_Stream, c_ulong, ubyte*, c_ulong);
1110 alias FT_Stream_CloseFunc = void function (FT_Stream);
1113 struct FT_StreamRec {
1114 ubyte* base;
1115 c_ulong size;
1116 c_ulong pos;
1117 FT_StreamDesc descriptor;
1118 FT_StreamDesc pathname;
1119 FT_Stream_IoFunc read;
1120 FT_Stream_CloseFunc close;
1121 FT_Memory memory;
1122 ubyte* cursor;
1123 ubyte* limit;
1126 // fttrigon.h
1127 alias FT_Angle = FT_Fixed;
1129 enum {
1130 FT_ANGLE_PI = 180<<16,
1131 FT_ANGLE_2PI = FT_ANGLE_PI*2,
1132 FT_ANGLE_PI2 = FT_ANGLE_PI/2,
1133 FT_ANGLE_PI4 = FT_ANGLE_PI/4
1136 // ftttdrv.h
1137 enum TT_INTERPRETER_VERSION_35 = 35;
1138 enum TT_INTERPRETER_VERSION_38 = 38;
1140 // ftwinfnt.h
1141 enum FT_WinFNT_ID_CP1252 = 0;
1142 enum FT_WinFNT_ID_DEFAULT = 1;
1143 enum FT_WinFNT_ID_SYMBOL = 2;
1144 enum FT_WinFNT_ID_MAC = 77;
1145 enum FT_WinFNT_ID_CP932 = 128;
1146 enum FT_WinFNT_ID_CP949 = 129;
1147 enum FT_WinFNT_ID_CP1361 = 130;
1148 enum FT_WinFNT_ID_CP936 = 134;
1149 enum FT_WinFNT_ID_CP950 = 136;
1150 enum FT_WinFNT_ID_CP1253 = 161;
1151 enum FT_WinFNT_ID_CP1254 = 162;
1152 enum FT_WinFNT_ID_CP1258 = 163;
1153 enum FT_WinFNT_ID_CP1255 = 177;
1154 enum FT_WinFNT_ID_CP1256 = 178;
1155 enum FT_WinFNT_ID_CP1257 = 186;
1156 enum FT_WinFNT_ID_CP1251 = 204;
1157 enum FT_WinFNT_ID_CP874 = 222;
1158 enum FT_WinFNT_ID_CP1250 = 238;
1159 enum FT_WinFNT_ID_OEM = 255;
1162 struct FT_WinFNT_HeaderRec {
1163 FT_UShort _version;
1164 FT_ULong file_size;
1165 FT_Byte[60] copyright;
1166 FT_UShort file_type;
1167 FT_UShort nominal_point_size;
1168 FT_UShort vertical_resolution;
1169 FT_UShort horizontal_resolution;
1170 FT_UShort ascent;
1171 FT_UShort internal_leading;
1172 FT_UShort external_leading;
1173 FT_Byte italic;
1174 FT_Byte underline;
1175 FT_Byte strike_out;
1176 FT_UShort weight;
1177 FT_Byte charset;
1178 FT_UShort pixel_width;
1179 FT_UShort pixel_height;
1180 FT_Byte pitch_and_family;
1181 FT_UShort avg_width;
1182 FT_UShort max_width;
1183 FT_Byte first_char;
1184 FT_Byte last_char;
1185 FT_Byte default_char;
1186 FT_Byte break_char;
1187 FT_UShort bytes_per_row;
1188 FT_ULong device_offset;
1189 FT_ULong face_name_offset;
1190 FT_ULong bits_pointer;
1191 FT_ULong bits_offset;
1192 FT_Byte reserved;
1193 FT_ULong flags;
1194 FT_UShort A_space;
1195 FT_UShort B_space;
1196 FT_UShort C_space;
1197 FT_UShort color_table_offset;
1198 FT_ULong[4] reserved1;
1201 alias FT_WinFNT_Header = FT_WinFNT_HeaderRec*;
1203 // t1tables.h
1204 struct PS_FontInfoRec {
1205 FT_String* _version;
1206 FT_String* notice;
1207 FT_String* full_name;
1208 FT_String* family_name;
1209 FT_String* weight;
1210 FT_Long italic_angle;
1211 FT_Bool is_fixed_pitch;
1212 FT_Short underline_position;
1213 FT_UShort underline_thickness;
1216 alias PS_FontInfo = PS_FontInfoRec*;
1218 struct PS_PrivateRec {
1219 FT_Int unique_id;
1220 FT_Int lenIV;
1221 FT_Byte num_blue_values;
1222 FT_Byte num_other_blues;
1223 FT_Byte num_family_blues;
1224 FT_Byte num_family_other_blues;
1225 FT_Short[14] blue_values;
1226 FT_Short[10] other_blues;
1227 FT_Short[14] family_blues;
1228 FT_Short[10] family_other_blues;
1229 FT_Fixed blue_scale;
1230 FT_Int blue_shift;
1231 FT_Int blue_fuzz;
1232 FT_UShort[1] standard_width;
1233 FT_UShort[1] standard_height;
1234 FT_Byte num_snap_widths;
1235 FT_Byte num_snap_heights;
1236 FT_Bool force_bold;
1237 FT_Bool round_stem_up;
1238 FT_Short[13] snap_widths;
1239 FT_Short[13] snap_heights;
1240 FT_Fixed expansion_factor;
1241 FT_Long language_group;
1242 FT_Long password;
1243 FT_Short[2] min_feature;
1246 alias PS_Private = PS_PrivateRec*;
1248 alias T1_Blend_Flags = int;
1249 enum {
1250 T1_BLEND_UNDERLINE_POSITION = 0,
1251 T1_BLEND_UNDERLINE_THICKNESS,
1252 T1_BLEND_ITALIC_ANGLE,
1253 T1_BLEND_BLUE_VALUES,
1254 T1_BLEND_OTHER_BLUES,
1255 T1_BLEND_STANDARD_WIDTH,
1256 T1_BLEND_STANDARD_HEIGHT,
1257 T1_BLEND_STEM_SNAP_WIDTHS,
1258 T1_BLEND_STEM_SNAP_HEIGHTS,
1259 T1_BLEND_BLUE_SCALE,
1260 T1_BLEND_BLUE_SHIFT,
1261 T1_BLEND_FAMILY_BLUES,
1262 T1_BLEND_FAMILY_OTHER_BLUES,
1263 T1_BLEND_FORCE_BOLD,
1264 T1_BLEND_MAX
1267 enum T1_MAX_MM_DESIGNS = 16;
1268 enum T1_MAX_MM_AXIS = 4;
1269 enum T1_MAX_MM_MAP_POINTS = 20;
1271 struct PS_DesignMapRec {
1272 FT_Byte num_points;
1273 FT_Long* design_points;
1274 FT_Fixed* blend_points;
1277 alias PS_DesignMap = PS_DesignMapRec*;
1279 struct PS_BlendRec {
1280 FT_UInt num_designs;
1281 FT_UInt num_axis;
1282 FT_String*[T1_MAX_MM_AXIS] axis_names;
1283 FT_Fixed*[T1_MAX_MM_DESIGNS] design_pos;
1284 PS_DesignMapRec[T1_MAX_MM_AXIS] design_map;
1285 FT_Fixed* weight_vector;
1286 FT_Fixed* default_weight_vector;
1287 PS_FontInfo[T1_MAX_MM_DESIGNS+1] font_infos;
1288 PS_Private[T1_MAX_MM_DESIGNS+1] privates;
1289 FT_ULong blend_bitflags;
1290 FT_BBox*[T1_MAX_MM_DESIGNS+1] bboxes;
1291 FT_UInt[T1_MAX_MM_DESIGNS] default_design_vector;
1292 FT_UInt num_default_design_vector;
1295 alias PS_Blend = PS_BlendRec*;
1297 struct CID_FaceDictRec {
1298 PS_PrivateRec private_dict;
1299 FT_UInt len_buildchar;
1300 FT_Fixed forcebold_threshold;
1301 FT_Pos stroke_width;
1302 FT_Fixed expansion_factor;
1303 FT_Byte paint_type;
1304 FT_Byte font_type;
1305 FT_Matrix font_matrix;
1306 FT_Vector font_offset;
1307 FT_UInt num_subrs;
1308 FT_ULong subrmap_offset;
1309 FT_Int sd_bytes;
1312 alias CID_FaceDict = CID_FaceDictRec*;
1314 struct CID_FaceInfoRec {
1315 FT_String* cid_font_name;
1316 FT_Fixed cid_version;
1317 FT_Int cid_font_type;
1318 FT_String* registry;
1319 FT_String* ordering;
1320 FT_Int supplement;
1321 PS_FontInfoRec font_info;
1322 FT_BBox font_bbox;
1323 FT_ULong uid_base;
1324 FT_Int num_xuid;
1325 FT_ULong[16] xuid;
1326 FT_ULong cidmap_offset;
1327 FT_Int fd_bytes;
1328 FT_Int gd_bytes;
1329 FT_ULong cid_count;
1330 FT_Int num_dicts;
1331 CID_FaceDict font_dicts;
1332 FT_ULong data_offset;
1335 alias CID_FaceInfo = CID_FaceInfoRec*;
1337 alias T1_EncodingType = int;
1338 enum {
1339 T1_ENCODING_TYPE_NONE = 0,
1340 T1_ENCODING_TYPE_ARRAY,
1341 T1_ENCODING_TYPE_STANDARD,
1342 T1_ENCODING_TYPE_ISOLATIN1,
1343 T1_ENCODING_TYPE_EXPERT,
1346 alias PS_Dict_Keys = int;
1347 enum {
1348 PS_DICT_FONT_TYPE,
1349 PS_DICT_FONT_MATRIX,
1350 PS_DICT_FONT_BBOX,
1351 PS_DICT_PAINT_TYPE,
1352 PS_DICT_FONT_NAME,
1353 PS_DICT_UNIQUE_ID,
1354 PS_DICT_NUM_CHAR_STRINGS,
1355 PS_DICT_CHAR_STRING_KEY,
1356 PS_DICT_CHAR_STRING,
1357 PS_DICT_ENCODING_TYPE,
1358 PS_DICT_ENCODING_ENTRY,
1360 PS_DICT_NUM_SUBRS,
1361 PS_DICT_SUBR,
1362 PS_DICT_STD_HW,
1363 PS_DICT_STD_VW,
1364 PS_DICT_NUM_BLUE_VALUES,
1365 PS_DICT_BLUE_VALUE,
1366 PS_DICT_BLUE_FUZZ,
1367 PS_DICT_NUM_OTHER_BLUES,
1368 PS_DICT_OTHER_BLUE,
1369 PS_DICT_NUM_FAMILY_BLUES,
1370 PS_DICT_FAMILY_BLUE,
1371 PS_DICT_NUM_FAMILY_OTHER_BLUES,
1372 PS_DICT_FAMILY_OTHER_BLUE,
1373 PS_DICT_BLUE_SCALE,
1374 PS_DICT_BLUE_SHIFT,
1375 PS_DICT_NUM_STEM_SNAP_H,
1376 PS_DICT_STEM_SNAP_H,
1377 PS_DICT_NUM_STEM_SNAP_V,
1378 PS_DICT_STEM_SNAP_V,
1379 PS_DICT_FORCE_BOLD,
1380 PS_DICT_RND_STEM_UP,
1381 PS_DICT_MIN_FEATURE,
1382 PS_DICT_LEN_IV,
1383 PS_DICT_PASSWORD,
1384 PS_DICT_LANGUAGE_GROUP,
1386 PS_DICT_VERSION,
1387 PS_DICT_NOTICE,
1388 PS_DICT_FULL_NAME,
1389 PS_DICT_FAMILY_NAME,
1390 PS_DICT_WEIGHT,
1391 PS_DICT_IS_FIXED_PITCH,
1392 PS_DICT_UNDERLINE_POSITION,
1393 PS_DICT_UNDERLINE_THICKNESS,
1394 PS_DICT_FS_TYPE,
1395 PS_DICT_ITALIC_ANGLE,
1397 PS_DICT_MAX = PS_DICT_ITALIC_ANGLE
1400 // ttnameid.h
1401 enum TT_PLATFORM_APPLE_UNICODE = 0;
1402 enum TT_PLATFORM_MACINTOSH = 1;
1403 enum TT_PLATFORM_MICROSOFT = 3;
1404 enum TT_PLATFORM_CUSTOM = 4;
1405 enum TT_PLATFORM_ADOBE = 7;
1407 enum TT_APPLE_ID_DEFAULT = 0;
1408 enum TT_APPLE_ID_UNICODE_1_1 = 1;
1409 enum TT_APPLE_ID_UNICODE_2_0 = 3;
1410 enum TT_APPLE_ID_UNICODE_32 = 4;
1411 enum TT_APPLE_ID_VARIANT_SELECTOR = 5;
1413 enum TT_MAC_ID_ROMAN = 0;
1414 enum TT_MAC_ID_JAPANESE = 1;
1415 enum TT_MAC_ID_TRADITIONAL_CHINESE = 2;
1416 enum TT_MAC_ID_KOREAN = 3;
1417 enum TT_MAC_ID_ARABIC = 4;
1418 enum TT_MAC_ID_HEBREW = 5;
1419 enum TT_MAC_ID_GREEK = 6;
1420 enum TT_MAC_ID_RUSSIAN = 7;
1421 enum TT_MAC_ID_RSYMBOL = 8;
1422 enum TT_MAC_ID_DEVANAGARI = 9;
1423 enum TT_MAC_ID_GURMUKHI = 10;
1424 enum TT_MAC_ID_GUJARATI = 11;
1425 enum TT_MAC_ID_ORIYA = 12;
1426 enum TT_MAC_ID_BENGALI = 13;
1427 enum TT_MAC_ID_TAMIL = 14;
1428 enum TT_MAC_ID_TELUGU = 15;
1429 enum TT_MAC_ID_KANNADA = 16;
1430 enum TT_MAC_ID_MALAYALAM = 17;
1431 enum TT_MAC_ID_SINHALESE = 18;
1432 enum TT_MAC_ID_BURMESE = 19;
1433 enum TT_MAC_ID_KHMER = 20;
1434 enum TT_MAC_ID_THAI = 21;
1435 enum TT_MAC_ID_LAOTIAN = 22;
1436 enum TT_MAC_ID_GEORGIAN = 23;
1437 enum TT_MAC_ID_ARMENIAN = 24;
1438 enum TT_MAC_ID_MALDIVIAN = 25;
1439 enum TT_MAC_ID_SIMPLIFIED_CHINESE = 25;
1440 enum TT_MAC_ID_TIBETAN = 26;
1441 enum TT_MAC_ID_MONGOLIAN = 27;
1442 enum TT_MAC_ID_GEEZ = 28;
1443 enum TT_MAC_ID_SLAVIC = 29;
1444 enum TT_MAC_ID_VIETNAMESE = 30;
1445 enum TT_MAC_ID_SINDHI = 31;
1446 enum TT_MAC_ID_UNINTERP = 32;
1448 enum TT_ISO_ID_7BIT_ASCII = 0;
1449 enum TT_ISO_ID_10646 = 1;
1450 enum TT_ISO_ID_8859_1 = 2;
1452 enum TT_MS_ID_SYMBOL_CS = 0;
1453 enum TT_MS_ID_UNICODE_CS = 1;
1454 enum TT_MS_ID_SJIS = 2;
1455 enum TT_MS_ID_GB2312 = 3;
1456 enum TT_MS_ID_BIG_5 = 4;
1457 enum TT_MS_ID_WANSUNG = 5;
1458 enum TT_MS_ID_JOHAB = 6;
1459 enum TT_MS_ID_UCS_4 = 10;
1461 enum TT_ADOBE_ID_STANDARD = 0;
1462 enum TT_ADOBE_ID_EXPERT = 1;
1463 enum TT_ADOBE_ID_CUSTOM = 2;
1464 enum TT_ADOBE_ID_LATIN_1 = 3;
1466 enum TT_MAC_LANGID_ENGLISH = 0;
1467 enum TT_MAC_LANGID_FRENCH = 1;
1468 enum TT_MAC_LANGID_GERMAN = 2;
1469 enum TT_MAC_LANGID_ITALIAN = 3;
1470 enum TT_MAC_LANGID_DUTCH = 4;
1471 enum TT_MAC_LANGID_SWEDISH = 5;
1472 enum TT_MAC_LANGID_SPANISH = 6;
1473 enum TT_MAC_LANGID_DANISH = 7;
1474 enum TT_MAC_LANGID_PORTUGUESE = 8;
1475 enum TT_MAC_LANGID_NORWEGIAN = 9;
1476 enum TT_MAC_LANGID_HEBREW = 10;
1477 enum TT_MAC_LANGID_JAPANESE = 11;
1478 enum TT_MAC_LANGID_ARABIC = 12;
1479 enum TT_MAC_LANGID_FINNISH = 13;
1480 enum TT_MAC_LANGID_GREEK = 14;
1481 enum TT_MAC_LANGID_ICELANDIC = 15;
1482 enum TT_MAC_LANGID_MALTESE = 16;
1483 enum TT_MAC_LANGID_TURKISH = 17;
1484 enum TT_MAC_LANGID_CROATIAN = 18;
1485 enum TT_MAC_LANGID_CHINESE_TRADITIONAL = 19;
1486 enum TT_MAC_LANGID_URDU = 20;
1487 enum TT_MAC_LANGID_HINDI = 21;
1488 enum TT_MAC_LANGID_THAI = 22;
1489 enum TT_MAC_LANGID_KOREAN = 23;
1490 enum TT_MAC_LANGID_LITHUANIAN = 24;
1491 enum TT_MAC_LANGID_POLISH = 25;
1492 enum TT_MAC_LANGID_HUNGARIAN = 26;
1493 enum TT_MAC_LANGID_ESTONIAN = 27;
1494 enum TT_MAC_LANGID_LETTISH = 28;
1495 enum TT_MAC_LANGID_SAAMISK = 29;
1496 enum TT_MAC_LANGID_FAEROESE = 30;
1497 enum TT_MAC_LANGID_FARSI = 31;
1498 enum TT_MAC_LANGID_RUSSIAN = 32;
1499 enum TT_MAC_LANGID_CHINESE_SIMPLIFIED = 33;
1500 enum TT_MAC_LANGID_FLEMISH = 34;
1501 enum TT_MAC_LANGID_IRISH = 35;
1502 enum TT_MAC_LANGID_ALBANIAN = 36;
1503 enum TT_MAC_LANGID_ROMANIAN = 37;
1504 enum TT_MAC_LANGID_CZECH = 38;
1505 enum TT_MAC_LANGID_SLOVAK = 39;
1506 enum TT_MAC_LANGID_SLOVENIAN = 40;
1507 enum TT_MAC_LANGID_YIDDISH = 41;
1508 enum TT_MAC_LANGID_SERBIAN = 42;
1509 enum TT_MAC_LANGID_MACEDONIAN = 43;
1510 enum TT_MAC_LANGID_BULGARIAN = 44;
1511 enum TT_MAC_LANGID_UKRAINIAN = 45;
1512 enum TT_MAC_LANGID_BYELORUSSIAN = 46;
1513 enum TT_MAC_LANGID_UZBEK = 47;
1514 enum TT_MAC_LANGID_KAZAKH = 48;
1515 enum TT_MAC_LANGID_AZERBAIJANI = 49;
1516 enum TT_MAC_LANGID_AZERBAIJANI_CYRILLIC_SCRIPT = 49;
1517 enum TT_MAC_LANGID_AZERBAIJANI_ARABIC_SCRIPT = 50;
1518 enum TT_MAC_LANGID_ARMENIAN = 51;
1519 enum TT_MAC_LANGID_GEORGIAN = 52;
1520 enum TT_MAC_LANGID_MOLDAVIAN = 53;
1521 enum TT_MAC_LANGID_KIRGHIZ = 54;
1522 enum TT_MAC_LANGID_TAJIKI = 55;
1523 enum TT_MAC_LANGID_TURKMEN = 56;
1524 enum TT_MAC_LANGID_MONGOLIAN = 57;
1525 enum TT_MAC_LANGID_MONGOLIAN_MONGOLIAN_SCRIPT = 57;
1526 enum TT_MAC_LANGID_MONGOLIAN_CYRILLIC_SCRIPT = 58;
1527 enum TT_MAC_LANGID_PASHTO = 59;
1528 enum TT_MAC_LANGID_KURDISH = 60;
1529 enum TT_MAC_LANGID_KASHMIRI = 61;
1530 enum TT_MAC_LANGID_SINDHI = 62;
1531 enum TT_MAC_LANGID_TIBETAN = 63;
1532 enum TT_MAC_LANGID_NEPALI = 64;
1533 enum TT_MAC_LANGID_SANSKRIT = 65;
1534 enum TT_MAC_LANGID_MARATHI = 66;
1535 enum TT_MAC_LANGID_BENGALI = 67;
1536 enum TT_MAC_LANGID_ASSAMESE = 68;
1537 enum TT_MAC_LANGID_GUJARATI = 69;
1538 enum TT_MAC_LANGID_PUNJABI = 70;
1539 enum TT_MAC_LANGID_ORIYA = 71;
1540 enum TT_MAC_LANGID_MALAYALAM = 72;
1541 enum TT_MAC_LANGID_KANNADA = 73;
1542 enum TT_MAC_LANGID_TAMIL = 74;
1543 enum TT_MAC_LANGID_TELUGU = 75;
1544 enum TT_MAC_LANGID_SINHALESE = 76;
1545 enum TT_MAC_LANGID_BURMESE = 77;
1546 enum TT_MAC_LANGID_KHMER = 78;
1547 enum TT_MAC_LANGID_LAO = 79;
1548 enum TT_MAC_LANGID_VIETNAMESE = 80;
1549 enum TT_MAC_LANGID_INDONESIAN = 81;
1550 enum TT_MAC_LANGID_TAGALOG = 82;
1551 enum TT_MAC_LANGID_MALAY_ROMAN_SCRIPT = 83;
1552 enum TT_MAC_LANGID_MALAY_ARABIC_SCRIPT = 84;
1553 enum TT_MAC_LANGID_AMHARIC = 85;
1554 enum TT_MAC_LANGID_TIGRINYA = 86;
1555 enum TT_MAC_LANGID_GALLA = 87;
1556 enum TT_MAC_LANGID_SOMALI = 88;
1557 enum TT_MAC_LANGID_SWAHILI = 89;
1558 enum TT_MAC_LANGID_RUANDA = 90;
1559 enum TT_MAC_LANGID_RUNDI = 91;
1560 enum TT_MAC_LANGID_CHEWA = 92;
1561 enum TT_MAC_LANGID_MALAGASY = 93;
1562 enum TT_MAC_LANGID_ESPERANTO = 94;
1563 enum TT_MAC_LANGID_WELSH = 128;
1564 enum TT_MAC_LANGID_BASQUE = 129;
1565 enum TT_MAC_LANGID_CATALAN = 130;
1566 enum TT_MAC_LANGID_LATIN = 131;
1567 enum TT_MAC_LANGID_QUECHUA = 132;
1568 enum TT_MAC_LANGID_GUARANI = 133;
1569 enum TT_MAC_LANGID_AYMARA = 134;
1570 enum TT_MAC_LANGID_TATAR = 135;
1571 enum TT_MAC_LANGID_UIGHUR = 136;
1572 enum TT_MAC_LANGID_DZONGKHA = 137;
1573 enum TT_MAC_LANGID_JAVANESE = 138;
1574 enum TT_MAC_LANGID_SUNDANESE = 139;
1575 enum TT_MAC_LANGID_GALICIAN = 140;
1576 enum TT_MAC_LANGID_AFRIKAANS = 141;
1577 enum TT_MAC_LANGID_BRETON = 142;
1578 enum TT_MAC_LANGID_INUKTITUT = 143;
1579 enum TT_MAC_LANGID_SCOTTISH_GAELIC = 144;
1580 enum TT_MAC_LANGID_MANX_GAELIC = 145;
1581 enum TT_MAC_LANGID_IRISH_GAELIC = 146;
1582 enum TT_MAC_LANGID_TONGAN = 147;
1583 enum TT_MAC_LANGID_GREEK_POLYTONIC = 148;
1584 enum TT_MAC_LANGID_GREELANDIC = 149;
1585 enum TT_MAC_LANGID_AZERBAIJANI_ROMAN_SCRIPT = 150;
1587 enum TT_MS_LANGID_ARABIC_GENERAL = 0x0001;
1588 enum TT_MS_LANGID_ARABIC_SAUDI_ARABIA = 0x0401;
1589 enum TT_MS_LANGID_ARABIC_IRAQ = 0x0801;
1590 enum TT_MS_LANGID_ARABIC_EGYPT = 0x0c01;
1591 enum TT_MS_LANGID_ARABIC_LIBYA = 0x1001;
1592 enum TT_MS_LANGID_ARABIC_ALGERIA = 0x1401;
1593 enum TT_MS_LANGID_ARABIC_MOROCCO = 0x1801;
1594 enum TT_MS_LANGID_ARABIC_TUNISIA = 0x1c01;
1595 enum TT_MS_LANGID_ARABIC_OMAN = 0x2001;
1596 enum TT_MS_LANGID_ARABIC_YEMEN = 0x2401;
1597 enum TT_MS_LANGID_ARABIC_SYRIA = 0x2801;
1598 enum TT_MS_LANGID_ARABIC_JORDAN = 0x2c01;
1599 enum TT_MS_LANGID_ARABIC_LEBANON = 0x3001;
1600 enum TT_MS_LANGID_ARABIC_KUWAIT = 0x3401;
1601 enum TT_MS_LANGID_ARABIC_UAE = 0x3801;
1602 enum TT_MS_LANGID_ARABIC_BAHRAIN = 0x3c01;
1603 enum TT_MS_LANGID_ARABIC_QATAR = 0x4001;
1604 enum TT_MS_LANGID_BULGARIAN_BULGARIA = 0x0402;
1605 enum TT_MS_LANGID_CATALAN_SPAIN = 0x0403;
1606 enum TT_MS_LANGID_CHINESE_GENERAL = 0x0004;
1607 enum TT_MS_LANGID_CHINESE_TAIWAN = 0x0404;
1608 enum TT_MS_LANGID_CHINESE_PRC = 0x0804;
1609 enum TT_MS_LANGID_CHINESE_HONG_KONG = 0x0c04;
1610 enum TT_MS_LANGID_CHINESE_SINGAPORE = 0x1004;
1611 enum TT_MS_LANGID_CHINESE_MACAU = 0x1404;
1612 enum TT_MS_LANGID_CZECH_CZECH_REPUBLIC = 0x0405;
1613 enum TT_MS_LANGID_DANISH_DENMARK = 0x0406;
1614 enum TT_MS_LANGID_GERMAN_GERMANY = 0x0407;
1615 enum TT_MS_LANGID_GERMAN_SWITZERLAND = 0x0807;
1616 enum TT_MS_LANGID_GERMAN_AUSTRIA = 0x0c07;
1617 enum TT_MS_LANGID_GERMAN_LUXEMBOURG = 0x1007;
1618 enum TT_MS_LANGID_GERMAN_LIECHTENSTEI = 0x1407;
1619 enum TT_MS_LANGID_GREEK_GREECE = 0x0408;
1620 enum TT_MS_LANGID_ENGLISH_GENERAL = 0x0009;
1621 enum TT_MS_LANGID_ENGLISH_UNITED_STATES = 0x0409;
1622 enum TT_MS_LANGID_ENGLISH_UNITED_KINGDOM = 0x0809;
1623 enum TT_MS_LANGID_ENGLISH_AUSTRALIA = 0x0c09;
1624 enum TT_MS_LANGID_ENGLISH_CANADA = 0x1009;
1625 enum TT_MS_LANGID_ENGLISH_NEW_ZEALAND = 0x1409;
1626 enum TT_MS_LANGID_ENGLISH_IRELAND = 0x1809;
1627 enum TT_MS_LANGID_ENGLISH_SOUTH_AFRICA = 0x1c09;
1628 enum TT_MS_LANGID_ENGLISH_JAMAICA = 0x2009;
1629 enum TT_MS_LANGID_ENGLISH_CARIBBEAN = 0x2409;
1630 enum TT_MS_LANGID_ENGLISH_BELIZE = 0x2809;
1631 enum TT_MS_LANGID_ENGLISH_TRINIDAD = 0x2c09;
1632 enum TT_MS_LANGID_ENGLISH_ZIMBABWE = 0x3009;
1633 enum TT_MS_LANGID_ENGLISH_PHILIPPINES = 0x3409;
1634 enum TT_MS_LANGID_ENGLISH_INDONESIA = 0x3809;
1635 enum TT_MS_LANGID_ENGLISH_HONG_KONG = 0x3c09;
1636 enum TT_MS_LANGID_ENGLISH_INDIA = 0x4009;
1637 enum TT_MS_LANGID_ENGLISH_MALAYSIA = 0x4409;
1638 enum TT_MS_LANGID_ENGLISH_SINGAPORE = 0x4809;
1639 enum TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT = 0x040a;
1640 enum TT_MS_LANGID_SPANISH_MEXICO = 0x080a;
1641 enum TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT = 0x0c0a;
1642 enum TT_MS_LANGID_SPANISH_GUATEMALA = 0x100a;
1643 enum TT_MS_LANGID_SPANISH_COSTA_RICA = 0x140a;
1644 enum TT_MS_LANGID_SPANISH_PANAMA = 0x180a;
1645 enum TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC = 0x1c0a;
1646 enum TT_MS_LANGID_SPANISH_VENEZUELA = 0x200a;
1647 enum TT_MS_LANGID_SPANISH_COLOMBIA = 0x240a;
1648 enum TT_MS_LANGID_SPANISH_PERU = 0x280a;
1649 enum TT_MS_LANGID_SPANISH_ARGENTINA = 0x2c0a;
1650 enum TT_MS_LANGID_SPANISH_ECUADOR = 0x300a;
1651 enum TT_MS_LANGID_SPANISH_CHILE = 0x340a;
1652 enum TT_MS_LANGID_SPANISH_URUGUAY = 0x380a;
1653 enum TT_MS_LANGID_SPANISH_PARAGUAY = 0x3c0a;
1654 enum TT_MS_LANGID_SPANISH_BOLIVIA = 0x400a;
1655 enum TT_MS_LANGID_SPANISH_EL_SALVADOR = 0x440a;
1656 enum TT_MS_LANGID_SPANISH_HONDURAS = 0x480a;
1657 enum TT_MS_LANGID_SPANISH_NICARAGUA = 0x4c0a;
1658 enum TT_MS_LANGID_SPANISH_PUERTO_RICO = 0x500a;
1659 enum TT_MS_LANGID_SPANISH_UNITED_STATES = 0x540a;
1660 enum TT_MS_LANGID_SPANISH_LATIN_AMERICA = 0xE40aU;
1661 enum TT_MS_LANGID_FINNISH_FINLAND = 0x040b;
1662 enum TT_MS_LANGID_FRENCH_FRANCE = 0x040c;
1663 enum TT_MS_LANGID_FRENCH_BELGIUM = 0x080c;
1664 enum TT_MS_LANGID_FRENCH_CANADA = 0x0c0c;
1665 enum TT_MS_LANGID_FRENCH_SWITZERLAND = 0x100c;
1666 enum TT_MS_LANGID_FRENCH_LUXEMBOURG = 0x140c;
1667 enum TT_MS_LANGID_FRENCH_MONACO = 0x180c;
1668 enum TT_MS_LANGID_FRENCH_WEST_INDIES = 0x1c0c;
1669 enum TT_MS_LANGID_FRENCH_REUNION = 0x200c;
1670 enum TT_MS_LANGID_FRENCH_CONGO = 0x240c;
1671 enum TT_MS_LANGID_FRENCH_ZAIRE = TT_MS_LANGID_FRENCH_CONGO;
1672 enum TT_MS_LANGID_FRENCH_SENEGAL = 0x280c;
1673 enum TT_MS_LANGID_FRENCH_CAMEROON = 0x2c0c;
1674 enum TT_MS_LANGID_FRENCH_COTE_D_IVOIRE = 0x300c;
1675 enum TT_MS_LANGID_FRENCH_MALI = 0x340c;
1676 enum TT_MS_LANGID_FRENCH_MOROCCO = 0x380c;
1677 enum TT_MS_LANGID_FRENCH_HAITI = 0x3c0c;
1678 enum TT_MS_LANGID_FRENCH_NORTH_AFRICA = 0xE40cU;
1679 enum TT_MS_LANGID_HEBREW_ISRAEL = 0x040d;
1680 enum TT_MS_LANGID_HUNGARIAN_HUNGARY = 0x040e;
1681 enum TT_MS_LANGID_ICELANDIC_ICELAND = 0x040f;
1682 enum TT_MS_LANGID_ITALIAN_ITALY = 0x0410;
1683 enum TT_MS_LANGID_ITALIAN_SWITZERLAND = 0x0810;
1684 enum TT_MS_LANGID_JAPANESE_JAPAN = 0x0411;
1685 enum TT_MS_LANGID_KOREAN_EXTENDED_WANSUNG_KOREA = 0x0412;
1686 enum TT_MS_LANGID_KOREAN_JOHAB_KOREA = 0x0812;
1687 enum TT_MS_LANGID_DUTCH_NETHERLANDS = 0x0413;
1688 enum TT_MS_LANGID_DUTCH_BELGIUM = 0x0813;
1689 enum TT_MS_LANGID_NORWEGIAN_NORWAY_BOKMAL = 0x0414;
1690 enum TT_MS_LANGID_NORWEGIAN_NORWAY_NYNORSK = 0x0814;
1691 enum TT_MS_LANGID_POLISH_POLAND = 0x0415;
1692 enum TT_MS_LANGID_PORTUGUESE_BRAZIL = 0x0416;
1693 enum TT_MS_LANGID_PORTUGUESE_PORTUGAL = 0x0816;
1694 enum TT_MS_LANGID_RHAETO_ROMANIC_SWITZERLAND = 0x0417;
1695 enum TT_MS_LANGID_ROMANIAN_ROMANIA = 0x0418;
1696 enum TT_MS_LANGID_MOLDAVIAN_MOLDAVIA = 0x0818;
1697 enum TT_MS_LANGID_RUSSIAN_RUSSIA = 0x0419;
1698 enum TT_MS_LANGID_RUSSIAN_MOLDAVIA = 0x0819;
1699 enum TT_MS_LANGID_CROATIAN_CROATIA = 0x041a;
1700 enum TT_MS_LANGID_SERBIAN_SERBIA_LATIN = 0x081a;
1701 enum TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC = 0x0c1a;
1702 enum TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA = 0x101a;
1703 enum TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA = 0x141a;
1704 enum TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN = 0x181a;
1705 enum TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC = 0x181a;
1706 enum TT_MS_LANGID_SLOVAK_SLOVAKIA = 0x041b;
1707 enum TT_MS_LANGID_ALBANIAN_ALBANIA = 0x041c;
1708 enum TT_MS_LANGID_SWEDISH_SWEDEN = 0x041d;
1709 enum TT_MS_LANGID_SWEDISH_FINLAND = 0x081d;
1710 enum TT_MS_LANGID_THAI_THAILAND = 0x041e;
1711 enum TT_MS_LANGID_TURKISH_TURKEY = 0x041f;
1712 enum TT_MS_LANGID_URDU_PAKISTAN = 0x0420;
1713 enum TT_MS_LANGID_URDU_INDIA = 0x0820;
1714 enum TT_MS_LANGID_INDONESIAN_INDONESIA = 0x0421;
1715 enum TT_MS_LANGID_UKRAINIAN_UKRAINE = 0x0422;
1716 enum TT_MS_LANGID_BELARUSIAN_BELARUS = 0x0423;
1717 enum TT_MS_LANGID_SLOVENE_SLOVENIA = 0x0424;
1718 enum TT_MS_LANGID_ESTONIAN_ESTONIA = 0x0425;
1719 enum TT_MS_LANGID_LATVIAN_LATVIA = 0x0426;
1720 enum TT_MS_LANGID_LITHUANIAN_LITHUANIA = 0x0427;
1721 enum TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA = 0x0827;
1722 enum TT_MS_LANGID_TAJIK_TAJIKISTAN = 0x0428;
1723 enum TT_MS_LANGID_FARSI_IRAN = 0x0429;
1724 enum TT_MS_LANGID_VIETNAMESE_VIET_NAM = 0x042a;
1725 enum TT_MS_LANGID_ARMENIAN_ARMENIA = 0x042b;
1726 enum TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN = 0x042c;
1727 enum TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC = 0x082c;
1728 enum TT_MS_LANGID_BASQUE_SPAIN = 0x042d;
1729 enum TT_MS_LANGID_SORBIAN_GERMANY = 0x042e;
1730 enum TT_MS_LANGID_MACEDONIAN_MACEDONIA = 0x042f;
1731 enum TT_MS_LANGID_SUTU_SOUTH_AFRICA = 0x0430;
1732 enum TT_MS_LANGID_TSONGA_SOUTH_AFRICA = 0x0431;
1733 enum TT_MS_LANGID_TSWANA_SOUTH_AFRICA = 0x0432;
1734 enum TT_MS_LANGID_VENDA_SOUTH_AFRICA = 0x0433;
1735 enum TT_MS_LANGID_XHOSA_SOUTH_AFRICA = 0x0434;
1736 enum TT_MS_LANGID_ZULU_SOUTH_AFRICA = 0x0435;
1737 enum TT_MS_LANGID_AFRIKAANS_SOUTH_AFRICA = 0x0436;
1738 enum TT_MS_LANGID_GEORGIAN_GEORGIA = 0x0437;
1739 enum TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS = 0x0438;
1740 enum TT_MS_LANGID_HINDI_INDIA = 0x0439;
1741 enum TT_MS_LANGID_MALTESE_MALTA = 0x043a;
1742 enum TT_MS_LANGID_SAMI_NORTHERN_NORWAY = 0x043b;
1743 enum TT_MS_LANGID_SAMI_NORTHERN_SWEDEN = 0x083b;
1744 enum TT_MS_LANGID_SAMI_NORTHERN_FINLAND = 0x0C3b;
1745 enum TT_MS_LANGID_SAMI_LULE_NORWAY = 0x103b;
1746 enum TT_MS_LANGID_SAMI_LULE_SWEDEN = 0x143b;
1747 enum TT_MS_LANGID_SAMI_SOUTHERN_NORWAY = 0x183b;
1748 enum TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN = 0x1C3b;
1749 enum TT_MS_LANGID_SAMI_SKOLT_FINLAND = 0x203b;
1750 enum TT_MS_LANGID_SAMI_INARI_FINLAND = 0x243b;
1751 enum TT_MS_LANGID_SAAMI_LAPONIA = 0x043b;
1752 enum TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM = 0x083c;
1753 enum TT_MS_LANGID_IRISH_GAELIC_IRELAND = 0x043c;
1754 enum TT_MS_LANGID_YIDDISH_GERMANY = 0x043d;
1755 enum TT_MS_LANGID_MALAY_MALAYSIA = 0x043e;
1756 enum TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM = 0x083e;
1757 enum TT_MS_LANGID_KAZAK_KAZAKSTAN = 0x043f;
1758 enum TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN = 0x0440;
1759 enum TT_MS_LANGID_KIRGHIZ_KIRGHIZ_REPUBLIC = TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN;
1760 enum TT_MS_LANGID_SWAHILI_KENYA = 0x0441;
1761 enum TT_MS_LANGID_TURKMEN_TURKMENISTAN = 0x0442;
1762 enum TT_MS_LANGID_UZBEK_UZBEKISTAN_LATIN = 0x0443;
1763 enum TT_MS_LANGID_UZBEK_UZBEKISTAN_CYRILLIC = 0x0843;
1764 enum TT_MS_LANGID_TATAR_TATARSTAN = 0x0444;
1765 enum TT_MS_LANGID_BENGALI_INDIA = 0x0445;
1766 enum TT_MS_LANGID_BENGALI_BANGLADESH = 0x0845;
1767 enum TT_MS_LANGID_PUNJABI_INDIA = 0x0446;
1768 enum TT_MS_LANGID_PUNJABI_ARABIC_PAKISTAN = 0x0846;
1769 enum TT_MS_LANGID_GUJARATI_INDIA = 0x0447;
1770 enum TT_MS_LANGID_ORIYA_INDIA = 0x0448;
1771 enum TT_MS_LANGID_TAMIL_INDIA = 0x0449;
1772 enum TT_MS_LANGID_TELUGU_INDIA = 0x044a;
1773 enum TT_MS_LANGID_KANNADA_INDIA = 0x044b;
1774 enum TT_MS_LANGID_MALAYALAM_INDIA = 0x044c;
1775 enum TT_MS_LANGID_ASSAMESE_INDIA = 0x044d;
1776 enum TT_MS_LANGID_MARATHI_INDIA = 0x044e;
1777 enum TT_MS_LANGID_SANSKRIT_INDIA = 0x044f;
1778 enum TT_MS_LANGID_MONGOLIAN_MONGOLIA = 0x0450;
1779 enum TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN = 0x0850;
1780 enum TT_MS_LANGID_TIBETAN_CHINA = 0x0451;
1781 enum TT_MS_LANGID_DZONGHKA_BHUTAN = 0x0851;
1782 enum TT_MS_LANGID_TIBETAN_BHUTAN = TT_MS_LANGID_DZONGHKA_BHUTAN;
1783 enum TT_MS_LANGID_WELSH_WALES = 0x0452;
1784 enum TT_MS_LANGID_KHMER_CAMBODIA = 0x0453;
1785 enum TT_MS_LANGID_LAO_LAOS = 0x0454;
1786 enum TT_MS_LANGID_BURMESE_MYANMAR = 0x0455;
1787 enum TT_MS_LANGID_GALICIAN_SPAIN = 0x0456;
1788 enum TT_MS_LANGID_KONKANI_INDIA = 0x0457;
1789 enum TT_MS_LANGID_MANIPURI_INDIA = 0x0458;
1790 enum TT_MS_LANGID_SINDHI_INDIA = 0x0459;
1791 enum TT_MS_LANGID_SINDHI_PAKISTAN = 0x0859;
1792 enum TT_MS_LANGID_SYRIAC_SYRIA = 0x045a;
1793 enum TT_MS_LANGID_SINHALESE_SRI_LANKA = 0x045b;
1794 enum TT_MS_LANGID_CHEROKEE_UNITED_STATES = 0x045c;
1795 enum TT_MS_LANGID_INUKTITUT_CANADA = 0x045d;
1796 enum TT_MS_LANGID_AMHARIC_ETHIOPIA = 0x045e;
1797 enum TT_MS_LANGID_TAMAZIGHT_MOROCCO = 0x045f;
1798 enum TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN = 0x085f;
1799 enum TT_MS_LANGID_KASHMIRI_PAKISTAN = 0x0460;
1800 enum TT_MS_LANGID_KASHMIRI_SASIA = 0x0860;
1801 enum TT_MS_LANGID_KASHMIRI_INDIA = TT_MS_LANGID_KASHMIRI_SASIA;
1802 enum TT_MS_LANGID_NEPALI_NEPAL = 0x0461;
1803 enum TT_MS_LANGID_NEPALI_INDIA = 0x0861;
1804 enum TT_MS_LANGID_FRISIAN_NETHERLANDS = 0x0462;
1805 enum TT_MS_LANGID_PASHTO_AFGHANISTAN = 0x0463;
1806 enum TT_MS_LANGID_FILIPINO_PHILIPPINES = 0x0464;
1807 enum TT_MS_LANGID_DHIVEHI_MALDIVES = 0x0465;
1808 enum TT_MS_LANGID_DIVEHI_MALDIVES = TT_MS_LANGID_DHIVEHI_MALDIVES;
1809 enum TT_MS_LANGID_EDO_NIGERIA = 0x0466;
1810 enum TT_MS_LANGID_FULFULDE_NIGERIA = 0x0467;
1811 enum TT_MS_LANGID_HAUSA_NIGERIA = 0x0468;
1812 enum TT_MS_LANGID_IBIBIO_NIGERIA = 0x0469;
1813 enum TT_MS_LANGID_YORUBA_NIGERIA = 0x046a;
1814 enum TT_MS_LANGID_QUECHUA_BOLIVIA = 0x046b;
1815 enum TT_MS_LANGID_QUECHUA_ECUADOR = 0x086b;
1816 enum TT_MS_LANGID_QUECHUA_PERU = 0x0c6b;
1817 enum TT_MS_LANGID_SEPEDI_SOUTH_AFRICA = 0x046c;
1818 enum TT_MS_LANGID_SOTHO_SOUTHERN_SOUTH_AFRICA = TT_MS_LANGID_SEPEDI_SOUTH_AFRICA;
1819 enum TT_MS_LANGID_IGBO_NIGERIA = 0x0470;
1820 enum TT_MS_LANGID_KANURI_NIGERIA = 0x0471;
1821 enum TT_MS_LANGID_OROMO_ETHIOPIA = 0x0472;
1822 enum TT_MS_LANGID_TIGRIGNA_ETHIOPIA = 0x0473;
1823 enum TT_MS_LANGID_TIGRIGNA_ERYTHREA = 0x0873;
1824 enum TT_MS_LANGID_TIGRIGNA_ERYTREA = TT_MS_LANGID_TIGRIGNA_ERYTHREA;
1825 enum TT_MS_LANGID_GUARANI_PARAGUAY = 0x0474;
1826 enum TT_MS_LANGID_HAWAIIAN_UNITED_STATES = 0x0475;
1827 enum TT_MS_LANGID_LATIN = 0x0476;
1828 enum TT_MS_LANGID_SOMALI_SOMALIA = 0x0477;
1829 enum TT_MS_LANGID_YI_CHINA = 0x0478;
1830 enum TT_MS_LANGID_PAPIAMENTU_NETHERLANDS_ANTILLES = 0x0479;
1831 enum TT_MS_LANGID_UIGHUR_CHINA = 0x0480;
1832 enum TT_MS_LANGID_MAORI_NEW_ZEALAND = 0x0481;
1834 enum TT_NAME_ID_COPYRIGHT = 0;
1835 enum TT_NAME_ID_FONT_FAMILY = 1;
1836 enum TT_NAME_ID_FONT_SUBFAMILY = 2;
1837 enum TT_NAME_ID_UNIQUE_ID = 3;
1838 enum TT_NAME_ID_FULL_NAME = 4;
1839 enum TT_NAME_ID_VERSION_STRING = 5;
1840 enum TT_NAME_ID_PS_NAME = 6;
1841 enum TT_NAME_ID_TRADEMARK = 7;
1842 enum TT_NAME_ID_MANUFACTURER = 8;
1843 enum TT_NAME_ID_DESIGNER = 9;
1844 enum TT_NAME_ID_DESCRIPTION = 10;
1845 enum TT_NAME_ID_VENDOR_URL = 11;
1846 enum TT_NAME_ID_DESIGNER_URL = 12;
1847 enum TT_NAME_ID_LICENSE = 13;
1848 enum TT_NAME_ID_LICENSE_URL = 14;
1849 enum TT_NAME_ID_PREFERRED_FAMILY = 16;
1850 enum TT_NAME_ID_PREFERRED_SUBFAMILY = 17;
1851 enum TT_NAME_ID_MAC_FULL_NAME = 18;
1852 enum TT_NAME_ID_SAMPLE_TEXT = 19;
1853 enum TT_NAME_ID_CID_FINDFONT_NAME = 20;
1854 enum TT_NAME_ID_WWS_FAMILY = 21;
1855 enum TT_NAME_ID_WWS_SUBFAMILY = 22;
1857 enum TT_UCR_BASIC_LATIN = 1U<<0;
1858 enum TT_UCR_LATIN1_SUPPLEMENT = 1U<<1;
1859 enum TT_UCR_LATIN_EXTENDED_A = 1U<<2;
1860 enum TT_UCR_LATIN_EXTENDED_B = 1U<<3;
1861 enum TT_UCR_IPA_EXTENSIONS = 1U<<4;
1862 enum TT_UCR_SPACING_MODIFIER = 1U<<5;
1863 enum TT_UCR_COMBINING_DIACRITICS = 1U<<6;
1864 enum TT_UCR_GREEK = 1U<<7;
1865 enum TT_UCR_COPTIC = 1U<<8;
1866 enum TT_UCR_CYRILLIC = 1U<<9;
1867 enum TT_UCR_ARMENIAN = 1U<<10;
1868 enum TT_UCR_HEBREW = 1U<<11;
1869 enum TT_UCR_VAI = 1U<<12;
1870 enum TT_UCR_ARABIC = 1U<<13;
1871 enum TT_UCR_NKO = 1U<<14;
1872 enum TT_UCR_DEVANAGARI = 1U<<15;
1873 enum TT_UCR_BENGALI = 1U<<16;
1874 enum TT_UCR_GURMUKHI = 1U<<17;
1875 enum TT_UCR_GUJARATI = 1U<<18;
1876 enum TT_UCR_ORIYA = 1U<<19;
1877 enum TT_UCR_TAMIL = 1U<<20;
1878 enum TT_UCR_TELUGU = 1U<<21;
1879 enum TT_UCR_KANNADA = 1U<<22;
1880 enum TT_UCR_MALAYALAM = 1U<<23;
1881 enum TT_UCR_THAI = 1U<<24;
1882 enum TT_UCR_LAO = 1U<<25;
1883 enum TT_UCR_GEORGIAN = 1U<<26;
1884 enum TT_UCR_BALINESE = 1U<<27;
1885 enum TT_UCR_HANGUL_JAMO = 1U<<28;
1886 enum TT_UCR_LATIN_EXTENDED_ADDITIONAL = 1U<<29;
1887 enum TT_UCR_GREEK_EXTENDED = 1U<<30;
1888 enum TT_UCR_SUPERSCRIPTS_SUBSCRIPTS = 1U<<0;
1889 enum TT_UCR_CURRENCY_SYMBOLS = 1U<<1;
1890 enum TT_UCR_COMBINING_DIACRITICS_SYMB = 1U<<2;
1891 enum TT_UCR_LETTERLIKE_SYMBOLS = 1U<<3;
1892 enum TT_UCR_NUMBER_FORMS = 1U<<4;
1893 enum TT_UCR_ARROWS = 1U<<5;
1894 enum TT_UCR_MATHEMATICAL_OPERATORS = 1U<<6;
1895 enum TT_UCR_MISCELLANEOUS_TECHNICAL = 1U<<7;
1896 enum TT_UCR_CONTROL_PICTURES = 1U<<8;
1897 enum TT_UCR_OCR = 1U<<9;
1898 enum TT_UCR_ENCLOSED_ALPHANUMERICS = 1U<<10;
1899 enum TT_UCR_BOX_DRAWING = 1U<<11;
1900 enum TT_UCR_BLOCK_ELEMENTS = 1U<<12;
1901 enum TT_UCR_GEOMETRIC_SHAPES = 1U<<13;
1902 enum TT_UCR_MISCELLANEOUS_SYMBOLS = 1U<<14;
1903 enum TT_UCR_DINGBATS = 1U<<15;
1904 enum TT_UCR_CJK_SYMBOLS = 1U<<16;
1905 enum TT_UCR_HIRAGANA = 1U<<17;
1906 enum TT_UCR_KATAKANA = 1U<<18;
1907 enum TT_UCR_BOPOMOFO = 1U<<19;
1908 enum TT_UCR_HANGUL_COMPATIBILITY_JAMO = 1U<<20;
1909 enum TT_UCR_CJK_MISC = 1U<<21;
1910 enum TT_UCR_ENCLOSED_CJK_LETTERS_MONTHS = 1U<<22;
1911 enum TT_UCR_CJK_COMPATIBILITY = 1U<<23;
1912 enum TT_UCR_HANGUL = 1U<<24;
1913 enum TT_UCR_SURROGATES = 1U<<25;
1914 enum TT_UCR_NON_PLANE_0 = TT_UCR_SURROGATES;
1915 enum TT_UCR_PHOENICIAN = 1U<<26;
1916 enum TT_UCR_CJK_UNIFIED_IDEOGRAPHS = 1U<<27;
1917 enum TT_UCR_PRIVATE_USE = 1U<<28;
1918 enum TT_UCR_CJK_COMPATIBILITY_IDEOGRAPHS = 1U<<29;
1919 enum TT_UCR_ALPHABETIC_PRESENTATION_FORMS = 1U<<30;
1920 enum TT_UCR_ARABIC_PRESENTATIONS_A = 1U<<31;
1921 enum TT_UCR_COMBINING_HALF_MARKS = 1U<<0;
1922 enum TT_UCR_CJK_COMPATIBILITY_FORMS = 1U<<1;
1923 enum TT_UCR_SMALL_FORM_VARIANTS = 1U<<2;
1924 enum TT_UCR_ARABIC_PRESENTATIONS_B = 1U<<3;
1925 enum TT_UCR_HALFWIDTH_FULLWIDTH_FORMS = 1U<<4;
1926 enum TT_UCR_SPECIALS = 1U<<5;
1927 enum TT_UCR_TIBETAN = 1U<<6;
1928 enum TT_UCR_SYRIAC = 1U<<7;
1929 enum TT_UCR_THAANA = 1U<<8;
1930 enum TT_UCR_SINHALA = 1U<<9;
1931 enum TT_UCR_MYANMAR = 1U<<10;
1932 enum TT_UCR_ETHIOPIC = 1U<<11;
1933 enum TT_UCR_CHEROKEE = 1U<<12;
1934 enum TT_UCR_CANADIAN_ABORIGINAL_SYLLABICS = 1U<<13;
1935 enum TT_UCR_OGHAM = 1U<<14;
1936 enum TT_UCR_RUNIC = 1U<<15;
1937 enum TT_UCR_KHMER = 1U<<16;
1938 enum TT_UCR_MONGOLIAN = 1U<<17;
1939 enum TT_UCR_BRAILLE = 1U<<18;
1940 enum TT_UCR_YI = 1U<<19;
1941 enum TT_UCR_PHILIPPINE = 1U<<20;
1942 enum TT_UCR_OLD_ITALIC = 1U<<21;
1943 enum TT_UCR_GOTHIC = 1U<<22;
1944 enum TT_UCR_DESERET = 1U<<23;
1945 enum TT_UCR_MUSICAL_SYMBOLS = 1U<<24;
1946 enum TT_UCR_MATH_ALPHANUMERIC_SYMBOLS = 1U<<25;
1947 enum TT_UCR_PRIVATE_USE_SUPPLEMENTARY = 1U<<26;
1948 enum TT_UCR_VARIATION_SELECTORS = 1U<<27;
1949 enum TT_UCR_TAGS = 1U<<28;
1950 enum TT_UCR_LIMBU = 1U<<29;
1951 enum TT_UCR_TAI_LE = 1U<<30;
1952 enum TT_UCR_NEW_TAI_LUE = 1U<<31;
1953 enum TT_UCR_BUGINESE = 1U<<0;
1954 enum TT_UCR_GLAGOLITIC = 1U<<1;
1955 enum TT_UCR_TIFINAGH = 1U<<2;
1956 enum TT_UCR_YIJING = 1U<<3;
1957 enum TT_UCR_SYLOTI_NAGRI = 1U<<4;
1958 enum TT_UCR_LINEAR_B = 1U<<5;
1959 enum TT_UCR_ANCIENT_GREEK_NUMBERS = 1U<<6;
1960 enum TT_UCR_UGARITIC = 1U<<7;
1961 enum TT_UCR_OLD_PERSIAN = 1U<<8;
1962 enum TT_UCR_SHAVIAN = 1U<<9;
1963 enum TT_UCR_OSMANYA = 1U<<10;
1964 enum TT_UCR_CYPRIOT_SYLLABARY = 1U<<11;
1965 enum TT_UCR_KHAROSHTHI = 1U<<12;
1966 enum TT_UCR_TAI_XUAN_JING = 1U<<13;
1967 enum TT_UCR_CUNEIFORM = 1U<<14;
1968 enum TT_UCR_COUNTING_ROD_NUMERALS = 1U<<15;
1969 enum TT_UCR_SUNDANESE = 1U<<16;
1970 enum TT_UCR_LEPCHA = 1U<<17;
1971 enum TT_UCR_OL_CHIKI = 1U<<18;
1972 enum TT_UCR_SAURASHTRA = 1U<<19;
1973 enum TT_UCR_KAYAH_LI = 1U<<20;
1974 enum TT_UCR_REJANG = 1U<<21;
1975 enum TT_UCR_CHAM = 1U<<22;
1976 enum TT_UCR_ANCIENT_SYMBOLS = 1U<<23;
1977 enum TT_UCR_PHAISTOS_DISC = 1U<<24;
1978 enum TT_UCR_OLD_ANATOLIAN = 1U<<25;
1979 enum TT_UCR_GAME_TILES = 1U<<26;
1981 // tttables.h
1982 struct TT_Header {
1983 FT_Fixed Table_Version;
1984 FT_Fixed Font_Revision;
1985 FT_Long CheckSum_Adjust;
1986 FT_Long Magic_Number;
1987 FT_UShort Flags;
1988 FT_UShort Units_Per_EM;
1989 FT_Long[2] Created;
1990 FT_Long[2] Modified;
1991 FT_Short xMin;
1992 FT_Short yMin;
1993 FT_Short xMax;
1994 FT_Short yMax;
1995 FT_UShort Mac_Style;
1996 FT_UShort Lowest_Rec_PPEM;
1997 FT_Short Font_Direction;
1998 FT_Short Index_To_Loc_Format;
1999 FT_Short Glyph_Data_Format;
2002 struct TT_HoriHeader {
2003 FT_Fixed Version;
2004 FT_Short Ascender;
2005 FT_Short Descender;
2006 FT_Short Line_Gap;
2007 FT_UShort advance_Width_Max;
2008 FT_Short min_Left_Side_Bearing;
2009 FT_Short min_Right_Side_Bearing;
2010 FT_Short xMax_Extent;
2011 FT_Short caret_Slope_Rise;
2012 FT_Short caret_Slope_Run;
2013 FT_Short caret_Offset;
2014 FT_Short[4] Reserved;
2015 FT_Short metric_Data_Format;
2016 FT_UShort number_Of_HMetrics;
2017 void* long_metrics;
2018 void* short_metrics;
2021 struct TT_VertHeader {
2022 FT_Fixed Version;
2023 FT_Short Ascender;
2024 FT_Short Descender;
2025 FT_Short Line_Gap;
2026 FT_UShort advance_Height_Max;
2027 FT_Short min_Top_Side_Bearing;
2028 FT_Short min_Bottom_Side_Bearing;
2029 FT_Short yMax_Extent;
2030 FT_Short caret_Slope_Rise;
2031 FT_Short caret_Slope_Run;
2032 FT_Short caret_Offset;
2033 FT_Short[4] Reserved;
2034 FT_Short metric_Data_Format;
2035 FT_UShort number_Of_VMetrics;
2036 void* long_metrics;
2037 void* short_metrics;
2040 struct TT_OS2 {
2041 FT_UShort _version;
2042 FT_Short xAvgCharWidth;
2043 FT_UShort usWeightClass;
2044 FT_UShort usWidthClass;
2045 FT_UShort fsType;
2046 FT_Short ySubscriptXSize;
2047 FT_Short ySubscriptYSize;
2048 FT_Short ySubscriptXOffset;
2049 FT_Short ySubscriptYOffset;
2050 FT_Short ySuperscriptXSize;
2051 FT_Short ySuperscriptYSize;
2052 FT_Short ySuperscriptXOffset;
2053 FT_Short ySuperscriptYOffset;
2054 FT_Short yStrikeoutSize;
2055 FT_Short yStrikeoutPosition;
2056 FT_Short sFamilyClass;
2057 FT_Byte[10] panose;
2058 FT_ULong ulUnicodeRange1;
2059 FT_ULong ulUnicodeRange2;
2060 FT_ULong ulUnicodeRange3;
2061 FT_ULong ulUnicodeRange4;
2062 FT_Char[4] achVendID;
2063 FT_UShort fsSelection;
2064 FT_UShort usFirstCharIndex;
2065 FT_UShort usLastCharIndex;
2066 FT_Short sTypoAscender;
2067 FT_Short sTypoDescender;
2068 FT_Short sTypoLineGap;
2069 FT_UShort usWinAscent;
2070 FT_UShort usWinDescent;
2071 FT_ULong ulCodePageRange1;
2072 FT_ULong ulCodePageRange2;
2073 FT_Short sxHeight;
2074 FT_Short sCapHeight;
2075 FT_UShort usDefaultChar;
2076 FT_UShort usBreakChar;
2077 FT_UShort usMaxContext;
2078 FT_UShort usLowerOpticalPointSize;
2079 FT_UShort usUpperOpticalPointSize;
2082 struct TT_Postscript {
2083 FT_Fixed FormatType;
2084 FT_Fixed italicAngle;
2085 FT_Short underlinePosition;
2086 FT_Short underlineThickness;
2087 FT_ULong isFixedPitch;
2088 FT_ULong minMemType42;
2089 FT_ULong maxMemType42;
2090 FT_ULong minMemType1;
2091 FT_ULong maxMemType1;
2094 struct TT_PCLT {
2095 FT_Fixed Version;
2096 FT_ULong FontNumber;
2097 FT_UShort Pitch;
2098 FT_UShort xHeight;
2099 FT_UShort Style;
2100 FT_UShort TypeFamily;
2101 FT_UShort CapHeight;
2102 FT_UShort SymbolSet;
2103 FT_Char[16] TypeFace;
2104 FT_Char[8] CharacterComplement;
2105 FT_Char[6] FileName;
2106 FT_Char StrokeWeight;
2107 FT_Char WidthType;
2108 FT_Byte SerifStyle;
2109 FT_Byte Reserved;
2112 struct TT_MaxProfile {
2113 FT_Fixed _version;
2114 FT_UShort numGlyphs;
2115 FT_UShort maxPoints;
2116 FT_UShort maxContours;
2117 FT_UShort maxCompositePoints;
2118 FT_UShort maxCompositeContours;
2119 FT_UShort maxZones;
2120 FT_UShort maxTwilightPoints;
2121 FT_UShort maxStorage;
2122 FT_UShort maxFunctionDefs;
2123 FT_UShort maxInstructionDefs;
2124 FT_UShort maxStackElements;
2125 FT_UShort maxSizeOfInstructions;
2126 FT_UShort maxComponentElements;
2127 FT_UShort maxComponentDepth;
2130 alias FT_Sfnt_Tag = int;
2131 enum {
2132 FT_SFNT_HEAD,
2133 FT_SFNT_MAXP,
2134 FT_SFNT_OS2,
2135 FT_SFNT_HHEA,
2136 FT_SFNT_VHEA,
2137 FT_SFNT_POST,
2138 FT_SFNT_PCLT,
2139 FT_SFNT_MAX
2143 @nogc {
2144 FT_Error FT_Init_FreeType (FT_Library*);
2145 FT_Error FT_Done_FreeType (FT_Library);
2146 FT_Error FT_New_Face (FT_Library, const(char)*, FT_Long, FT_Face*);
2147 FT_Error FT_New_Memory_Face (FT_Library, const(FT_Byte)*, FT_Long, FT_Long, FT_Face*);
2148 FT_Error FT_Open_Face (FT_Library, const(FT_Open_Args)*, FT_Long, FT_Face*);
2149 FT_Error FT_Attach_File (FT_Face, const(char)*);
2150 FT_Error FT_Attach_Stream (FT_Face, FT_Open_Args*);
2151 FT_Error FT_Reference_Face (FT_Face);
2152 FT_Error FT_Done_Face (FT_Face);
2153 FT_Error FT_Select_Size (FT_Face, FT_Int);
2154 FT_Error FT_Request_Size (FT_Face, FT_Size_Request);
2155 FT_Error FT_Set_Char_Size (FT_Face, FT_F26Dot6, FT_F26Dot6, FT_UInt, FT_UInt);
2156 FT_Error FT_Set_Pixel_Sizes (FT_Face, FT_UInt, FT_UInt);
2157 FT_Error FT_Load_Glyph (FT_Face, FT_UInt, FT_Int32);
2158 FT_Error FT_Load_Char (FT_Face, FT_ULong, FT_Int32);
2159 void FT_Set_Transform (FT_Face, FT_Matrix*, FT_Vector*);
2160 FT_Error FT_Render_Glyph (FT_GlyphSlot, FT_Render_Mode);
2161 FT_Error FT_Get_Kerning (FT_Face, FT_UInt, FT_UInt, FT_UInt, FT_Vector*);
2162 FT_Error FT_Get_Track_Kerning (FT_Face, FT_Fixed, FT_Int, FT_Fixed*);
2163 FT_Error FT_Get_Glyph_Name (FT_Face, FT_UInt, FT_Pointer, FT_UInt);
2164 const(char)* FT_Get_Postscript_Name (FT_Face);
2165 FT_Error FT_Select_Charmap (FT_Face, FT_Encoding);
2166 FT_Error FT_Set_Charmap (FT_Face, FT_CharMap);
2167 FT_Int FT_Get_Charmap_Index (FT_CharMap);
2168 FT_UInt FT_Get_Char_Index (FT_Face, FT_ULong);
2169 FT_ULong FT_Get_First_Char (FT_Face, FT_UInt*);
2170 FT_ULong FT_Get_Next_Char (FT_Face, FT_ULong, FT_UInt*);
2171 FT_UInt FT_Get_Name_Index (FT_Face, FT_String*);
2172 FT_Error FT_Get_SubGlyph_Info (FT_GlyphSlot, FT_UInt, FT_Int*, FT_UInt*, FT_Int*, FT_Int*, FT_Matrix*);
2173 FT_UShort FT_Get_FSType_Flags (FT_Face);
2174 FT_UInt FT_Face_GetCharVariantIndex (FT_Face, FT_ULong, FT_ULong);
2175 FT_Int FT_Face_GetCharVariantIsDefault (FT_Face, FT_ULong, FT_ULong);
2176 FT_UInt32* FT_Face_GetVariantSelectors (FT_Face);
2177 FT_UInt32* FT_Face_GetVariantsOfChar (FT_Face, FT_ULong);
2178 FT_UInt32* FT_Face_GetCharsOfVariant (FT_Face, FT_ULong);
2179 FT_Long FT_MulDiv (FT_Long, FT_Long, FT_Long);
2180 FT_Long FT_MulFix (FT_Long, FT_Long);
2181 FT_Long FT_DivFix (FT_Long, FT_Long);
2182 FT_Fixed FT_RoundFix (FT_Fixed);
2183 FT_Fixed FT_CeilFix (FT_Fixed);
2184 FT_Fixed FT_FloorFix (FT_Fixed);
2185 void FT_Vector_Transform (FT_Vector*, FT_Matrix*);
2186 void FT_Library_Version (FT_Library, FT_Int*, FT_Int*, FT_Int*);
2187 FT_Bool FT_Face_CheckTrueTypePatents (FT_Face);
2188 FT_Bool FT_Face_SetUnpatentedHinting (FT_Face, FT_Bool);
2190 // ftadvanc.h
2191 FT_Error FT_Get_Advance (FT_Face, FT_UInt, FT_Int32, FT_Fixed*);
2192 FT_Error FT_Get_Advances (FT_Face, FT_UInt, FT_UInt, FT_Int32, FT_Fixed*);
2194 // ftbbox.h
2195 FT_Error FT_Outline_Get_BBox (FT_Outline*, FT_BBox);
2197 // ftbdf.h
2198 version(linux) {
2199 FT_Error FT_Get_BDF_Charset_ID (FT_Face, const(char)** acharset_encoding, const(char)** acharset_registry);
2200 FT_Error FT_Get_BDF_Property (FT_Face, const(char)*, BDF_PropertyRec*);
2203 // ftbitmap.h
2204 void FT_Bitmap_Init (FT_Bitmap*);
2205 FT_Error FT_Bitmap_Copy (FT_Library, const(FT_Bitmap)*, FT_Bitmap*);
2206 FT_Error FT_Bitmap_Embolden (FT_Library, FT_Bitmap*, FT_Pos, FT_Pos);
2207 FT_Error FT_Bitmap_Convert (FT_Library, const(FT_Bitmap)*, FT_Bitmap*, FT_Int);
2208 FT_Error FT_GlyphSlot_Own_Bitmap (FT_GlyphSlot);
2209 FT_Error FT_Bitmap_Done (FT_Library, FT_Bitmap*);
2211 // ftbzip2.h
2212 FT_Error FT_Stream_OpenBzip2 (FT_Stream, FT_Stream);
2213 } // @nogc
2215 // ftcache.h
2216 FT_Error FTC_Manager_New (FT_Library, FT_UInt, FT_UInt, FT_ULong, FTC_Face_Requester, FT_Pointer, FTC_Manager*); //!!!
2217 @nogc {
2218 void FTC_Manager_Reset (FTC_Manager);
2219 void FTC_Manager_Done (FTC_Manager);
2220 FT_Error FTC_Manager_LookupFace (FTC_Manager, FTC_FaceID, FT_Face*);
2221 FT_Error FTC_Manager_LookupSize (FTC_Manager, FTC_Scaler, FT_Size*);
2222 void FTC_Node_Unref (FTC_Node, FTC_Manager);
2223 void FTC_Manager_RemoveFaceID (FTC_Manager, FTC_FaceID);
2224 FT_Error FTC_CMapCache_New (FTC_Manager, FTC_CMapCache*);
2225 FT_UInt FTC_CMapCache_Lookup (FTC_CMapCache, FTC_FaceID, FT_Int, FT_UInt32);
2226 FT_Error FTC_ImageCache_New (FTC_Manager, FTC_ImageCache*);
2227 FT_Error FTC_ImageCache_Lookup (FTC_ImageCache, FTC_ImageType, FT_UInt, FT_Glyph*, FTC_Node*);
2228 FT_Error FTC_ImageCache_LookupScaler (FTC_ImageCache, FTC_Scaler, FT_ULong, FT_UInt, FT_Glyph*, FTC_Node*);
2229 FT_Error FTC_SBitCache_New (FTC_Manager, FTC_SBitCache*);
2230 FT_Error FTC_SBitCache_Lookup (FTC_SBitCache, FTC_ImageType, FT_UInt, FTC_SBit*, FTC_Node*);
2231 FT_Error FTC_SBitCache_LookupScaler (FTC_SBitCache, FTC_Scaler, FT_ULong, FT_UInt, FTC_SBit*, FTC_Node*);
2233 // ftcid.h
2234 FT_Error FT_Get_CID_Registry_Ordering_Supplement (FT_Face, const(char*)*, const(char*)*, FT_Int*);
2235 FT_Error FT_Get_CID_Is_Internally_CID_Keyed (FT_Face, FT_Bool*);
2236 FT_Error FT_Get_CID_From_Glyph_Index (FT_Face, FT_UInt, FT_UInt*);
2238 // ftgasp.h
2239 FT_Int FT_Get_Gasp (FT_Face, FT_UInt);
2241 // ftglyph.h
2242 FT_Error FT_Get_Glyph (FT_GlyphSlot, FT_Glyph*);
2243 FT_Error FT_Glyph_Copy (FT_Glyph, FT_Glyph*);
2244 FT_Error FT_Glyph_Transform (FT_Glyph, FT_Matrix*, FT_Vector*);
2245 void FT_Glyph_Get_CBox (FT_Glyph, FT_UInt, FT_BBox*);
2246 FT_Error FT_Glyph_To_Bitmap (FT_Glyph*, FT_Render_Mode, FT_Vector*, FT_Bool);
2247 void FT_Done_Glyph (FT_Glyph);
2248 void FT_Matrix_Multiply (const(FT_Matrix)*, FT_Matrix*);
2249 FT_Error FT_Matrix_Invert (FT_Matrix*);
2251 // ftgxval.h
2252 FT_Error FT_TrueTypeGX_Validate (FT_Face, FT_UInt, FT_Bytes, FT_UInt);
2253 void FT_TrueTypeGX_Free (FT_Face, FT_Bytes);
2254 FT_Error FT_ClassicKern_Validate (FT_Face, FT_UInt, FT_Bytes*);
2255 void FT_ClassicKern_Free (FT_Face, FT_Bytes);
2257 // ftgzip.h
2258 FT_Error FT_Stream_OpenGzip (FT_Stream, FT_Stream);
2259 FT_Error FT_Gzip_Uncompress (FT_Memory, FT_Byte*, FT_ULong*, const(FT_Byte)*, FT_ULong);
2261 // ftlcdfil.h
2262 FT_Error FT_Library_SetLcdFilter (FT_Library, FT_LcdFilter);
2263 FT_Error FT_Library_SetLcdFilterWeights (FT_Library, ubyte*);
2265 FT_ListNode FT_List_Find (FT_List, void*);
2266 void FT_List_Add (FT_List, FT_ListNode);
2267 void FT_List_Insert (FT_List, FT_ListNode);
2268 void FT_List_Remove (FT_List, FT_ListNode);
2269 void FT_List_Up (FT_List, FT_ListNode);
2270 } /// @nogc
2271 FT_Error FT_List_Iterate (FT_List, FT_List_Iterator, void*); //!!!
2272 void FT_List_Finalize (FT_List, FT_List_Destructor, FT_Memory, void*); //!!!
2274 @nogc {
2275 // ftlzw.h
2276 FT_Error FT_Stream_OpenLZW (FT_Stream, FT_Stream);
2278 // ftmm.h
2279 FT_Error FT_Get_Multi_Master (FT_Face, FT_Multi_Master*);
2280 FT_Error FT_Get_MM_Var (FT_Face, FT_MM_Var**);
2281 FT_Error FT_Set_MM_Design_Coordinates (FT_Face, FT_UInt, FT_Long*);
2282 FT_Error FT_Set_Var_Design_Coordinates (FT_Face, FT_UInt, FT_Fixed*);
2283 FT_Error FT_Set_MM_Blend_Coordinates (FT_Face, FT_UInt, FT_Fixed*);
2284 FT_Error FT_Set_Var_Blend_Coordinates (FT_Face, FT_UInt, FT_Fixed*);
2286 // ftmodapi.h
2287 FT_Error FT_Add_Module (FT_Library, const(FT_Module_Class)*);
2288 FT_Module FT_Get_Module (FT_Library, const(char)*);
2289 FT_Error FT_Remove_Module (FT_Library, FT_Module);
2290 FT_Error FT_Property_Set (FT_Library, const(FT_String)*, const(FT_String)*, const(void)*);
2291 FT_Error FT_Property_Get (FT_Library, const(FT_String)*, const(FT_String)*, void*);
2292 FT_Error FT_Reference_Library (FT_Library);
2293 FT_Error FT_New_Library (FT_Memory, FT_Library*);
2294 FT_Error FT_Done_Library (FT_Library);
2295 } // @nogc
2296 void FT_Set_Debug_Hook (FT_Library, FT_UInt, FT_DebugHook_Func); //!!!
2297 @nogc {
2298 void FT_Add_Default_Modules (FT_Library);
2299 FT_TrueTypeEngineType FT_Get_TrueType_Engine_Type (FT_Library);
2301 // ftotval.h
2302 FT_Error FT_OpenType_Validate (FT_Face, FT_UInt, FT_Bytes*, FT_Bytes*, FT_Bytes*, FT_Bytes*, FT_Bytes*);
2303 void FT_OpenType_Free (FT_Face face, FT_Bytes table);
2305 // ftoutln.h
2306 FT_Error FT_Outline_Decompose (FT_Outline*, const(FT_Outline_Funcs)*, void*);
2307 FT_Error FT_Outline_New (FT_Library, FT_UInt, FT_Int, FT_Outline*);
2308 FT_Error FT_Outline_New_Internal (FT_Memory, FT_UInt, FT_Int, FT_Outline*);
2309 FT_Error FT_Outline_Done (FT_Library, FT_Outline*);
2310 FT_Error FT_Outline_Done_Internal (FT_Memory, FT_Outline*);
2311 FT_Error FT_Outline_Check (FT_Outline*);
2312 void FT_Outline_Get_CBox (const(FT_Outline)*, FT_BBox*);
2313 void FT_Outline_Translate (const(FT_Outline)*, FT_Pos, FT_Pos);
2314 FT_Error FT_Outline_Copy (const(FT_Outline)*, FT_Outline*);
2315 void FT_Outline_Transform (const(FT_Outline)*, const(FT_Matrix)*);
2316 FT_Error FT_Outline_Embolden (FT_Outline*, FT_Pos);
2317 FT_Error FT_Outline_EmboldenXY (FT_Outline*, FT_Pos, FT_Pos);
2318 void FT_Outline_Reverse (FT_Outline*);
2319 FT_Error FT_Outline_Get_Bitmap (FT_Library, FT_Outline*, const(FT_Bitmap)*);
2320 FT_Error FT_Outline_Render (FT_Library, FT_Outline*, FT_Raster_Params*);
2321 FT_Orientation FT_Outline_Get_Orientation (FT_Outline*);
2323 // ftpfr.h
2324 FT_Error FT_Get_PFR_Metrics (FT_Face, FT_UInt*, FT_UInt*, FT_Fixed*, FT_Fixed*);
2325 FT_Error FT_Get_PFR_Kerning (FT_Face, FT_UInt, FT_UInt, FT_Vector*);
2326 FT_Error FT_Get_PFR_Advance (FT_Face, FT_UInt, FT_Pos*);
2328 // ftrender.h
2329 FT_Renderer FT_Get_Renderer (FT_Library, FT_Glyph_Format);
2330 FT_Error FT_Set_Renderer (FT_Library, FT_Renderer, FT_UInt, FT_Parameter*);
2332 // ftsizes.h
2333 FT_Error FT_New_Size (FT_Face, FT_Size*);
2334 FT_Error FT_Done_Size (FT_Size);
2335 FT_Error FT_Activate_Size (FT_Size);
2337 // ftsnames.h
2338 FT_UInt FT_Get_Sfnt_Name_Count (FT_Face);
2340 // ftstroke.h
2341 FT_StrokerBorder FT_Outline_GetInsideBorder (FT_Outline*);
2342 FT_StrokerBorder FT_Outline_GetOutsideBorder (FT_Outline*);
2343 FT_Error FT_Stroker_New (FT_Memory, FT_Stroker*);
2344 void FT_Stroker_Set (FT_Stroker, FT_Fixed, FT_Stroker_LineCap, FT_Stroker_LineJoin, FT_Fixed);
2345 void FT_Stroker_Rewind (FT_Stroker);
2346 FT_Error FT_Stroker_ParseOutline (FT_Stroker, FT_Outline*, FT_Bool);
2347 FT_Error FT_Stroker_BeginSubPath (FT_Stroker, FT_Vector*, FT_Bool);
2348 FT_Error FT_Stroker_EndSubPath (FT_Stroker);
2349 FT_Error FT_Stroker_LineTo (FT_Stroker, FT_Vector*);
2350 FT_Error FT_Stroker_ConicTo (FT_Stroker, FT_Vector*, FT_Vector*);
2351 FT_Error FT_Stroker_CubicTo (FT_Stroker, FT_Vector*, FT_Vector*, FT_Vector*);
2352 FT_Error FT_Stroker_GetBorderCounts (FT_Stroker, FT_StrokerBorder, FT_UInt*, FT_UInt*);
2353 void FT_Stroker_ExportBorder (FT_Stroker, FT_StrokerBorder, FT_Outline*);
2354 FT_Error FT_Stroker_GetCounts (FT_Stroker, FT_UInt*, FT_UInt*);
2355 void FT_Stroker_Export (FT_Stroker, FT_Outline*);
2356 void FT_Stroker_Done (FT_Stroker);
2357 FT_Error FT_Glyph_Stroke (FT_Glyph*, FT_Stroker, FT_Bool);
2358 FT_Error FT_Glyph_StrokeBorder (FT_Glyph*, FT_Stroker, FT_Bool, FT_Bool);
2360 // ftsynth.h
2361 void FT_GlyphSlot_Embolden (FT_GlyphSlot);
2362 void FT_GlyphSlot_Oblique (FT_GlyphSlot);
2364 // fttrigon.h
2365 FT_Fixed FT_Sin (FT_Angle);
2366 FT_Fixed FT_Cos (FT_Angle);
2367 FT_Fixed FT_Tan (FT_Angle);
2368 FT_Angle FT_Atan2 (FT_Fixed, FT_Fixed);
2369 FT_Angle FT_Angle_Diff (FT_Angle, FT_Angle);
2370 void FT_Vector_Unit (FT_Vector*, FT_Angle);
2371 void FT_Vector_Rotate (FT_Vector*, FT_Angle);
2372 FT_Fixed FT_Vector_Length (FT_Vector*);
2373 void FT_Vector_Polarize (FT_Vector*, FT_Fixed*, FT_Angle*);
2374 void FT_Vector_From_Polar (FT_Vector*, FT_Fixed, FT_Angle);
2376 // ftwinfnt.h
2377 FT_Error FT_Get_WinFNT_Header (FT_Face, FT_WinFNT_HeaderRec*);
2379 // ftxf86.h
2380 const(char)* FT_Get_X11_Font_Format (FT_Face);
2382 // t1tables.h
2383 FT_Int FT_Has_PS_Glyph_Names (FT_Face);
2384 FT_Error FT_Get_PS_Font_Info (FT_Face, PS_FontInfoRec*);
2385 FT_Error FT_Get_PS_Font_Private (FT_Face, PS_PrivateRec*);
2386 FT_Long FT_Get_PS_Font_Value (FT_Face, PS_Dict_Keys*, FT_UInt, FT_Long);
2388 // tttables.h
2389 void* FT_Get_Sfnt_Table (FT_Face, FT_Sfnt_Tag);
2390 FT_Error FT_Load_Sfnt_Table (FT_Face, FT_ULong, FT_Long, FT_Byte*, FT_ULong*);
2391 FT_Error FT_Sfnt_Table_Info (FT_Face, FT_UInt, FT_ULong*, FT_ULong*);
2392 FT_ULong FT_Get_CMap_Language_ID (FT_CharMap);
2393 FT_ULong FT_Get_CMap_Format (FT_CharMap);
2394 FT_Error FT_Get_Sfnt_Name (FT_Face, FT_UInt, FT_SfntName*);
2395 } // @nogc