nuclear@0: /***************************************************************************/ nuclear@0: /* */ nuclear@0: /* tttables.h */ nuclear@0: /* */ nuclear@0: /* Basic SFNT/TrueType tables definitions and interface */ nuclear@0: /* (specification only). */ nuclear@0: /* */ nuclear@0: /* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2008, 2009, 2010 by */ nuclear@0: /* David Turner, Robert Wilhelm, and Werner Lemberg. */ nuclear@0: /* */ nuclear@0: /* This file is part of the FreeType project, and may only be used, */ nuclear@0: /* modified, and distributed under the terms of the FreeType project */ nuclear@0: /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ nuclear@0: /* this file you indicate that you have read the license and */ nuclear@0: /* understand and accept it fully. */ nuclear@0: /* */ nuclear@0: /***************************************************************************/ nuclear@0: nuclear@0: nuclear@0: #ifndef __TTTABLES_H__ nuclear@0: #define __TTTABLES_H__ nuclear@0: nuclear@0: nuclear@0: #include nuclear@0: #include FT_FREETYPE_H nuclear@0: nuclear@0: #ifdef FREETYPE_H nuclear@0: #error "freetype.h of FreeType 1 has been loaded!" nuclear@0: #error "Please fix the directory search order for header files" nuclear@0: #error "so that freetype.h of FreeType 2 is found first." nuclear@0: #endif nuclear@0: nuclear@0: nuclear@0: FT_BEGIN_HEADER nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /*
*/ nuclear@0: /* truetype_tables */ nuclear@0: /* */ nuclear@0: /* */ nuclear@0: /* TrueType Tables */ nuclear@0: /* */ nuclear@0: /* <Abstract> */ nuclear@0: /* TrueType specific table types and functions. */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* This section contains the definition of TrueType-specific tables */ nuclear@0: /* as well as some routines used to access and process them. */ nuclear@0: /* */ nuclear@0: /*************************************************************************/ nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Struct> */ nuclear@0: /* TT_Header */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* A structure used to model a TrueType font header table. All */ nuclear@0: /* fields follow the TrueType specification. */ nuclear@0: /* */ nuclear@0: typedef struct TT_Header_ nuclear@0: { nuclear@0: FT_Fixed Table_Version; nuclear@0: FT_Fixed Font_Revision; nuclear@0: nuclear@0: FT_Long CheckSum_Adjust; nuclear@0: FT_Long Magic_Number; nuclear@0: nuclear@0: FT_UShort Flags; nuclear@0: FT_UShort Units_Per_EM; nuclear@0: nuclear@0: FT_Long Created [2]; nuclear@0: FT_Long Modified[2]; nuclear@0: nuclear@0: FT_Short xMin; nuclear@0: FT_Short yMin; nuclear@0: FT_Short xMax; nuclear@0: FT_Short yMax; nuclear@0: nuclear@0: FT_UShort Mac_Style; nuclear@0: FT_UShort Lowest_Rec_PPEM; nuclear@0: nuclear@0: FT_Short Font_Direction; nuclear@0: FT_Short Index_To_Loc_Format; nuclear@0: FT_Short Glyph_Data_Format; nuclear@0: nuclear@0: } TT_Header; nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Struct> */ nuclear@0: /* TT_HoriHeader */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* A structure used to model a TrueType horizontal header, the `hhea' */ nuclear@0: /* table, as well as the corresponding horizontal metrics table, */ nuclear@0: /* i.e., the `hmtx' table. */ nuclear@0: /* */ nuclear@0: /* <Fields> */ nuclear@0: /* Version :: The table version. */ nuclear@0: /* */ nuclear@0: /* Ascender :: The font's ascender, i.e., the distance */ nuclear@0: /* from the baseline to the top-most of all */ nuclear@0: /* glyph points found in the font. */ nuclear@0: /* */ nuclear@0: /* This value is invalid in many fonts, as */ nuclear@0: /* it is usually set by the font designer, */ nuclear@0: /* and often reflects only a portion of the */ nuclear@0: /* glyphs found in the font (maybe ASCII). */ nuclear@0: /* */ nuclear@0: /* You should use the `sTypoAscender' field */ nuclear@0: /* of the OS/2 table instead if you want */ nuclear@0: /* the correct one. */ nuclear@0: /* */ nuclear@0: /* Descender :: The font's descender, i.e., the distance */ nuclear@0: /* from the baseline to the bottom-most of */ nuclear@0: /* all glyph points found in the font. It */ nuclear@0: /* is negative. */ nuclear@0: /* */ nuclear@0: /* This value is invalid in many fonts, as */ nuclear@0: /* it is usually set by the font designer, */ nuclear@0: /* and often reflects only a portion of the */ nuclear@0: /* glyphs found in the font (maybe ASCII). */ nuclear@0: /* */ nuclear@0: /* You should use the `sTypoDescender' */ nuclear@0: /* field of the OS/2 table instead if you */ nuclear@0: /* want the correct one. */ nuclear@0: /* */ nuclear@0: /* Line_Gap :: The font's line gap, i.e., the distance */ nuclear@0: /* to add to the ascender and descender to */ nuclear@0: /* get the BTB, i.e., the */ nuclear@0: /* baseline-to-baseline distance for the */ nuclear@0: /* font. */ nuclear@0: /* */ nuclear@0: /* advance_Width_Max :: This field is the maximum of all advance */ nuclear@0: /* widths found in the font. It can be */ nuclear@0: /* used to compute the maximum width of an */ nuclear@0: /* arbitrary string of text. */ nuclear@0: /* */ nuclear@0: /* min_Left_Side_Bearing :: The minimum left side bearing of all */ nuclear@0: /* glyphs within the font. */ nuclear@0: /* */ nuclear@0: /* min_Right_Side_Bearing :: The minimum right side bearing of all */ nuclear@0: /* glyphs within the font. */ nuclear@0: /* */ nuclear@0: /* xMax_Extent :: The maximum horizontal extent (i.e., the */ nuclear@0: /* `width' of a glyph's bounding box) for */ nuclear@0: /* all glyphs in the font. */ nuclear@0: /* */ nuclear@0: /* caret_Slope_Rise :: The rise coefficient of the cursor's */ nuclear@0: /* slope of the cursor (slope=rise/run). */ nuclear@0: /* */ nuclear@0: /* caret_Slope_Run :: The run coefficient of the cursor's */ nuclear@0: /* slope. */ nuclear@0: /* */ nuclear@0: /* Reserved :: 8~reserved bytes. */ nuclear@0: /* */ nuclear@0: /* metric_Data_Format :: Always~0. */ nuclear@0: /* */ nuclear@0: /* number_Of_HMetrics :: Number of HMetrics entries in the `hmtx' */ nuclear@0: /* table -- this value can be smaller than */ nuclear@0: /* the total number of glyphs in the font. */ nuclear@0: /* */ nuclear@0: /* long_metrics :: A pointer into the `hmtx' table. */ nuclear@0: /* */ nuclear@0: /* short_metrics :: A pointer into the `hmtx' table. */ nuclear@0: /* */ nuclear@0: /* <Note> */ nuclear@0: /* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */ nuclear@0: /* be identical except for the names of their fields which */ nuclear@0: /* are different. */ nuclear@0: /* */ nuclear@0: /* This ensures that a single function in the `ttload' */ nuclear@0: /* module is able to read both the horizontal and vertical */ nuclear@0: /* headers. */ nuclear@0: /* */ nuclear@0: typedef struct TT_HoriHeader_ nuclear@0: { nuclear@0: FT_Fixed Version; nuclear@0: FT_Short Ascender; nuclear@0: FT_Short Descender; nuclear@0: FT_Short Line_Gap; nuclear@0: nuclear@0: FT_UShort advance_Width_Max; /* advance width maximum */ nuclear@0: nuclear@0: FT_Short min_Left_Side_Bearing; /* minimum left-sb */ nuclear@0: FT_Short min_Right_Side_Bearing; /* minimum right-sb */ nuclear@0: FT_Short xMax_Extent; /* xmax extents */ nuclear@0: FT_Short caret_Slope_Rise; nuclear@0: FT_Short caret_Slope_Run; nuclear@0: FT_Short caret_Offset; nuclear@0: nuclear@0: FT_Short Reserved[4]; nuclear@0: nuclear@0: FT_Short metric_Data_Format; nuclear@0: FT_UShort number_Of_HMetrics; nuclear@0: nuclear@0: /* The following fields are not defined by the TrueType specification */ nuclear@0: /* but they are used to connect the metrics header to the relevant */ nuclear@0: /* `HMTX' table. */ nuclear@0: nuclear@0: void* long_metrics; nuclear@0: void* short_metrics; nuclear@0: nuclear@0: } TT_HoriHeader; nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Struct> */ nuclear@0: /* TT_VertHeader */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* A structure used to model a TrueType vertical header, the `vhea' */ nuclear@0: /* table, as well as the corresponding vertical metrics table, i.e., */ nuclear@0: /* the `vmtx' table. */ nuclear@0: /* */ nuclear@0: /* <Fields> */ nuclear@0: /* Version :: The table version. */ nuclear@0: /* */ nuclear@0: /* Ascender :: The font's ascender, i.e., the distance */ nuclear@0: /* from the baseline to the top-most of */ nuclear@0: /* all glyph points found in the font. */ nuclear@0: /* */ nuclear@0: /* This value is invalid in many fonts, as */ nuclear@0: /* it is usually set by the font designer, */ nuclear@0: /* and often reflects only a portion of */ nuclear@0: /* the glyphs found in the font (maybe */ nuclear@0: /* ASCII). */ nuclear@0: /* */ nuclear@0: /* You should use the `sTypoAscender' */ nuclear@0: /* field of the OS/2 table instead if you */ nuclear@0: /* want the correct one. */ nuclear@0: /* */ nuclear@0: /* Descender :: The font's descender, i.e., the */ nuclear@0: /* distance from the baseline to the */ nuclear@0: /* bottom-most of all glyph points found */ nuclear@0: /* in the font. It is negative. */ nuclear@0: /* */ nuclear@0: /* This value is invalid in many fonts, as */ nuclear@0: /* it is usually set by the font designer, */ nuclear@0: /* and often reflects only a portion of */ nuclear@0: /* the glyphs found in the font (maybe */ nuclear@0: /* ASCII). */ nuclear@0: /* */ nuclear@0: /* You should use the `sTypoDescender' */ nuclear@0: /* field of the OS/2 table instead if you */ nuclear@0: /* want the correct one. */ nuclear@0: /* */ nuclear@0: /* Line_Gap :: The font's line gap, i.e., the distance */ nuclear@0: /* to add to the ascender and descender to */ nuclear@0: /* get the BTB, i.e., the */ nuclear@0: /* baseline-to-baseline distance for the */ nuclear@0: /* font. */ nuclear@0: /* */ nuclear@0: /* advance_Height_Max :: This field is the maximum of all */ nuclear@0: /* advance heights found in the font. It */ nuclear@0: /* can be used to compute the maximum */ nuclear@0: /* height of an arbitrary string of text. */ nuclear@0: /* */ nuclear@0: /* min_Top_Side_Bearing :: The minimum top side bearing of all */ nuclear@0: /* glyphs within the font. */ nuclear@0: /* */ nuclear@0: /* min_Bottom_Side_Bearing :: The minimum bottom side bearing of all */ nuclear@0: /* glyphs within the font. */ nuclear@0: /* */ nuclear@0: /* yMax_Extent :: The maximum vertical extent (i.e., the */ nuclear@0: /* `height' of a glyph's bounding box) for */ nuclear@0: /* all glyphs in the font. */ nuclear@0: /* */ nuclear@0: /* caret_Slope_Rise :: The rise coefficient of the cursor's */ nuclear@0: /* slope of the cursor (slope=rise/run). */ nuclear@0: /* */ nuclear@0: /* caret_Slope_Run :: The run coefficient of the cursor's */ nuclear@0: /* slope. */ nuclear@0: /* */ nuclear@0: /* caret_Offset :: The cursor's offset for slanted fonts. */ nuclear@0: /* This value is `reserved' in vmtx */ nuclear@0: /* version 1.0. */ nuclear@0: /* */ nuclear@0: /* Reserved :: 8~reserved bytes. */ nuclear@0: /* */ nuclear@0: /* metric_Data_Format :: Always~0. */ nuclear@0: /* */ nuclear@0: /* number_Of_HMetrics :: Number of VMetrics entries in the */ nuclear@0: /* `vmtx' table -- this value can be */ nuclear@0: /* smaller than the total number of glyphs */ nuclear@0: /* in the font. */ nuclear@0: /* */ nuclear@0: /* long_metrics :: A pointer into the `vmtx' table. */ nuclear@0: /* */ nuclear@0: /* short_metrics :: A pointer into the `vmtx' table. */ nuclear@0: /* */ nuclear@0: /* <Note> */ nuclear@0: /* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */ nuclear@0: /* be identical except for the names of their fields which */ nuclear@0: /* are different. */ nuclear@0: /* */ nuclear@0: /* This ensures that a single function in the `ttload' */ nuclear@0: /* module is able to read both the horizontal and vertical */ nuclear@0: /* headers. */ nuclear@0: /* */ nuclear@0: typedef struct TT_VertHeader_ nuclear@0: { nuclear@0: FT_Fixed Version; nuclear@0: FT_Short Ascender; nuclear@0: FT_Short Descender; nuclear@0: FT_Short Line_Gap; nuclear@0: nuclear@0: FT_UShort advance_Height_Max; /* advance height maximum */ nuclear@0: nuclear@0: FT_Short min_Top_Side_Bearing; /* minimum left-sb or top-sb */ nuclear@0: FT_Short min_Bottom_Side_Bearing; /* minimum right-sb or bottom-sb */ nuclear@0: FT_Short yMax_Extent; /* xmax or ymax extents */ nuclear@0: FT_Short caret_Slope_Rise; nuclear@0: FT_Short caret_Slope_Run; nuclear@0: FT_Short caret_Offset; nuclear@0: nuclear@0: FT_Short Reserved[4]; nuclear@0: nuclear@0: FT_Short metric_Data_Format; nuclear@0: FT_UShort number_Of_VMetrics; nuclear@0: nuclear@0: /* The following fields are not defined by the TrueType specification */ nuclear@0: /* but they're used to connect the metrics header to the relevant */ nuclear@0: /* `HMTX' or `VMTX' table. */ nuclear@0: nuclear@0: void* long_metrics; nuclear@0: void* short_metrics; nuclear@0: nuclear@0: } TT_VertHeader; nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Struct> */ nuclear@0: /* TT_OS2 */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* A structure used to model a TrueType OS/2 table. This is the long */ nuclear@0: /* table version. All fields comply to the TrueType specification. */ nuclear@0: /* */ nuclear@0: /* Note that we now support old Mac fonts which do not include an */ nuclear@0: /* OS/2 table. In this case, the `version' field is always set to */ nuclear@0: /* 0xFFFF. */ nuclear@0: /* */ nuclear@0: typedef struct TT_OS2_ nuclear@0: { nuclear@0: FT_UShort version; /* 0x0001 - more or 0xFFFF */ nuclear@0: FT_Short xAvgCharWidth; nuclear@0: FT_UShort usWeightClass; nuclear@0: FT_UShort usWidthClass; nuclear@0: FT_Short fsType; nuclear@0: FT_Short ySubscriptXSize; nuclear@0: FT_Short ySubscriptYSize; nuclear@0: FT_Short ySubscriptXOffset; nuclear@0: FT_Short ySubscriptYOffset; nuclear@0: FT_Short ySuperscriptXSize; nuclear@0: FT_Short ySuperscriptYSize; nuclear@0: FT_Short ySuperscriptXOffset; nuclear@0: FT_Short ySuperscriptYOffset; nuclear@0: FT_Short yStrikeoutSize; nuclear@0: FT_Short yStrikeoutPosition; nuclear@0: FT_Short sFamilyClass; nuclear@0: nuclear@0: FT_Byte panose[10]; nuclear@0: nuclear@0: FT_ULong ulUnicodeRange1; /* Bits 0-31 */ nuclear@0: FT_ULong ulUnicodeRange2; /* Bits 32-63 */ nuclear@0: FT_ULong ulUnicodeRange3; /* Bits 64-95 */ nuclear@0: FT_ULong ulUnicodeRange4; /* Bits 96-127 */ nuclear@0: nuclear@0: FT_Char achVendID[4]; nuclear@0: nuclear@0: FT_UShort fsSelection; nuclear@0: FT_UShort usFirstCharIndex; nuclear@0: FT_UShort usLastCharIndex; nuclear@0: FT_Short sTypoAscender; nuclear@0: FT_Short sTypoDescender; nuclear@0: FT_Short sTypoLineGap; nuclear@0: FT_UShort usWinAscent; nuclear@0: FT_UShort usWinDescent; nuclear@0: nuclear@0: /* only version 1 tables: */ nuclear@0: nuclear@0: FT_ULong ulCodePageRange1; /* Bits 0-31 */ nuclear@0: FT_ULong ulCodePageRange2; /* Bits 32-63 */ nuclear@0: nuclear@0: /* only version 2 tables: */ nuclear@0: nuclear@0: FT_Short sxHeight; nuclear@0: FT_Short sCapHeight; nuclear@0: FT_UShort usDefaultChar; nuclear@0: FT_UShort usBreakChar; nuclear@0: FT_UShort usMaxContext; nuclear@0: nuclear@0: } TT_OS2; nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Struct> */ nuclear@0: /* TT_Postscript */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* A structure used to model a TrueType PostScript table. All fields */ nuclear@0: /* comply to the TrueType specification. This structure does not */ nuclear@0: /* reference the PostScript glyph names, which can be nevertheless */ nuclear@0: /* accessed with the `ttpost' module. */ nuclear@0: /* */ nuclear@0: typedef struct TT_Postscript_ nuclear@0: { nuclear@0: FT_Fixed FormatType; nuclear@0: FT_Fixed italicAngle; nuclear@0: FT_Short underlinePosition; nuclear@0: FT_Short underlineThickness; nuclear@0: FT_ULong isFixedPitch; nuclear@0: FT_ULong minMemType42; nuclear@0: FT_ULong maxMemType42; nuclear@0: FT_ULong minMemType1; nuclear@0: FT_ULong maxMemType1; nuclear@0: nuclear@0: /* Glyph names follow in the file, but we don't */ nuclear@0: /* load them by default. See the ttpost.c file. */ nuclear@0: nuclear@0: } TT_Postscript; nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Struct> */ nuclear@0: /* TT_PCLT */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* A structure used to model a TrueType PCLT table. All fields */ nuclear@0: /* comply to the TrueType specification. */ nuclear@0: /* */ nuclear@0: typedef struct TT_PCLT_ nuclear@0: { nuclear@0: FT_Fixed Version; nuclear@0: FT_ULong FontNumber; nuclear@0: FT_UShort Pitch; nuclear@0: FT_UShort xHeight; nuclear@0: FT_UShort Style; nuclear@0: FT_UShort TypeFamily; nuclear@0: FT_UShort CapHeight; nuclear@0: FT_UShort SymbolSet; nuclear@0: FT_Char TypeFace[16]; nuclear@0: FT_Char CharacterComplement[8]; nuclear@0: FT_Char FileName[6]; nuclear@0: FT_Char StrokeWeight; nuclear@0: FT_Char WidthType; nuclear@0: FT_Byte SerifStyle; nuclear@0: FT_Byte Reserved; nuclear@0: nuclear@0: } TT_PCLT; nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Struct> */ nuclear@0: /* TT_MaxProfile */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* The maximum profile is a table containing many max values which */ nuclear@0: /* can be used to pre-allocate arrays. This ensures that no memory */ nuclear@0: /* allocation occurs during a glyph load. */ nuclear@0: /* */ nuclear@0: /* <Fields> */ nuclear@0: /* version :: The version number. */ nuclear@0: /* */ nuclear@0: /* numGlyphs :: The number of glyphs in this TrueType */ nuclear@0: /* font. */ nuclear@0: /* */ nuclear@0: /* maxPoints :: The maximum number of points in a */ nuclear@0: /* non-composite TrueType glyph. See also */ nuclear@0: /* the structure element */ nuclear@0: /* `maxCompositePoints'. */ nuclear@0: /* */ nuclear@0: /* maxContours :: The maximum number of contours in a */ nuclear@0: /* non-composite TrueType glyph. See also */ nuclear@0: /* the structure element */ nuclear@0: /* `maxCompositeContours'. */ nuclear@0: /* */ nuclear@0: /* maxCompositePoints :: The maximum number of points in a */ nuclear@0: /* composite TrueType glyph. See also the */ nuclear@0: /* structure element `maxPoints'. */ nuclear@0: /* */ nuclear@0: /* maxCompositeContours :: The maximum number of contours in a */ nuclear@0: /* composite TrueType glyph. See also the */ nuclear@0: /* structure element `maxContours'. */ nuclear@0: /* */ nuclear@0: /* maxZones :: The maximum number of zones used for */ nuclear@0: /* glyph hinting. */ nuclear@0: /* */ nuclear@0: /* maxTwilightPoints :: The maximum number of points in the */ nuclear@0: /* twilight zone used for glyph hinting. */ nuclear@0: /* */ nuclear@0: /* maxStorage :: The maximum number of elements in the */ nuclear@0: /* storage area used for glyph hinting. */ nuclear@0: /* */ nuclear@0: /* maxFunctionDefs :: The maximum number of function */ nuclear@0: /* definitions in the TrueType bytecode for */ nuclear@0: /* this font. */ nuclear@0: /* */ nuclear@0: /* maxInstructionDefs :: The maximum number of instruction */ nuclear@0: /* definitions in the TrueType bytecode for */ nuclear@0: /* this font. */ nuclear@0: /* */ nuclear@0: /* maxStackElements :: The maximum number of stack elements used */ nuclear@0: /* during bytecode interpretation. */ nuclear@0: /* */ nuclear@0: /* maxSizeOfInstructions :: The maximum number of TrueType opcodes */ nuclear@0: /* used for glyph hinting. */ nuclear@0: /* */ nuclear@0: /* maxComponentElements :: The maximum number of simple (i.e., non- */ nuclear@0: /* composite) glyphs in a composite glyph. */ nuclear@0: /* */ nuclear@0: /* maxComponentDepth :: The maximum nesting depth of composite */ nuclear@0: /* glyphs. */ nuclear@0: /* */ nuclear@0: /* <Note> */ nuclear@0: /* This structure is only used during font loading. */ nuclear@0: /* */ nuclear@0: typedef struct TT_MaxProfile_ nuclear@0: { nuclear@0: FT_Fixed version; nuclear@0: FT_UShort numGlyphs; nuclear@0: FT_UShort maxPoints; nuclear@0: FT_UShort maxContours; nuclear@0: FT_UShort maxCompositePoints; nuclear@0: FT_UShort maxCompositeContours; nuclear@0: FT_UShort maxZones; nuclear@0: FT_UShort maxTwilightPoints; nuclear@0: FT_UShort maxStorage; nuclear@0: FT_UShort maxFunctionDefs; nuclear@0: FT_UShort maxInstructionDefs; nuclear@0: FT_UShort maxStackElements; nuclear@0: FT_UShort maxSizeOfInstructions; nuclear@0: FT_UShort maxComponentElements; nuclear@0: FT_UShort maxComponentDepth; nuclear@0: nuclear@0: } TT_MaxProfile; nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Enum> */ nuclear@0: /* FT_Sfnt_Tag */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* An enumeration used to specify the index of an SFNT table. */ nuclear@0: /* Used in the @FT_Get_Sfnt_Table API function. */ nuclear@0: /* */ nuclear@0: typedef enum FT_Sfnt_Tag_ nuclear@0: { nuclear@0: ft_sfnt_head = 0, /* TT_Header */ nuclear@0: ft_sfnt_maxp = 1, /* TT_MaxProfile */ nuclear@0: ft_sfnt_os2 = 2, /* TT_OS2 */ nuclear@0: ft_sfnt_hhea = 3, /* TT_HoriHeader */ nuclear@0: ft_sfnt_vhea = 4, /* TT_VertHeader */ nuclear@0: ft_sfnt_post = 5, /* TT_Postscript */ nuclear@0: ft_sfnt_pclt = 6, /* TT_PCLT */ nuclear@0: nuclear@0: sfnt_max /* internal end mark */ nuclear@0: nuclear@0: } FT_Sfnt_Tag; nuclear@0: nuclear@0: /* */ nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Function> */ nuclear@0: /* FT_Get_Sfnt_Table */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* Return a pointer to a given SFNT table within a face. */ nuclear@0: /* */ nuclear@0: /* <Input> */ nuclear@0: /* face :: A handle to the source. */ nuclear@0: /* */ nuclear@0: /* tag :: The index of the SFNT table. */ nuclear@0: /* */ nuclear@0: /* <Return> */ nuclear@0: /* A type-less pointer to the table. This will be~0 in case of */ nuclear@0: /* error, or if the corresponding table was not found *OR* loaded */ nuclear@0: /* from the file. */ nuclear@0: /* */ nuclear@0: /* Use a typecast according to `tag' to access the structure */ nuclear@0: /* elements. */ nuclear@0: /* */ nuclear@0: /* <Note> */ nuclear@0: /* The table is owned by the face object and disappears with it. */ nuclear@0: /* */ nuclear@0: /* This function is only useful to access SFNT tables that are loaded */ nuclear@0: /* by the sfnt, truetype, and opentype drivers. See @FT_Sfnt_Tag for */ nuclear@0: /* a list. */ nuclear@0: /* */ nuclear@0: FT_EXPORT( void* ) nuclear@0: FT_Get_Sfnt_Table( FT_Face face, nuclear@0: FT_Sfnt_Tag tag ); nuclear@0: nuclear@0: nuclear@0: /************************************************************************** nuclear@0: * nuclear@0: * @function: nuclear@0: * FT_Load_Sfnt_Table nuclear@0: * nuclear@0: * @description: nuclear@0: * Load any font table into client memory. nuclear@0: * nuclear@0: * @input: nuclear@0: * face :: nuclear@0: * A handle to the source face. nuclear@0: * nuclear@0: * tag :: nuclear@0: * The four-byte tag of the table to load. Use the value~0 if you want nuclear@0: * to access the whole font file. Otherwise, you can use one of the nuclear@0: * definitions found in the @FT_TRUETYPE_TAGS_H file, or forge a new nuclear@0: * one with @FT_MAKE_TAG. nuclear@0: * nuclear@0: * offset :: nuclear@0: * The starting offset in the table (or file if tag == 0). nuclear@0: * nuclear@0: * @output: nuclear@0: * buffer :: nuclear@0: * The target buffer address. The client must ensure that the memory nuclear@0: * array is big enough to hold the data. nuclear@0: * nuclear@0: * @inout: nuclear@0: * length :: nuclear@0: * If the `length' parameter is NULL, then try to load the whole table. nuclear@0: * Return an error code if it fails. nuclear@0: * nuclear@0: * Else, if `*length' is~0, exit immediately while returning the nuclear@0: * table's (or file) full size in it. nuclear@0: * nuclear@0: * Else the number of bytes to read from the table or file, from the nuclear@0: * starting offset. nuclear@0: * nuclear@0: * @return: nuclear@0: * FreeType error code. 0~means success. nuclear@0: * nuclear@0: * @note: nuclear@0: * If you need to determine the table's length you should first call this nuclear@0: * function with `*length' set to~0, as in the following example: nuclear@0: * nuclear@0: * { nuclear@0: * FT_ULong length = 0; nuclear@0: * nuclear@0: * nuclear@0: * error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length ); nuclear@0: * if ( error ) { ... table does not exist ... } nuclear@0: * nuclear@0: * buffer = malloc( length ); nuclear@0: * if ( buffer == NULL ) { ... not enough memory ... } nuclear@0: * nuclear@0: * error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length ); nuclear@0: * if ( error ) { ... could not load table ... } nuclear@0: * } nuclear@0: */ nuclear@0: FT_EXPORT( FT_Error ) nuclear@0: FT_Load_Sfnt_Table( FT_Face face, nuclear@0: FT_ULong tag, nuclear@0: FT_Long offset, nuclear@0: FT_Byte* buffer, nuclear@0: FT_ULong* length ); nuclear@0: nuclear@0: nuclear@0: /************************************************************************** nuclear@0: * nuclear@0: * @function: nuclear@0: * FT_Sfnt_Table_Info nuclear@0: * nuclear@0: * @description: nuclear@0: * Return information on an SFNT table. nuclear@0: * nuclear@0: * @input: nuclear@0: * face :: nuclear@0: * A handle to the source face. nuclear@0: * nuclear@0: * table_index :: nuclear@0: * The index of an SFNT table. The function returns nuclear@0: * FT_Err_Table_Missing for an invalid value. nuclear@0: * nuclear@0: * @output: nuclear@0: * tag :: nuclear@0: * The name tag of the SFNT table. nuclear@0: * nuclear@0: * length :: nuclear@0: * The length of the SFNT table. nuclear@0: * nuclear@0: * @return: nuclear@0: * FreeType error code. 0~means success. nuclear@0: * nuclear@0: * @note: nuclear@0: * SFNT tables with length zero are treated as missing. nuclear@0: * nuclear@0: */ nuclear@0: FT_EXPORT( FT_Error ) nuclear@0: FT_Sfnt_Table_Info( FT_Face face, nuclear@0: FT_UInt table_index, nuclear@0: FT_ULong *tag, nuclear@0: FT_ULong *length ); nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Function> */ nuclear@0: /* FT_Get_CMap_Language_ID */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* Return TrueType/sfnt specific cmap language ID. Definitions of */ nuclear@0: /* language ID values are in `freetype/ttnameid.h'. */ nuclear@0: /* */ nuclear@0: /* <Input> */ nuclear@0: /* charmap :: */ nuclear@0: /* The target charmap. */ nuclear@0: /* */ nuclear@0: /* <Return> */ nuclear@0: /* The language ID of `charmap'. If `charmap' doesn't belong to a */ nuclear@0: /* TrueType/sfnt face, just return~0 as the default value. */ nuclear@0: /* */ nuclear@0: FT_EXPORT( FT_ULong ) nuclear@0: FT_Get_CMap_Language_ID( FT_CharMap charmap ); nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Function> */ nuclear@0: /* FT_Get_CMap_Format */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* Return TrueType/sfnt specific cmap format. */ nuclear@0: /* */ nuclear@0: /* <Input> */ nuclear@0: /* charmap :: */ nuclear@0: /* The target charmap. */ nuclear@0: /* */ nuclear@0: /* <Return> */ nuclear@0: /* The format of `charmap'. If `charmap' doesn't belong to a */ nuclear@0: /* TrueType/sfnt face, return -1. */ nuclear@0: /* */ nuclear@0: FT_EXPORT( FT_Long ) nuclear@0: FT_Get_CMap_Format( FT_CharMap charmap ); nuclear@0: nuclear@0: /* */ nuclear@0: nuclear@0: nuclear@0: FT_END_HEADER nuclear@0: nuclear@0: #endif /* __TTTABLES_H__ */ nuclear@0: nuclear@0: nuclear@0: /* END */