vrshoot

annotate libs/ft2static/freetype/internal/tttypes.h @ 0:b2f14e535253

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 01 Feb 2014 19:58:19 +0200
parents
children
rev   line source
nuclear@0 1 /***************************************************************************/
nuclear@0 2 /* */
nuclear@0 3 /* tttypes.h */
nuclear@0 4 /* */
nuclear@0 5 /* Basic SFNT/TrueType type definitions and interface (specification */
nuclear@0 6 /* only). */
nuclear@0 7 /* */
nuclear@0 8 /* Copyright 1996-2001, 2002, 2004, 2005, 2006, 2007, 2008 by */
nuclear@0 9 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
nuclear@0 10 /* */
nuclear@0 11 /* This file is part of the FreeType project, and may only be used, */
nuclear@0 12 /* modified, and distributed under the terms of the FreeType project */
nuclear@0 13 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
nuclear@0 14 /* this file you indicate that you have read the license and */
nuclear@0 15 /* understand and accept it fully. */
nuclear@0 16 /* */
nuclear@0 17 /***************************************************************************/
nuclear@0 18
nuclear@0 19
nuclear@0 20 #ifndef __TTTYPES_H__
nuclear@0 21 #define __TTTYPES_H__
nuclear@0 22
nuclear@0 23
nuclear@0 24 #include <ft2build.h>
nuclear@0 25 #include FT_TRUETYPE_TABLES_H
nuclear@0 26 #include FT_INTERNAL_OBJECTS_H
nuclear@0 27
nuclear@0 28 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
nuclear@0 29 #include FT_MULTIPLE_MASTERS_H
nuclear@0 30 #endif
nuclear@0 31
nuclear@0 32
nuclear@0 33 FT_BEGIN_HEADER
nuclear@0 34
nuclear@0 35
nuclear@0 36 /*************************************************************************/
nuclear@0 37 /*************************************************************************/
nuclear@0 38 /*************************************************************************/
nuclear@0 39 /*** ***/
nuclear@0 40 /*** ***/
nuclear@0 41 /*** REQUIRED TRUETYPE/OPENTYPE TABLES DEFINITIONS ***/
nuclear@0 42 /*** ***/
nuclear@0 43 /*** ***/
nuclear@0 44 /*************************************************************************/
nuclear@0 45 /*************************************************************************/
nuclear@0 46 /*************************************************************************/
nuclear@0 47
nuclear@0 48
nuclear@0 49 /*************************************************************************/
nuclear@0 50 /* */
nuclear@0 51 /* <Struct> */
nuclear@0 52 /* TTC_HeaderRec */
nuclear@0 53 /* */
nuclear@0 54 /* <Description> */
nuclear@0 55 /* TrueType collection header. This table contains the offsets of */
nuclear@0 56 /* the font headers of each distinct TrueType face in the file. */
nuclear@0 57 /* */
nuclear@0 58 /* <Fields> */
nuclear@0 59 /* tag :: Must be `ttc ' to indicate a TrueType collection. */
nuclear@0 60 /* */
nuclear@0 61 /* version :: The version number. */
nuclear@0 62 /* */
nuclear@0 63 /* count :: The number of faces in the collection. The */
nuclear@0 64 /* specification says this should be an unsigned long, but */
nuclear@0 65 /* we use a signed long since we need the value -1 for */
nuclear@0 66 /* specific purposes. */
nuclear@0 67 /* */
nuclear@0 68 /* offsets :: The offsets of the font headers, one per face. */
nuclear@0 69 /* */
nuclear@0 70 typedef struct TTC_HeaderRec_
nuclear@0 71 {
nuclear@0 72 FT_ULong tag;
nuclear@0 73 FT_Fixed version;
nuclear@0 74 FT_Long count;
nuclear@0 75 FT_ULong* offsets;
nuclear@0 76
nuclear@0 77 } TTC_HeaderRec;
nuclear@0 78
nuclear@0 79
nuclear@0 80 /*************************************************************************/
nuclear@0 81 /* */
nuclear@0 82 /* <Struct> */
nuclear@0 83 /* SFNT_HeaderRec */
nuclear@0 84 /* */
nuclear@0 85 /* <Description> */
nuclear@0 86 /* SFNT file format header. */
nuclear@0 87 /* */
nuclear@0 88 /* <Fields> */
nuclear@0 89 /* format_tag :: The font format tag. */
nuclear@0 90 /* */
nuclear@0 91 /* num_tables :: The number of tables in file. */
nuclear@0 92 /* */
nuclear@0 93 /* search_range :: Must be `16 * (max power of 2 <= num_tables)'. */
nuclear@0 94 /* */
nuclear@0 95 /* entry_selector :: Must be log2 of `search_range / 16'. */
nuclear@0 96 /* */
nuclear@0 97 /* range_shift :: Must be `num_tables * 16 - search_range'. */
nuclear@0 98 /* */
nuclear@0 99 typedef struct SFNT_HeaderRec_
nuclear@0 100 {
nuclear@0 101 FT_ULong format_tag;
nuclear@0 102 FT_UShort num_tables;
nuclear@0 103 FT_UShort search_range;
nuclear@0 104 FT_UShort entry_selector;
nuclear@0 105 FT_UShort range_shift;
nuclear@0 106
nuclear@0 107 FT_ULong offset; /* not in file */
nuclear@0 108
nuclear@0 109 } SFNT_HeaderRec, *SFNT_Header;
nuclear@0 110
nuclear@0 111
nuclear@0 112 /*************************************************************************/
nuclear@0 113 /* */
nuclear@0 114 /* <Struct> */
nuclear@0 115 /* TT_TableRec */
nuclear@0 116 /* */
nuclear@0 117 /* <Description> */
nuclear@0 118 /* This structure describes a given table of a TrueType font. */
nuclear@0 119 /* */
nuclear@0 120 /* <Fields> */
nuclear@0 121 /* Tag :: A four-bytes tag describing the table. */
nuclear@0 122 /* */
nuclear@0 123 /* CheckSum :: The table checksum. This value can be ignored. */
nuclear@0 124 /* */
nuclear@0 125 /* Offset :: The offset of the table from the start of the TrueType */
nuclear@0 126 /* font in its resource. */
nuclear@0 127 /* */
nuclear@0 128 /* Length :: The table length (in bytes). */
nuclear@0 129 /* */
nuclear@0 130 typedef struct TT_TableRec_
nuclear@0 131 {
nuclear@0 132 FT_ULong Tag; /* table type */
nuclear@0 133 FT_ULong CheckSum; /* table checksum */
nuclear@0 134 FT_ULong Offset; /* table file offset */
nuclear@0 135 FT_ULong Length; /* table length */
nuclear@0 136
nuclear@0 137 } TT_TableRec, *TT_Table;
nuclear@0 138
nuclear@0 139
nuclear@0 140 /*************************************************************************/
nuclear@0 141 /* */
nuclear@0 142 /* <Struct> */
nuclear@0 143 /* TT_LongMetricsRec */
nuclear@0 144 /* */
nuclear@0 145 /* <Description> */
nuclear@0 146 /* A structure modeling the long metrics of the `hmtx' and `vmtx' */
nuclear@0 147 /* TrueType tables. The values are expressed in font units. */
nuclear@0 148 /* */
nuclear@0 149 /* <Fields> */
nuclear@0 150 /* advance :: The advance width or height for the glyph. */
nuclear@0 151 /* */
nuclear@0 152 /* bearing :: The left-side or top-side bearing for the glyph. */
nuclear@0 153 /* */
nuclear@0 154 typedef struct TT_LongMetricsRec_
nuclear@0 155 {
nuclear@0 156 FT_UShort advance;
nuclear@0 157 FT_Short bearing;
nuclear@0 158
nuclear@0 159 } TT_LongMetricsRec, *TT_LongMetrics;
nuclear@0 160
nuclear@0 161
nuclear@0 162 /*************************************************************************/
nuclear@0 163 /* */
nuclear@0 164 /* <Type> */
nuclear@0 165 /* TT_ShortMetrics */
nuclear@0 166 /* */
nuclear@0 167 /* <Description> */
nuclear@0 168 /* A simple type to model the short metrics of the `hmtx' and `vmtx' */
nuclear@0 169 /* tables. */
nuclear@0 170 /* */
nuclear@0 171 typedef FT_Short TT_ShortMetrics;
nuclear@0 172
nuclear@0 173
nuclear@0 174 /*************************************************************************/
nuclear@0 175 /* */
nuclear@0 176 /* <Struct> */
nuclear@0 177 /* TT_NameEntryRec */
nuclear@0 178 /* */
nuclear@0 179 /* <Description> */
nuclear@0 180 /* A structure modeling TrueType name records. Name records are used */
nuclear@0 181 /* to store important strings like family name, style name, */
nuclear@0 182 /* copyright, etc. in _localized_ versions (i.e., language, encoding, */
nuclear@0 183 /* etc). */
nuclear@0 184 /* */
nuclear@0 185 /* <Fields> */
nuclear@0 186 /* platformID :: The ID of the name's encoding platform. */
nuclear@0 187 /* */
nuclear@0 188 /* encodingID :: The platform-specific ID for the name's encoding. */
nuclear@0 189 /* */
nuclear@0 190 /* languageID :: The platform-specific ID for the name's language. */
nuclear@0 191 /* */
nuclear@0 192 /* nameID :: The ID specifying what kind of name this is. */
nuclear@0 193 /* */
nuclear@0 194 /* stringLength :: The length of the string in bytes. */
nuclear@0 195 /* */
nuclear@0 196 /* stringOffset :: The offset to the string in the `name' table. */
nuclear@0 197 /* */
nuclear@0 198 /* string :: A pointer to the string's bytes. Note that these */
nuclear@0 199 /* are usually UTF-16 encoded characters. */
nuclear@0 200 /* */
nuclear@0 201 typedef struct TT_NameEntryRec_
nuclear@0 202 {
nuclear@0 203 FT_UShort platformID;
nuclear@0 204 FT_UShort encodingID;
nuclear@0 205 FT_UShort languageID;
nuclear@0 206 FT_UShort nameID;
nuclear@0 207 FT_UShort stringLength;
nuclear@0 208 FT_ULong stringOffset;
nuclear@0 209
nuclear@0 210 /* this last field is not defined in the spec */
nuclear@0 211 /* but used by the FreeType engine */
nuclear@0 212
nuclear@0 213 FT_Byte* string;
nuclear@0 214
nuclear@0 215 } TT_NameEntryRec, *TT_NameEntry;
nuclear@0 216
nuclear@0 217
nuclear@0 218 /*************************************************************************/
nuclear@0 219 /* */
nuclear@0 220 /* <Struct> */
nuclear@0 221 /* TT_NameTableRec */
nuclear@0 222 /* */
nuclear@0 223 /* <Description> */
nuclear@0 224 /* A structure modeling the TrueType name table. */
nuclear@0 225 /* */
nuclear@0 226 /* <Fields> */
nuclear@0 227 /* format :: The format of the name table. */
nuclear@0 228 /* */
nuclear@0 229 /* numNameRecords :: The number of names in table. */
nuclear@0 230 /* */
nuclear@0 231 /* storageOffset :: The offset of the name table in the `name' */
nuclear@0 232 /* TrueType table. */
nuclear@0 233 /* */
nuclear@0 234 /* names :: An array of name records. */
nuclear@0 235 /* */
nuclear@0 236 /* stream :: the file's input stream. */
nuclear@0 237 /* */
nuclear@0 238 typedef struct TT_NameTableRec_
nuclear@0 239 {
nuclear@0 240 FT_UShort format;
nuclear@0 241 FT_UInt numNameRecords;
nuclear@0 242 FT_UInt storageOffset;
nuclear@0 243 TT_NameEntryRec* names;
nuclear@0 244 FT_Stream stream;
nuclear@0 245
nuclear@0 246 } TT_NameTableRec, *TT_NameTable;
nuclear@0 247
nuclear@0 248
nuclear@0 249 /*************************************************************************/
nuclear@0 250 /*************************************************************************/
nuclear@0 251 /*************************************************************************/
nuclear@0 252 /*** ***/
nuclear@0 253 /*** ***/
nuclear@0 254 /*** OPTIONAL TRUETYPE/OPENTYPE TABLES DEFINITIONS ***/
nuclear@0 255 /*** ***/
nuclear@0 256 /*** ***/
nuclear@0 257 /*************************************************************************/
nuclear@0 258 /*************************************************************************/
nuclear@0 259 /*************************************************************************/
nuclear@0 260
nuclear@0 261
nuclear@0 262 /*************************************************************************/
nuclear@0 263 /* */
nuclear@0 264 /* <Struct> */
nuclear@0 265 /* TT_GaspRangeRec */
nuclear@0 266 /* */
nuclear@0 267 /* <Description> */
nuclear@0 268 /* A tiny structure used to model a gasp range according to the */
nuclear@0 269 /* TrueType specification. */
nuclear@0 270 /* */
nuclear@0 271 /* <Fields> */
nuclear@0 272 /* maxPPEM :: The maximum ppem value to which `gaspFlag' applies. */
nuclear@0 273 /* */
nuclear@0 274 /* gaspFlag :: A flag describing the grid-fitting and anti-aliasing */
nuclear@0 275 /* modes to be used. */
nuclear@0 276 /* */
nuclear@0 277 typedef struct TT_GaspRangeRec_
nuclear@0 278 {
nuclear@0 279 FT_UShort maxPPEM;
nuclear@0 280 FT_UShort gaspFlag;
nuclear@0 281
nuclear@0 282 } TT_GaspRangeRec, *TT_GaspRange;
nuclear@0 283
nuclear@0 284
nuclear@0 285 #define TT_GASP_GRIDFIT 0x01
nuclear@0 286 #define TT_GASP_DOGRAY 0x02
nuclear@0 287
nuclear@0 288
nuclear@0 289 /*************************************************************************/
nuclear@0 290 /* */
nuclear@0 291 /* <Struct> */
nuclear@0 292 /* TT_GaspRec */
nuclear@0 293 /* */
nuclear@0 294 /* <Description> */
nuclear@0 295 /* A structure modeling the TrueType `gasp' table used to specify */
nuclear@0 296 /* grid-fitting and anti-aliasing behaviour. */
nuclear@0 297 /* */
nuclear@0 298 /* <Fields> */
nuclear@0 299 /* version :: The version number. */
nuclear@0 300 /* */
nuclear@0 301 /* numRanges :: The number of gasp ranges in table. */
nuclear@0 302 /* */
nuclear@0 303 /* gaspRanges :: An array of gasp ranges. */
nuclear@0 304 /* */
nuclear@0 305 typedef struct TT_Gasp_
nuclear@0 306 {
nuclear@0 307 FT_UShort version;
nuclear@0 308 FT_UShort numRanges;
nuclear@0 309 TT_GaspRange gaspRanges;
nuclear@0 310
nuclear@0 311 } TT_GaspRec;
nuclear@0 312
nuclear@0 313
nuclear@0 314 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
nuclear@0 315
nuclear@0 316 /*************************************************************************/
nuclear@0 317 /* */
nuclear@0 318 /* <Struct> */
nuclear@0 319 /* TT_HdmxEntryRec */
nuclear@0 320 /* */
nuclear@0 321 /* <Description> */
nuclear@0 322 /* A small structure used to model the pre-computed widths of a given */
nuclear@0 323 /* size. They are found in the `hdmx' table. */
nuclear@0 324 /* */
nuclear@0 325 /* <Fields> */
nuclear@0 326 /* ppem :: The pixels per EM value at which these metrics apply. */
nuclear@0 327 /* */
nuclear@0 328 /* max_width :: The maximum advance width for this metric. */
nuclear@0 329 /* */
nuclear@0 330 /* widths :: An array of widths. Note: These are 8-bit bytes. */
nuclear@0 331 /* */
nuclear@0 332 typedef struct TT_HdmxEntryRec_
nuclear@0 333 {
nuclear@0 334 FT_Byte ppem;
nuclear@0 335 FT_Byte max_width;
nuclear@0 336 FT_Byte* widths;
nuclear@0 337
nuclear@0 338 } TT_HdmxEntryRec, *TT_HdmxEntry;
nuclear@0 339
nuclear@0 340
nuclear@0 341 /*************************************************************************/
nuclear@0 342 /* */
nuclear@0 343 /* <Struct> */
nuclear@0 344 /* TT_HdmxRec */
nuclear@0 345 /* */
nuclear@0 346 /* <Description> */
nuclear@0 347 /* A structure used to model the `hdmx' table, which contains */
nuclear@0 348 /* pre-computed widths for a set of given sizes/dimensions. */
nuclear@0 349 /* */
nuclear@0 350 /* <Fields> */
nuclear@0 351 /* version :: The version number. */
nuclear@0 352 /* */
nuclear@0 353 /* num_records :: The number of hdmx records. */
nuclear@0 354 /* */
nuclear@0 355 /* records :: An array of hdmx records. */
nuclear@0 356 /* */
nuclear@0 357 typedef struct TT_HdmxRec_
nuclear@0 358 {
nuclear@0 359 FT_UShort version;
nuclear@0 360 FT_Short num_records;
nuclear@0 361 TT_HdmxEntry records;
nuclear@0 362
nuclear@0 363 } TT_HdmxRec, *TT_Hdmx;
nuclear@0 364
nuclear@0 365
nuclear@0 366 /*************************************************************************/
nuclear@0 367 /* */
nuclear@0 368 /* <Struct> */
nuclear@0 369 /* TT_Kern0_PairRec */
nuclear@0 370 /* */
nuclear@0 371 /* <Description> */
nuclear@0 372 /* A structure used to model a kerning pair for the kerning table */
nuclear@0 373 /* format 0. The engine now loads this table if it finds one in the */
nuclear@0 374 /* font file. */
nuclear@0 375 /* */
nuclear@0 376 /* <Fields> */
nuclear@0 377 /* left :: The index of the left glyph in pair. */
nuclear@0 378 /* */
nuclear@0 379 /* right :: The index of the right glyph in pair. */
nuclear@0 380 /* */
nuclear@0 381 /* value :: The kerning distance. A positive value spaces the */
nuclear@0 382 /* glyphs, a negative one makes them closer. */
nuclear@0 383 /* */
nuclear@0 384 typedef struct TT_Kern0_PairRec_
nuclear@0 385 {
nuclear@0 386 FT_UShort left; /* index of left glyph in pair */
nuclear@0 387 FT_UShort right; /* index of right glyph in pair */
nuclear@0 388 FT_FWord value; /* kerning value */
nuclear@0 389
nuclear@0 390 } TT_Kern0_PairRec, *TT_Kern0_Pair;
nuclear@0 391
nuclear@0 392 #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
nuclear@0 393
nuclear@0 394
nuclear@0 395 /*************************************************************************/
nuclear@0 396 /*************************************************************************/
nuclear@0 397 /*************************************************************************/
nuclear@0 398 /*** ***/
nuclear@0 399 /*** ***/
nuclear@0 400 /*** EMBEDDED BITMAPS SUPPORT ***/
nuclear@0 401 /*** ***/
nuclear@0 402 /*** ***/
nuclear@0 403 /*************************************************************************/
nuclear@0 404 /*************************************************************************/
nuclear@0 405 /*************************************************************************/
nuclear@0 406
nuclear@0 407
nuclear@0 408 /*************************************************************************/
nuclear@0 409 /* */
nuclear@0 410 /* <Struct> */
nuclear@0 411 /* TT_SBit_MetricsRec */
nuclear@0 412 /* */
nuclear@0 413 /* <Description> */
nuclear@0 414 /* A structure used to hold the big metrics of a given glyph bitmap */
nuclear@0 415 /* in a TrueType or OpenType font. These are usually found in the */
nuclear@0 416 /* `EBDT' (Microsoft) or `bloc' (Apple) table. */
nuclear@0 417 /* */
nuclear@0 418 /* <Fields> */
nuclear@0 419 /* height :: The glyph height in pixels. */
nuclear@0 420 /* */
nuclear@0 421 /* width :: The glyph width in pixels. */
nuclear@0 422 /* */
nuclear@0 423 /* horiBearingX :: The horizontal left bearing. */
nuclear@0 424 /* */
nuclear@0 425 /* horiBearingY :: The horizontal top bearing. */
nuclear@0 426 /* */
nuclear@0 427 /* horiAdvance :: The horizontal advance. */
nuclear@0 428 /* */
nuclear@0 429 /* vertBearingX :: The vertical left bearing. */
nuclear@0 430 /* */
nuclear@0 431 /* vertBearingY :: The vertical top bearing. */
nuclear@0 432 /* */
nuclear@0 433 /* vertAdvance :: The vertical advance. */
nuclear@0 434 /* */
nuclear@0 435 typedef struct TT_SBit_MetricsRec_
nuclear@0 436 {
nuclear@0 437 FT_Byte height;
nuclear@0 438 FT_Byte width;
nuclear@0 439
nuclear@0 440 FT_Char horiBearingX;
nuclear@0 441 FT_Char horiBearingY;
nuclear@0 442 FT_Byte horiAdvance;
nuclear@0 443
nuclear@0 444 FT_Char vertBearingX;
nuclear@0 445 FT_Char vertBearingY;
nuclear@0 446 FT_Byte vertAdvance;
nuclear@0 447
nuclear@0 448 } TT_SBit_MetricsRec, *TT_SBit_Metrics;
nuclear@0 449
nuclear@0 450
nuclear@0 451 /*************************************************************************/
nuclear@0 452 /* */
nuclear@0 453 /* <Struct> */
nuclear@0 454 /* TT_SBit_SmallMetricsRec */
nuclear@0 455 /* */
nuclear@0 456 /* <Description> */
nuclear@0 457 /* A structure used to hold the small metrics of a given glyph bitmap */
nuclear@0 458 /* in a TrueType or OpenType font. These are usually found in the */
nuclear@0 459 /* `EBDT' (Microsoft) or the `bdat' (Apple) table. */
nuclear@0 460 /* */
nuclear@0 461 /* <Fields> */
nuclear@0 462 /* height :: The glyph height in pixels. */
nuclear@0 463 /* */
nuclear@0 464 /* width :: The glyph width in pixels. */
nuclear@0 465 /* */
nuclear@0 466 /* bearingX :: The left-side bearing. */
nuclear@0 467 /* */
nuclear@0 468 /* bearingY :: The top-side bearing. */
nuclear@0 469 /* */
nuclear@0 470 /* advance :: The advance width or height. */
nuclear@0 471 /* */
nuclear@0 472 typedef struct TT_SBit_Small_Metrics_
nuclear@0 473 {
nuclear@0 474 FT_Byte height;
nuclear@0 475 FT_Byte width;
nuclear@0 476
nuclear@0 477 FT_Char bearingX;
nuclear@0 478 FT_Char bearingY;
nuclear@0 479 FT_Byte advance;
nuclear@0 480
nuclear@0 481 } TT_SBit_SmallMetricsRec, *TT_SBit_SmallMetrics;
nuclear@0 482
nuclear@0 483
nuclear@0 484 /*************************************************************************/
nuclear@0 485 /* */
nuclear@0 486 /* <Struct> */
nuclear@0 487 /* TT_SBit_LineMetricsRec */
nuclear@0 488 /* */
nuclear@0 489 /* <Description> */
nuclear@0 490 /* A structure used to describe the text line metrics of a given */
nuclear@0 491 /* bitmap strike, for either a horizontal or vertical layout. */
nuclear@0 492 /* */
nuclear@0 493 /* <Fields> */
nuclear@0 494 /* ascender :: The ascender in pixels. */
nuclear@0 495 /* */
nuclear@0 496 /* descender :: The descender in pixels. */
nuclear@0 497 /* */
nuclear@0 498 /* max_width :: The maximum glyph width in pixels. */
nuclear@0 499 /* */
nuclear@0 500 /* caret_slope_enumerator :: Rise of the caret slope, typically set */
nuclear@0 501 /* to 1 for non-italic fonts. */
nuclear@0 502 /* */
nuclear@0 503 /* caret_slope_denominator :: Rise of the caret slope, typically set */
nuclear@0 504 /* to 0 for non-italic fonts. */
nuclear@0 505 /* */
nuclear@0 506 /* caret_offset :: Offset in pixels to move the caret for */
nuclear@0 507 /* proper positioning. */
nuclear@0 508 /* */
nuclear@0 509 /* min_origin_SB :: Minimum of horiBearingX (resp. */
nuclear@0 510 /* vertBearingY). */
nuclear@0 511 /* min_advance_SB :: Minimum of */
nuclear@0 512 /* */
nuclear@0 513 /* horizontal advance - */
nuclear@0 514 /* ( horiBearingX + width ) */
nuclear@0 515 /* */
nuclear@0 516 /* resp. */
nuclear@0 517 /* */
nuclear@0 518 /* vertical advance - */
nuclear@0 519 /* ( vertBearingY + height ) */
nuclear@0 520 /* */
nuclear@0 521 /* max_before_BL :: Maximum of horiBearingY (resp. */
nuclear@0 522 /* vertBearingY). */
nuclear@0 523 /* */
nuclear@0 524 /* min_after_BL :: Minimum of */
nuclear@0 525 /* */
nuclear@0 526 /* horiBearingY - height */
nuclear@0 527 /* */
nuclear@0 528 /* resp. */
nuclear@0 529 /* */
nuclear@0 530 /* vertBearingX - width */
nuclear@0 531 /* */
nuclear@0 532 /* pads :: Unused (to make the size of the record */
nuclear@0 533 /* a multiple of 32 bits. */
nuclear@0 534 /* */
nuclear@0 535 typedef struct TT_SBit_LineMetricsRec_
nuclear@0 536 {
nuclear@0 537 FT_Char ascender;
nuclear@0 538 FT_Char descender;
nuclear@0 539 FT_Byte max_width;
nuclear@0 540 FT_Char caret_slope_numerator;
nuclear@0 541 FT_Char caret_slope_denominator;
nuclear@0 542 FT_Char caret_offset;
nuclear@0 543 FT_Char min_origin_SB;
nuclear@0 544 FT_Char min_advance_SB;
nuclear@0 545 FT_Char max_before_BL;
nuclear@0 546 FT_Char min_after_BL;
nuclear@0 547 FT_Char pads[2];
nuclear@0 548
nuclear@0 549 } TT_SBit_LineMetricsRec, *TT_SBit_LineMetrics;
nuclear@0 550
nuclear@0 551
nuclear@0 552 /*************************************************************************/
nuclear@0 553 /* */
nuclear@0 554 /* <Struct> */
nuclear@0 555 /* TT_SBit_RangeRec */
nuclear@0 556 /* */
nuclear@0 557 /* <Description> */
nuclear@0 558 /* A TrueType/OpenType subIndexTable as defined in the `EBLC' */
nuclear@0 559 /* (Microsoft) or `bloc' (Apple) tables. */
nuclear@0 560 /* */
nuclear@0 561 /* <Fields> */
nuclear@0 562 /* first_glyph :: The first glyph index in the range. */
nuclear@0 563 /* */
nuclear@0 564 /* last_glyph :: The last glyph index in the range. */
nuclear@0 565 /* */
nuclear@0 566 /* index_format :: The format of index table. Valid values are 1 */
nuclear@0 567 /* to 5. */
nuclear@0 568 /* */
nuclear@0 569 /* image_format :: The format of `EBDT' image data. */
nuclear@0 570 /* */
nuclear@0 571 /* image_offset :: The offset to image data in `EBDT'. */
nuclear@0 572 /* */
nuclear@0 573 /* image_size :: For index formats 2 and 5. This is the size in */
nuclear@0 574 /* bytes of each glyph bitmap. */
nuclear@0 575 /* */
nuclear@0 576 /* big_metrics :: For index formats 2 and 5. This is the big */
nuclear@0 577 /* metrics for each glyph bitmap. */
nuclear@0 578 /* */
nuclear@0 579 /* num_glyphs :: For index formats 4 and 5. This is the number of */
nuclear@0 580 /* glyphs in the code array. */
nuclear@0 581 /* */
nuclear@0 582 /* glyph_offsets :: For index formats 1 and 3. */
nuclear@0 583 /* */
nuclear@0 584 /* glyph_codes :: For index formats 4 and 5. */
nuclear@0 585 /* */
nuclear@0 586 /* table_offset :: The offset of the index table in the `EBLC' */
nuclear@0 587 /* table. Only used during strike loading. */
nuclear@0 588 /* */
nuclear@0 589 typedef struct TT_SBit_RangeRec_
nuclear@0 590 {
nuclear@0 591 FT_UShort first_glyph;
nuclear@0 592 FT_UShort last_glyph;
nuclear@0 593
nuclear@0 594 FT_UShort index_format;
nuclear@0 595 FT_UShort image_format;
nuclear@0 596 FT_ULong image_offset;
nuclear@0 597
nuclear@0 598 FT_ULong image_size;
nuclear@0 599 TT_SBit_MetricsRec metrics;
nuclear@0 600 FT_ULong num_glyphs;
nuclear@0 601
nuclear@0 602 FT_ULong* glyph_offsets;
nuclear@0 603 FT_UShort* glyph_codes;
nuclear@0 604
nuclear@0 605 FT_ULong table_offset;
nuclear@0 606
nuclear@0 607 } TT_SBit_RangeRec, *TT_SBit_Range;
nuclear@0 608
nuclear@0 609
nuclear@0 610 /*************************************************************************/
nuclear@0 611 /* */
nuclear@0 612 /* <Struct> */
nuclear@0 613 /* TT_SBit_StrikeRec */
nuclear@0 614 /* */
nuclear@0 615 /* <Description> */
nuclear@0 616 /* A structure used describe a given bitmap strike in the `EBLC' */
nuclear@0 617 /* (Microsoft) or `bloc' (Apple) tables. */
nuclear@0 618 /* */
nuclear@0 619 /* <Fields> */
nuclear@0 620 /* num_index_ranges :: The number of index ranges. */
nuclear@0 621 /* */
nuclear@0 622 /* index_ranges :: An array of glyph index ranges. */
nuclear@0 623 /* */
nuclear@0 624 /* color_ref :: Unused. `color_ref' is put in for future */
nuclear@0 625 /* enhancements, but these fields are already */
nuclear@0 626 /* in use by other platforms (e.g. Newton). */
nuclear@0 627 /* For details, please see */
nuclear@0 628 /* */
nuclear@0 629 /* http://fonts.apple.com/ */
nuclear@0 630 /* TTRefMan/RM06/Chap6bloc.html */
nuclear@0 631 /* */
nuclear@0 632 /* hori :: The line metrics for horizontal layouts. */
nuclear@0 633 /* */
nuclear@0 634 /* vert :: The line metrics for vertical layouts. */
nuclear@0 635 /* */
nuclear@0 636 /* start_glyph :: The lowest glyph index for this strike. */
nuclear@0 637 /* */
nuclear@0 638 /* end_glyph :: The highest glyph index for this strike. */
nuclear@0 639 /* */
nuclear@0 640 /* x_ppem :: The number of horizontal pixels per EM. */
nuclear@0 641 /* */
nuclear@0 642 /* y_ppem :: The number of vertical pixels per EM. */
nuclear@0 643 /* */
nuclear@0 644 /* bit_depth :: The bit depth. Valid values are 1, 2, 4, */
nuclear@0 645 /* and 8. */
nuclear@0 646 /* */
nuclear@0 647 /* flags :: Is this a vertical or horizontal strike? For */
nuclear@0 648 /* details, please see */
nuclear@0 649 /* */
nuclear@0 650 /* http://fonts.apple.com/ */
nuclear@0 651 /* TTRefMan/RM06/Chap6bloc.html */
nuclear@0 652 /* */
nuclear@0 653 typedef struct TT_SBit_StrikeRec_
nuclear@0 654 {
nuclear@0 655 FT_Int num_ranges;
nuclear@0 656 TT_SBit_Range sbit_ranges;
nuclear@0 657 FT_ULong ranges_offset;
nuclear@0 658
nuclear@0 659 FT_ULong color_ref;
nuclear@0 660
nuclear@0 661 TT_SBit_LineMetricsRec hori;
nuclear@0 662 TT_SBit_LineMetricsRec vert;
nuclear@0 663
nuclear@0 664 FT_UShort start_glyph;
nuclear@0 665 FT_UShort end_glyph;
nuclear@0 666
nuclear@0 667 FT_Byte x_ppem;
nuclear@0 668 FT_Byte y_ppem;
nuclear@0 669
nuclear@0 670 FT_Byte bit_depth;
nuclear@0 671 FT_Char flags;
nuclear@0 672
nuclear@0 673 } TT_SBit_StrikeRec, *TT_SBit_Strike;
nuclear@0 674
nuclear@0 675
nuclear@0 676 /*************************************************************************/
nuclear@0 677 /* */
nuclear@0 678 /* <Struct> */
nuclear@0 679 /* TT_SBit_ComponentRec */
nuclear@0 680 /* */
nuclear@0 681 /* <Description> */
nuclear@0 682 /* A simple structure to describe a compound sbit element. */
nuclear@0 683 /* */
nuclear@0 684 /* <Fields> */
nuclear@0 685 /* glyph_code :: The element's glyph index. */
nuclear@0 686 /* */
nuclear@0 687 /* x_offset :: The element's left bearing. */
nuclear@0 688 /* */
nuclear@0 689 /* y_offset :: The element's top bearing. */
nuclear@0 690 /* */
nuclear@0 691 typedef struct TT_SBit_ComponentRec_
nuclear@0 692 {
nuclear@0 693 FT_UShort glyph_code;
nuclear@0 694 FT_Char x_offset;
nuclear@0 695 FT_Char y_offset;
nuclear@0 696
nuclear@0 697 } TT_SBit_ComponentRec, *TT_SBit_Component;
nuclear@0 698
nuclear@0 699
nuclear@0 700 /*************************************************************************/
nuclear@0 701 /* */
nuclear@0 702 /* <Struct> */
nuclear@0 703 /* TT_SBit_ScaleRec */
nuclear@0 704 /* */
nuclear@0 705 /* <Description> */
nuclear@0 706 /* A structure used describe a given bitmap scaling table, as defined */
nuclear@0 707 /* in the `EBSC' table. */
nuclear@0 708 /* */
nuclear@0 709 /* <Fields> */
nuclear@0 710 /* hori :: The horizontal line metrics. */
nuclear@0 711 /* */
nuclear@0 712 /* vert :: The vertical line metrics. */
nuclear@0 713 /* */
nuclear@0 714 /* x_ppem :: The number of horizontal pixels per EM. */
nuclear@0 715 /* */
nuclear@0 716 /* y_ppem :: The number of vertical pixels per EM. */
nuclear@0 717 /* */
nuclear@0 718 /* x_ppem_substitute :: Substitution x_ppem value. */
nuclear@0 719 /* */
nuclear@0 720 /* y_ppem_substitute :: Substitution y_ppem value. */
nuclear@0 721 /* */
nuclear@0 722 typedef struct TT_SBit_ScaleRec_
nuclear@0 723 {
nuclear@0 724 TT_SBit_LineMetricsRec hori;
nuclear@0 725 TT_SBit_LineMetricsRec vert;
nuclear@0 726
nuclear@0 727 FT_Byte x_ppem;
nuclear@0 728 FT_Byte y_ppem;
nuclear@0 729
nuclear@0 730 FT_Byte x_ppem_substitute;
nuclear@0 731 FT_Byte y_ppem_substitute;
nuclear@0 732
nuclear@0 733 } TT_SBit_ScaleRec, *TT_SBit_Scale;
nuclear@0 734
nuclear@0 735
nuclear@0 736 /*************************************************************************/
nuclear@0 737 /*************************************************************************/
nuclear@0 738 /*************************************************************************/
nuclear@0 739 /*** ***/
nuclear@0 740 /*** ***/
nuclear@0 741 /*** POSTSCRIPT GLYPH NAMES SUPPORT ***/
nuclear@0 742 /*** ***/
nuclear@0 743 /*** ***/
nuclear@0 744 /*************************************************************************/
nuclear@0 745 /*************************************************************************/
nuclear@0 746 /*************************************************************************/
nuclear@0 747
nuclear@0 748
nuclear@0 749 /*************************************************************************/
nuclear@0 750 /* */
nuclear@0 751 /* <Struct> */
nuclear@0 752 /* TT_Post_20Rec */
nuclear@0 753 /* */
nuclear@0 754 /* <Description> */
nuclear@0 755 /* Postscript names sub-table, format 2.0. Stores the PS name of */
nuclear@0 756 /* each glyph in the font face. */
nuclear@0 757 /* */
nuclear@0 758 /* <Fields> */
nuclear@0 759 /* num_glyphs :: The number of named glyphs in the table. */
nuclear@0 760 /* */
nuclear@0 761 /* num_names :: The number of PS names stored in the table. */
nuclear@0 762 /* */
nuclear@0 763 /* glyph_indices :: The indices of the glyphs in the names arrays. */
nuclear@0 764 /* */
nuclear@0 765 /* glyph_names :: The PS names not in Mac Encoding. */
nuclear@0 766 /* */
nuclear@0 767 typedef struct TT_Post_20Rec_
nuclear@0 768 {
nuclear@0 769 FT_UShort num_glyphs;
nuclear@0 770 FT_UShort num_names;
nuclear@0 771 FT_UShort* glyph_indices;
nuclear@0 772 FT_Char** glyph_names;
nuclear@0 773
nuclear@0 774 } TT_Post_20Rec, *TT_Post_20;
nuclear@0 775
nuclear@0 776
nuclear@0 777 /*************************************************************************/
nuclear@0 778 /* */
nuclear@0 779 /* <Struct> */
nuclear@0 780 /* TT_Post_25Rec */
nuclear@0 781 /* */
nuclear@0 782 /* <Description> */
nuclear@0 783 /* Postscript names sub-table, format 2.5. Stores the PS name of */
nuclear@0 784 /* each glyph in the font face. */
nuclear@0 785 /* */
nuclear@0 786 /* <Fields> */
nuclear@0 787 /* num_glyphs :: The number of glyphs in the table. */
nuclear@0 788 /* */
nuclear@0 789 /* offsets :: An array of signed offsets in a normal Mac */
nuclear@0 790 /* Postscript name encoding. */
nuclear@0 791 /* */
nuclear@0 792 typedef struct TT_Post_25_
nuclear@0 793 {
nuclear@0 794 FT_UShort num_glyphs;
nuclear@0 795 FT_Char* offsets;
nuclear@0 796
nuclear@0 797 } TT_Post_25Rec, *TT_Post_25;
nuclear@0 798
nuclear@0 799
nuclear@0 800 /*************************************************************************/
nuclear@0 801 /* */
nuclear@0 802 /* <Struct> */
nuclear@0 803 /* TT_Post_NamesRec */
nuclear@0 804 /* */
nuclear@0 805 /* <Description> */
nuclear@0 806 /* Postscript names table, either format 2.0 or 2.5. */
nuclear@0 807 /* */
nuclear@0 808 /* <Fields> */
nuclear@0 809 /* loaded :: A flag to indicate whether the PS names are loaded. */
nuclear@0 810 /* */
nuclear@0 811 /* format_20 :: The sub-table used for format 2.0. */
nuclear@0 812 /* */
nuclear@0 813 /* format_25 :: The sub-table used for format 2.5. */
nuclear@0 814 /* */
nuclear@0 815 typedef struct TT_Post_NamesRec_
nuclear@0 816 {
nuclear@0 817 FT_Bool loaded;
nuclear@0 818
nuclear@0 819 union
nuclear@0 820 {
nuclear@0 821 TT_Post_20Rec format_20;
nuclear@0 822 TT_Post_25Rec format_25;
nuclear@0 823
nuclear@0 824 } names;
nuclear@0 825
nuclear@0 826 } TT_Post_NamesRec, *TT_Post_Names;
nuclear@0 827
nuclear@0 828
nuclear@0 829 /*************************************************************************/
nuclear@0 830 /*************************************************************************/
nuclear@0 831 /*************************************************************************/
nuclear@0 832 /*** ***/
nuclear@0 833 /*** ***/
nuclear@0 834 /*** GX VARIATION TABLE SUPPORT ***/
nuclear@0 835 /*** ***/
nuclear@0 836 /*** ***/
nuclear@0 837 /*************************************************************************/
nuclear@0 838 /*************************************************************************/
nuclear@0 839 /*************************************************************************/
nuclear@0 840
nuclear@0 841
nuclear@0 842 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
nuclear@0 843 typedef struct GX_BlendRec_ *GX_Blend;
nuclear@0 844 #endif
nuclear@0 845
nuclear@0 846 /*************************************************************************/
nuclear@0 847 /*************************************************************************/
nuclear@0 848 /*************************************************************************/
nuclear@0 849 /*** ***/
nuclear@0 850 /*** ***/
nuclear@0 851 /*** EMBEDDED BDF PROPERTIES TABLE SUPPORT ***/
nuclear@0 852 /*** ***/
nuclear@0 853 /*** ***/
nuclear@0 854 /*************************************************************************/
nuclear@0 855 /*************************************************************************/
nuclear@0 856 /*************************************************************************/
nuclear@0 857
nuclear@0 858 /*
nuclear@0 859 * These types are used to support a `BDF ' table that isn't part of the
nuclear@0 860 * official TrueType specification. It is mainly used in SFNT-based
nuclear@0 861 * bitmap fonts that were generated from a set of BDF fonts.
nuclear@0 862 *
nuclear@0 863 * The format of the table is as follows.
nuclear@0 864 *
nuclear@0 865 * USHORT version `BDF ' table version number, should be 0x0001.
nuclear@0 866 * USHORT strikeCount Number of strikes (bitmap sizes) in this table.
nuclear@0 867 * ULONG stringTable Offset (from start of BDF table) to string
nuclear@0 868 * table.
nuclear@0 869 *
nuclear@0 870 * This is followed by an array of `strikeCount' descriptors, having the
nuclear@0 871 * following format.
nuclear@0 872 *
nuclear@0 873 * USHORT ppem Vertical pixels per EM for this strike.
nuclear@0 874 * USHORT numItems Number of items for this strike (properties and
nuclear@0 875 * atoms). Maximum is 255.
nuclear@0 876 *
nuclear@0 877 * This array in turn is followed by `strikeCount' value sets. Each
nuclear@0 878 * `value set' is an array of `numItems' items with the following format.
nuclear@0 879 *
nuclear@0 880 * ULONG item_name Offset in string table to item name.
nuclear@0 881 * USHORT item_type The item type. Possible values are
nuclear@0 882 * 0 => string (e.g., COMMENT)
nuclear@0 883 * 1 => atom (e.g., FONT or even SIZE)
nuclear@0 884 * 2 => int32
nuclear@0 885 * 3 => uint32
nuclear@0 886 * 0x10 => A flag to indicate a properties. This
nuclear@0 887 * is ORed with the above values.
nuclear@0 888 * ULONG item_value For strings => Offset into string table without
nuclear@0 889 * the corresponding double quotes.
nuclear@0 890 * For atoms => Offset into string table.
nuclear@0 891 * For integers => Direct value.
nuclear@0 892 *
nuclear@0 893 * All strings in the string table consist of bytes and are
nuclear@0 894 * zero-terminated.
nuclear@0 895 *
nuclear@0 896 */
nuclear@0 897
nuclear@0 898 #ifdef TT_CONFIG_OPTION_BDF
nuclear@0 899
nuclear@0 900 typedef struct TT_BDFRec_
nuclear@0 901 {
nuclear@0 902 FT_Byte* table;
nuclear@0 903 FT_Byte* table_end;
nuclear@0 904 FT_Byte* strings;
nuclear@0 905 FT_ULong strings_size;
nuclear@0 906 FT_UInt num_strikes;
nuclear@0 907 FT_Bool loaded;
nuclear@0 908
nuclear@0 909 } TT_BDFRec, *TT_BDF;
nuclear@0 910
nuclear@0 911 #endif /* TT_CONFIG_OPTION_BDF */
nuclear@0 912
nuclear@0 913 /*************************************************************************/
nuclear@0 914 /*************************************************************************/
nuclear@0 915 /*************************************************************************/
nuclear@0 916 /*** ***/
nuclear@0 917 /*** ***/
nuclear@0 918 /*** ORIGINAL TT_FACE CLASS DEFINITION ***/
nuclear@0 919 /*** ***/
nuclear@0 920 /*** ***/
nuclear@0 921 /*************************************************************************/
nuclear@0 922 /*************************************************************************/
nuclear@0 923 /*************************************************************************/
nuclear@0 924
nuclear@0 925
nuclear@0 926 /*************************************************************************/
nuclear@0 927 /* */
nuclear@0 928 /* This structure/class is defined here because it is common to the */
nuclear@0 929 /* following formats: TTF, OpenType-TT, and OpenType-CFF. */
nuclear@0 930 /* */
nuclear@0 931 /* Note, however, that the classes TT_Size and TT_GlyphSlot are not */
nuclear@0 932 /* shared between font drivers, and are thus defined in `ttobjs.h'. */
nuclear@0 933 /* */
nuclear@0 934 /*************************************************************************/
nuclear@0 935
nuclear@0 936
nuclear@0 937 /*************************************************************************/
nuclear@0 938 /* */
nuclear@0 939 /* <Type> */
nuclear@0 940 /* TT_Face */
nuclear@0 941 /* */
nuclear@0 942 /* <Description> */
nuclear@0 943 /* A handle to a TrueType face/font object. A TT_Face encapsulates */
nuclear@0 944 /* the resolution and scaling independent parts of a TrueType font */
nuclear@0 945 /* resource. */
nuclear@0 946 /* */
nuclear@0 947 /* <Note> */
nuclear@0 948 /* The TT_Face structure is also used as a `parent class' for the */
nuclear@0 949 /* OpenType-CFF class (T2_Face). */
nuclear@0 950 /* */
nuclear@0 951 typedef struct TT_FaceRec_* TT_Face;
nuclear@0 952
nuclear@0 953
nuclear@0 954 /* a function type used for the truetype bytecode interpreter hooks */
nuclear@0 955 typedef FT_Error
nuclear@0 956 (*TT_Interpreter)( void* exec_context );
nuclear@0 957
nuclear@0 958 /* forward declaration */
nuclear@0 959 typedef struct TT_LoaderRec_* TT_Loader;
nuclear@0 960
nuclear@0 961
nuclear@0 962 /*************************************************************************/
nuclear@0 963 /* */
nuclear@0 964 /* <FuncType> */
nuclear@0 965 /* TT_Loader_GotoTableFunc */
nuclear@0 966 /* */
nuclear@0 967 /* <Description> */
nuclear@0 968 /* Seeks a stream to the start of a given TrueType table. */
nuclear@0 969 /* */
nuclear@0 970 /* <Input> */
nuclear@0 971 /* face :: A handle to the target face object. */
nuclear@0 972 /* */
nuclear@0 973 /* tag :: A 4-byte tag used to name the table. */
nuclear@0 974 /* */
nuclear@0 975 /* stream :: The input stream. */
nuclear@0 976 /* */
nuclear@0 977 /* <Output> */
nuclear@0 978 /* length :: The length of the table in bytes. Set to 0 if not */
nuclear@0 979 /* needed. */
nuclear@0 980 /* */
nuclear@0 981 /* <Return> */
nuclear@0 982 /* FreeType error code. 0 means success. */
nuclear@0 983 /* */
nuclear@0 984 /* <Note> */
nuclear@0 985 /* The stream cursor must be at the font file's origin. */
nuclear@0 986 /* */
nuclear@0 987 typedef FT_Error
nuclear@0 988 (*TT_Loader_GotoTableFunc)( TT_Face face,
nuclear@0 989 FT_ULong tag,
nuclear@0 990 FT_Stream stream,
nuclear@0 991 FT_ULong* length );
nuclear@0 992
nuclear@0 993
nuclear@0 994 /*************************************************************************/
nuclear@0 995 /* */
nuclear@0 996 /* <FuncType> */
nuclear@0 997 /* TT_Loader_StartGlyphFunc */
nuclear@0 998 /* */
nuclear@0 999 /* <Description> */
nuclear@0 1000 /* Seeks a stream to the start of a given glyph element, and opens a */
nuclear@0 1001 /* frame for it. */
nuclear@0 1002 /* */
nuclear@0 1003 /* <Input> */
nuclear@0 1004 /* loader :: The current TrueType glyph loader object. */
nuclear@0 1005 /* */
nuclear@0 1006 /* glyph index :: The index of the glyph to access. */
nuclear@0 1007 /* */
nuclear@0 1008 /* offset :: The offset of the glyph according to the */
nuclear@0 1009 /* `locations' table. */
nuclear@0 1010 /* */
nuclear@0 1011 /* byte_count :: The size of the frame in bytes. */
nuclear@0 1012 /* */
nuclear@0 1013 /* <Return> */
nuclear@0 1014 /* FreeType error code. 0 means success. */
nuclear@0 1015 /* */
nuclear@0 1016 /* <Note> */
nuclear@0 1017 /* This function is normally equivalent to FT_STREAM_SEEK(offset) */
nuclear@0 1018 /* followed by FT_FRAME_ENTER(byte_count) with the loader's stream, */
nuclear@0 1019 /* but alternative formats (e.g. compressed ones) might use something */
nuclear@0 1020 /* different. */
nuclear@0 1021 /* */
nuclear@0 1022 typedef FT_Error
nuclear@0 1023 (*TT_Loader_StartGlyphFunc)( TT_Loader loader,
nuclear@0 1024 FT_UInt glyph_index,
nuclear@0 1025 FT_ULong offset,
nuclear@0 1026 FT_UInt byte_count );
nuclear@0 1027
nuclear@0 1028
nuclear@0 1029 /*************************************************************************/
nuclear@0 1030 /* */
nuclear@0 1031 /* <FuncType> */
nuclear@0 1032 /* TT_Loader_ReadGlyphFunc */
nuclear@0 1033 /* */
nuclear@0 1034 /* <Description> */
nuclear@0 1035 /* Reads one glyph element (its header, a simple glyph, or a */
nuclear@0 1036 /* composite) from the loader's current stream frame. */
nuclear@0 1037 /* */
nuclear@0 1038 /* <Input> */
nuclear@0 1039 /* loader :: The current TrueType glyph loader object. */
nuclear@0 1040 /* */
nuclear@0 1041 /* <Return> */
nuclear@0 1042 /* FreeType error code. 0 means success. */
nuclear@0 1043 /* */
nuclear@0 1044 typedef FT_Error
nuclear@0 1045 (*TT_Loader_ReadGlyphFunc)( TT_Loader loader );
nuclear@0 1046
nuclear@0 1047
nuclear@0 1048 /*************************************************************************/
nuclear@0 1049 /* */
nuclear@0 1050 /* <FuncType> */
nuclear@0 1051 /* TT_Loader_EndGlyphFunc */
nuclear@0 1052 /* */
nuclear@0 1053 /* <Description> */
nuclear@0 1054 /* Closes the current loader stream frame for the glyph. */
nuclear@0 1055 /* */
nuclear@0 1056 /* <Input> */
nuclear@0 1057 /* loader :: The current TrueType glyph loader object. */
nuclear@0 1058 /* */
nuclear@0 1059 typedef void
nuclear@0 1060 (*TT_Loader_EndGlyphFunc)( TT_Loader loader );
nuclear@0 1061
nuclear@0 1062
nuclear@0 1063 /*************************************************************************/
nuclear@0 1064 /* */
nuclear@0 1065 /* TrueType Face Type */
nuclear@0 1066 /* */
nuclear@0 1067 /* <Struct> */
nuclear@0 1068 /* TT_Face */
nuclear@0 1069 /* */
nuclear@0 1070 /* <Description> */
nuclear@0 1071 /* The TrueType face class. These objects model the resolution and */
nuclear@0 1072 /* point-size independent data found in a TrueType font file. */
nuclear@0 1073 /* */
nuclear@0 1074 /* <Fields> */
nuclear@0 1075 /* root :: The base FT_Face structure, managed by the */
nuclear@0 1076 /* base layer. */
nuclear@0 1077 /* */
nuclear@0 1078 /* ttc_header :: The TrueType collection header, used when */
nuclear@0 1079 /* the file is a `ttc' rather than a `ttf'. */
nuclear@0 1080 /* For ordinary font files, the field */
nuclear@0 1081 /* `ttc_header.count' is set to 0. */
nuclear@0 1082 /* */
nuclear@0 1083 /* format_tag :: The font format tag. */
nuclear@0 1084 /* */
nuclear@0 1085 /* num_tables :: The number of TrueType tables in this font */
nuclear@0 1086 /* file. */
nuclear@0 1087 /* */
nuclear@0 1088 /* dir_tables :: The directory of TrueType tables for this */
nuclear@0 1089 /* font file. */
nuclear@0 1090 /* */
nuclear@0 1091 /* header :: The font's font header (`head' table). */
nuclear@0 1092 /* Read on font opening. */
nuclear@0 1093 /* */
nuclear@0 1094 /* horizontal :: The font's horizontal header (`hhea' */
nuclear@0 1095 /* table). This field also contains the */
nuclear@0 1096 /* associated horizontal metrics table */
nuclear@0 1097 /* (`hmtx'). */
nuclear@0 1098 /* */
nuclear@0 1099 /* max_profile :: The font's maximum profile table. Read on */
nuclear@0 1100 /* font opening. Note that some maximum */
nuclear@0 1101 /* values cannot be taken directly from this */
nuclear@0 1102 /* table. We thus define additional fields */
nuclear@0 1103 /* below to hold the computed maxima. */
nuclear@0 1104 /* */
nuclear@0 1105 /* vertical_info :: A boolean which is set when the font file */
nuclear@0 1106 /* contains vertical metrics. If not, the */
nuclear@0 1107 /* value of the `vertical' field is */
nuclear@0 1108 /* undefined. */
nuclear@0 1109 /* */
nuclear@0 1110 /* vertical :: The font's vertical header (`vhea' table). */
nuclear@0 1111 /* This field also contains the associated */
nuclear@0 1112 /* vertical metrics table (`vmtx'), if found. */
nuclear@0 1113 /* IMPORTANT: The contents of this field is */
nuclear@0 1114 /* undefined if the `verticalInfo' field is */
nuclear@0 1115 /* unset. */
nuclear@0 1116 /* */
nuclear@0 1117 /* num_names :: The number of name records within this */
nuclear@0 1118 /* TrueType font. */
nuclear@0 1119 /* */
nuclear@0 1120 /* name_table :: The table of name records (`name'). */
nuclear@0 1121 /* */
nuclear@0 1122 /* os2 :: The font's OS/2 table (`OS/2'). */
nuclear@0 1123 /* */
nuclear@0 1124 /* postscript :: The font's PostScript table (`post' */
nuclear@0 1125 /* table). The PostScript glyph names are */
nuclear@0 1126 /* not loaded by the driver on face opening. */
nuclear@0 1127 /* See the `ttpost' module for more details. */
nuclear@0 1128 /* */
nuclear@0 1129 /* cmap_table :: Address of the face's `cmap' SFNT table */
nuclear@0 1130 /* in memory (it's an extracted frame). */
nuclear@0 1131 /* */
nuclear@0 1132 /* cmap_size :: The size in bytes of the `cmap_table' */
nuclear@0 1133 /* described above. */
nuclear@0 1134 /* */
nuclear@0 1135 /* goto_table :: A function called by each TrueType table */
nuclear@0 1136 /* loader to position a stream's cursor to */
nuclear@0 1137 /* the start of a given table according to */
nuclear@0 1138 /* its tag. It defaults to TT_Goto_Face but */
nuclear@0 1139 /* can be different for strange formats (e.g. */
nuclear@0 1140 /* Type 42). */
nuclear@0 1141 /* */
nuclear@0 1142 /* access_glyph_frame :: A function used to access the frame of a */
nuclear@0 1143 /* given glyph within the face's font file. */
nuclear@0 1144 /* */
nuclear@0 1145 /* forget_glyph_frame :: A function used to forget the frame of a */
nuclear@0 1146 /* given glyph when all data has been loaded. */
nuclear@0 1147 /* */
nuclear@0 1148 /* read_glyph_header :: A function used to read a glyph header. */
nuclear@0 1149 /* It must be called between an `access' and */
nuclear@0 1150 /* `forget'. */
nuclear@0 1151 /* */
nuclear@0 1152 /* read_simple_glyph :: A function used to read a simple glyph. */
nuclear@0 1153 /* It must be called after the header was */
nuclear@0 1154 /* read, and before the `forget'. */
nuclear@0 1155 /* */
nuclear@0 1156 /* read_composite_glyph :: A function used to read a composite glyph. */
nuclear@0 1157 /* It must be called after the header was */
nuclear@0 1158 /* read, and before the `forget'. */
nuclear@0 1159 /* */
nuclear@0 1160 /* sfnt :: A pointer to the SFNT service. */
nuclear@0 1161 /* */
nuclear@0 1162 /* psnames :: A pointer to the PostScript names service. */
nuclear@0 1163 /* */
nuclear@0 1164 /* hdmx :: The face's horizontal device metrics */
nuclear@0 1165 /* (`hdmx' table). This table is optional in */
nuclear@0 1166 /* TrueType/OpenType fonts. */
nuclear@0 1167 /* */
nuclear@0 1168 /* gasp :: The grid-fitting and scaling properties */
nuclear@0 1169 /* table (`gasp'). This table is optional in */
nuclear@0 1170 /* TrueType/OpenType fonts. */
nuclear@0 1171 /* */
nuclear@0 1172 /* pclt :: The `pclt' SFNT table. */
nuclear@0 1173 /* */
nuclear@0 1174 /* num_sbit_strikes :: The number of sbit strikes, i.e., bitmap */
nuclear@0 1175 /* sizes, embedded in this font. */
nuclear@0 1176 /* */
nuclear@0 1177 /* sbit_strikes :: An array of sbit strikes embedded in this */
nuclear@0 1178 /* font. This table is optional in a */
nuclear@0 1179 /* TrueType/OpenType font. */
nuclear@0 1180 /* */
nuclear@0 1181 /* num_sbit_scales :: The number of sbit scales for this font. */
nuclear@0 1182 /* */
nuclear@0 1183 /* sbit_scales :: Array of sbit scales embedded in this */
nuclear@0 1184 /* font. This table is optional in a */
nuclear@0 1185 /* TrueType/OpenType font. */
nuclear@0 1186 /* */
nuclear@0 1187 /* postscript_names :: A table used to store the Postscript names */
nuclear@0 1188 /* of the glyphs for this font. See the */
nuclear@0 1189 /* file `ttconfig.h' for comments on the */
nuclear@0 1190 /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES option. */
nuclear@0 1191 /* */
nuclear@0 1192 /* num_locations :: The number of glyph locations in this */
nuclear@0 1193 /* TrueType file. This should be */
nuclear@0 1194 /* identical to the number of glyphs. */
nuclear@0 1195 /* Ignored for Type 2 fonts. */
nuclear@0 1196 /* */
nuclear@0 1197 /* glyph_locations :: An array of longs. These are offsets to */
nuclear@0 1198 /* glyph data within the `glyf' table. */
nuclear@0 1199 /* Ignored for Type 2 font faces. */
nuclear@0 1200 /* */
nuclear@0 1201 /* glyf_len :: The length of the `glyf' table. Needed */
nuclear@0 1202 /* for malformed `loca' tables. */
nuclear@0 1203 /* */
nuclear@0 1204 /* font_program_size :: Size in bytecodes of the face's font */
nuclear@0 1205 /* program. 0 if none defined. Ignored for */
nuclear@0 1206 /* Type 2 fonts. */
nuclear@0 1207 /* */
nuclear@0 1208 /* font_program :: The face's font program (bytecode stream) */
nuclear@0 1209 /* executed at load time, also used during */
nuclear@0 1210 /* glyph rendering. Comes from the `fpgm' */
nuclear@0 1211 /* table. Ignored for Type 2 font fonts. */
nuclear@0 1212 /* */
nuclear@0 1213 /* cvt_program_size :: The size in bytecodes of the face's cvt */
nuclear@0 1214 /* program. Ignored for Type 2 fonts. */
nuclear@0 1215 /* */
nuclear@0 1216 /* cvt_program :: The face's cvt program (bytecode stream) */
nuclear@0 1217 /* executed each time an instance/size is */
nuclear@0 1218 /* changed/reset. Comes from the `prep' */
nuclear@0 1219 /* table. Ignored for Type 2 fonts. */
nuclear@0 1220 /* */
nuclear@0 1221 /* cvt_size :: Size of the control value table (in */
nuclear@0 1222 /* entries). Ignored for Type 2 fonts. */
nuclear@0 1223 /* */
nuclear@0 1224 /* cvt :: The face's original control value table. */
nuclear@0 1225 /* Coordinates are expressed in unscaled font */
nuclear@0 1226 /* units. Comes from the `cvt ' table. */
nuclear@0 1227 /* Ignored for Type 2 fonts. */
nuclear@0 1228 /* */
nuclear@0 1229 /* num_kern_pairs :: The number of kerning pairs present in the */
nuclear@0 1230 /* font file. The engine only loads the */
nuclear@0 1231 /* first horizontal format 0 kern table it */
nuclear@0 1232 /* finds in the font file. Ignored for */
nuclear@0 1233 /* Type 2 fonts. */
nuclear@0 1234 /* */
nuclear@0 1235 /* kern_table_index :: The index of the kerning table in the font */
nuclear@0 1236 /* kerning directory. Ignored for Type 2 */
nuclear@0 1237 /* fonts. */
nuclear@0 1238 /* */
nuclear@0 1239 /* interpreter :: A pointer to the TrueType bytecode */
nuclear@0 1240 /* interpreters field is also used to hook */
nuclear@0 1241 /* the debugger in `ttdebug'. */
nuclear@0 1242 /* */
nuclear@0 1243 /* unpatented_hinting :: If true, use only unpatented methods in */
nuclear@0 1244 /* the bytecode interpreter. */
nuclear@0 1245 /* */
nuclear@0 1246 /* doblend :: A boolean which is set if the font should */
nuclear@0 1247 /* be blended (this is for GX var). */
nuclear@0 1248 /* */
nuclear@0 1249 /* blend :: Contains the data needed to control GX */
nuclear@0 1250 /* variation tables (rather like Multiple */
nuclear@0 1251 /* Master data). */
nuclear@0 1252 /* */
nuclear@0 1253 /* extra :: Reserved for third-party font drivers. */
nuclear@0 1254 /* */
nuclear@0 1255 /* postscript_name :: The PS name of the font. Used by the */
nuclear@0 1256 /* postscript name service. */
nuclear@0 1257 /* */
nuclear@0 1258 typedef struct TT_FaceRec_
nuclear@0 1259 {
nuclear@0 1260 FT_FaceRec root;
nuclear@0 1261
nuclear@0 1262 TTC_HeaderRec ttc_header;
nuclear@0 1263
nuclear@0 1264 FT_ULong format_tag;
nuclear@0 1265 FT_UShort num_tables;
nuclear@0 1266 TT_Table dir_tables;
nuclear@0 1267
nuclear@0 1268 TT_Header header; /* TrueType header table */
nuclear@0 1269 TT_HoriHeader horizontal; /* TrueType horizontal header */
nuclear@0 1270
nuclear@0 1271 TT_MaxProfile max_profile;
nuclear@0 1272 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
nuclear@0 1273 FT_ULong max_components; /* stubbed to 0 */
nuclear@0 1274 #endif
nuclear@0 1275
nuclear@0 1276 FT_Bool vertical_info;
nuclear@0 1277 TT_VertHeader vertical; /* TT Vertical header, if present */
nuclear@0 1278
nuclear@0 1279 FT_UShort num_names; /* number of name records */
nuclear@0 1280 TT_NameTableRec name_table; /* name table */
nuclear@0 1281
nuclear@0 1282 TT_OS2 os2; /* TrueType OS/2 table */
nuclear@0 1283 TT_Postscript postscript; /* TrueType Postscript table */
nuclear@0 1284
nuclear@0 1285 FT_Byte* cmap_table; /* extracted `cmap' table */
nuclear@0 1286 FT_ULong cmap_size;
nuclear@0 1287
nuclear@0 1288 TT_Loader_GotoTableFunc goto_table;
nuclear@0 1289
nuclear@0 1290 TT_Loader_StartGlyphFunc access_glyph_frame;
nuclear@0 1291 TT_Loader_EndGlyphFunc forget_glyph_frame;
nuclear@0 1292 TT_Loader_ReadGlyphFunc read_glyph_header;
nuclear@0 1293 TT_Loader_ReadGlyphFunc read_simple_glyph;
nuclear@0 1294 TT_Loader_ReadGlyphFunc read_composite_glyph;
nuclear@0 1295
nuclear@0 1296 /* a typeless pointer to the SFNT_Interface table used to load */
nuclear@0 1297 /* the basic TrueType tables in the face object */
nuclear@0 1298 void* sfnt;
nuclear@0 1299
nuclear@0 1300 /* a typeless pointer to the FT_Service_PsCMapsRec table used to */
nuclear@0 1301 /* handle glyph names <-> unicode & Mac values */
nuclear@0 1302 void* psnames;
nuclear@0 1303
nuclear@0 1304
nuclear@0 1305 /***********************************************************************/
nuclear@0 1306 /* */
nuclear@0 1307 /* Optional TrueType/OpenType tables */
nuclear@0 1308 /* */
nuclear@0 1309 /***********************************************************************/
nuclear@0 1310
nuclear@0 1311 /* horizontal device metrics */
nuclear@0 1312 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
nuclear@0 1313 TT_HdmxRec hdmx;
nuclear@0 1314 #endif
nuclear@0 1315
nuclear@0 1316 /* grid-fitting and scaling table */
nuclear@0 1317 TT_GaspRec gasp; /* the `gasp' table */
nuclear@0 1318
nuclear@0 1319 /* PCL 5 table */
nuclear@0 1320 TT_PCLT pclt;
nuclear@0 1321
nuclear@0 1322 /* embedded bitmaps support */
nuclear@0 1323 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
nuclear@0 1324 FT_ULong num_sbit_strikes;
nuclear@0 1325 TT_SBit_Strike sbit_strikes;
nuclear@0 1326 #endif
nuclear@0 1327
nuclear@0 1328 FT_ULong num_sbit_scales;
nuclear@0 1329 TT_SBit_Scale sbit_scales;
nuclear@0 1330
nuclear@0 1331 /* postscript names table */
nuclear@0 1332 TT_Post_NamesRec postscript_names;
nuclear@0 1333
nuclear@0 1334
nuclear@0 1335 /***********************************************************************/
nuclear@0 1336 /* */
nuclear@0 1337 /* TrueType-specific fields (ignored by the OTF-Type2 driver) */
nuclear@0 1338 /* */
nuclear@0 1339 /***********************************************************************/
nuclear@0 1340
nuclear@0 1341 /* the glyph locations */
nuclear@0 1342 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
nuclear@0 1343 FT_UShort num_locations_stub;
nuclear@0 1344 FT_Long* glyph_locations_stub;
nuclear@0 1345 #endif
nuclear@0 1346
nuclear@0 1347 /* the font program, if any */
nuclear@0 1348 FT_ULong font_program_size;
nuclear@0 1349 FT_Byte* font_program;
nuclear@0 1350
nuclear@0 1351 /* the cvt program, if any */
nuclear@0 1352 FT_ULong cvt_program_size;
nuclear@0 1353 FT_Byte* cvt_program;
nuclear@0 1354
nuclear@0 1355 /* the original, unscaled, control value table */
nuclear@0 1356 FT_ULong cvt_size;
nuclear@0 1357 FT_Short* cvt;
nuclear@0 1358
nuclear@0 1359 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
nuclear@0 1360 /* the format 0 kerning table, if any */
nuclear@0 1361 FT_Int num_kern_pairs;
nuclear@0 1362 FT_Int kern_table_index;
nuclear@0 1363 TT_Kern0_Pair kern_pairs;
nuclear@0 1364 #endif
nuclear@0 1365
nuclear@0 1366 /* A pointer to the bytecode interpreter to use. This is also */
nuclear@0 1367 /* used to hook the debugger for the `ttdebug' utility. */
nuclear@0 1368 TT_Interpreter interpreter;
nuclear@0 1369
nuclear@0 1370 #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
nuclear@0 1371 /* Use unpatented hinting only. */
nuclear@0 1372 FT_Bool unpatented_hinting;
nuclear@0 1373 #endif
nuclear@0 1374
nuclear@0 1375 /***********************************************************************/
nuclear@0 1376 /* */
nuclear@0 1377 /* Other tables or fields. This is used by derivative formats like */
nuclear@0 1378 /* OpenType. */
nuclear@0 1379 /* */
nuclear@0 1380 /***********************************************************************/
nuclear@0 1381
nuclear@0 1382 FT_Generic extra;
nuclear@0 1383
nuclear@0 1384 const char* postscript_name;
nuclear@0 1385
nuclear@0 1386 /* since version 2.1.8, but was originally placed after */
nuclear@0 1387 /* `glyph_locations_stub' */
nuclear@0 1388 FT_ULong glyf_len;
nuclear@0 1389
nuclear@0 1390 /* since version 2.1.8, but was originally placed before `extra' */
nuclear@0 1391 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
nuclear@0 1392 FT_Bool doblend;
nuclear@0 1393 GX_Blend blend;
nuclear@0 1394 #endif
nuclear@0 1395
nuclear@0 1396 /* since version 2.2 */
nuclear@0 1397
nuclear@0 1398 FT_Byte* horz_metrics;
nuclear@0 1399 FT_ULong horz_metrics_size;
nuclear@0 1400
nuclear@0 1401 FT_Byte* vert_metrics;
nuclear@0 1402 FT_ULong vert_metrics_size;
nuclear@0 1403
nuclear@0 1404 FT_ULong num_locations; /* in broken TTF, gid > 0xFFFF */
nuclear@0 1405 FT_Byte* glyph_locations;
nuclear@0 1406
nuclear@0 1407 FT_Byte* hdmx_table;
nuclear@0 1408 FT_ULong hdmx_table_size;
nuclear@0 1409 FT_UInt hdmx_record_count;
nuclear@0 1410 FT_ULong hdmx_record_size;
nuclear@0 1411 FT_Byte* hdmx_record_sizes;
nuclear@0 1412
nuclear@0 1413 FT_Byte* sbit_table;
nuclear@0 1414 FT_ULong sbit_table_size;
nuclear@0 1415 FT_UInt sbit_num_strikes;
nuclear@0 1416
nuclear@0 1417 FT_Byte* kern_table;
nuclear@0 1418 FT_ULong kern_table_size;
nuclear@0 1419 FT_UInt num_kern_tables;
nuclear@0 1420 FT_UInt32 kern_avail_bits;
nuclear@0 1421 FT_UInt32 kern_order_bits;
nuclear@0 1422
nuclear@0 1423 #ifdef TT_CONFIG_OPTION_BDF
nuclear@0 1424 TT_BDFRec bdf;
nuclear@0 1425 #endif /* TT_CONFIG_OPTION_BDF */
nuclear@0 1426
nuclear@0 1427 /* since 2.3.0 */
nuclear@0 1428 FT_ULong horz_metrics_offset;
nuclear@0 1429 FT_ULong vert_metrics_offset;
nuclear@0 1430
nuclear@0 1431 } TT_FaceRec;
nuclear@0 1432
nuclear@0 1433
nuclear@0 1434 /*************************************************************************/
nuclear@0 1435 /* */
nuclear@0 1436 /* <Struct> */
nuclear@0 1437 /* TT_GlyphZoneRec */
nuclear@0 1438 /* */
nuclear@0 1439 /* <Description> */
nuclear@0 1440 /* A glyph zone is used to load, scale and hint glyph outline */
nuclear@0 1441 /* coordinates. */
nuclear@0 1442 /* */
nuclear@0 1443 /* <Fields> */
nuclear@0 1444 /* memory :: A handle to the memory manager. */
nuclear@0 1445 /* */
nuclear@0 1446 /* max_points :: The maximal size in points of the zone. */
nuclear@0 1447 /* */
nuclear@0 1448 /* max_contours :: Max size in links contours of the zone. */
nuclear@0 1449 /* */
nuclear@0 1450 /* n_points :: The current number of points in the zone. */
nuclear@0 1451 /* */
nuclear@0 1452 /* n_contours :: The current number of contours in the zone. */
nuclear@0 1453 /* */
nuclear@0 1454 /* org :: The original glyph coordinates (font */
nuclear@0 1455 /* units/scaled). */
nuclear@0 1456 /* */
nuclear@0 1457 /* cur :: The current glyph coordinates (scaled/hinted). */
nuclear@0 1458 /* */
nuclear@0 1459 /* tags :: The point control tags. */
nuclear@0 1460 /* */
nuclear@0 1461 /* contours :: The contours end points. */
nuclear@0 1462 /* */
nuclear@0 1463 /* first_point :: Offset of the current subglyph's first point. */
nuclear@0 1464 /* */
nuclear@0 1465 typedef struct TT_GlyphZoneRec_
nuclear@0 1466 {
nuclear@0 1467 FT_Memory memory;
nuclear@0 1468 FT_UShort max_points;
nuclear@0 1469 FT_UShort max_contours;
nuclear@0 1470 FT_UShort n_points; /* number of points in zone */
nuclear@0 1471 FT_Short n_contours; /* number of contours */
nuclear@0 1472
nuclear@0 1473 FT_Vector* org; /* original point coordinates */
nuclear@0 1474 FT_Vector* cur; /* current point coordinates */
nuclear@0 1475 FT_Vector* orus; /* original (unscaled) point coordinates */
nuclear@0 1476
nuclear@0 1477 FT_Byte* tags; /* current touch flags */
nuclear@0 1478 FT_UShort* contours; /* contour end points */
nuclear@0 1479
nuclear@0 1480 FT_UShort first_point; /* offset of first (#0) point */
nuclear@0 1481
nuclear@0 1482 } TT_GlyphZoneRec, *TT_GlyphZone;
nuclear@0 1483
nuclear@0 1484
nuclear@0 1485 /* handle to execution context */
nuclear@0 1486 typedef struct TT_ExecContextRec_* TT_ExecContext;
nuclear@0 1487
nuclear@0 1488 /* glyph loader structure */
nuclear@0 1489 typedef struct TT_LoaderRec_
nuclear@0 1490 {
nuclear@0 1491 FT_Face face;
nuclear@0 1492 FT_Size size;
nuclear@0 1493 FT_GlyphSlot glyph;
nuclear@0 1494 FT_GlyphLoader gloader;
nuclear@0 1495
nuclear@0 1496 FT_ULong load_flags;
nuclear@0 1497 FT_UInt glyph_index;
nuclear@0 1498
nuclear@0 1499 FT_Stream stream;
nuclear@0 1500 FT_Int byte_len;
nuclear@0 1501
nuclear@0 1502 FT_Short n_contours;
nuclear@0 1503 FT_BBox bbox;
nuclear@0 1504 FT_Int left_bearing;
nuclear@0 1505 FT_Int advance;
nuclear@0 1506 FT_Int linear;
nuclear@0 1507 FT_Bool linear_def;
nuclear@0 1508 FT_Bool preserve_pps;
nuclear@0 1509 FT_Vector pp1;
nuclear@0 1510 FT_Vector pp2;
nuclear@0 1511
nuclear@0 1512 FT_ULong glyf_offset;
nuclear@0 1513
nuclear@0 1514 /* the zone where we load our glyphs */
nuclear@0 1515 TT_GlyphZoneRec base;
nuclear@0 1516 TT_GlyphZoneRec zone;
nuclear@0 1517
nuclear@0 1518 TT_ExecContext exec;
nuclear@0 1519 FT_Byte* instructions;
nuclear@0 1520 FT_ULong ins_pos;
nuclear@0 1521
nuclear@0 1522 /* for possible extensibility in other formats */
nuclear@0 1523 void* other;
nuclear@0 1524
nuclear@0 1525 /* since version 2.1.8 */
nuclear@0 1526 FT_Int top_bearing;
nuclear@0 1527 FT_Int vadvance;
nuclear@0 1528 FT_Vector pp3;
nuclear@0 1529 FT_Vector pp4;
nuclear@0 1530
nuclear@0 1531 /* since version 2.2.1 */
nuclear@0 1532 FT_Byte* cursor;
nuclear@0 1533 FT_Byte* limit;
nuclear@0 1534
nuclear@0 1535 } TT_LoaderRec;
nuclear@0 1536
nuclear@0 1537
nuclear@0 1538 FT_END_HEADER
nuclear@0 1539
nuclear@0 1540 #endif /* __TTTYPES_H__ */
nuclear@0 1541
nuclear@0 1542
nuclear@0 1543 /* END */