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