📄 tttypes.h
字号:
/* */ typedef struct TT_VertHeader_ { TT_Fixed Version; TT_FWord Ascender; TT_FWord Descender; TT_FWord Line_Gap; TT_UFWord advance_Height_Max; /* advance height maximum */ TT_FWord min_Top_Side_Bearing; /* minimum left-sb or top-sb */ TT_FWord min_Bottom_Side_Bearing; /* minimum right-sb or bottom-sb */ TT_FWord yMax_Extent; /* xmax or ymax extents */ TT_FWord caret_Slope_Rise; TT_FWord caret_Slope_Run; TT_FWord caret_Offset; TT_Short Reserved[4]; TT_Short metric_Data_Format; TT_UShort number_Of_VMetrics; /* The following fields are not defined by the TrueType specification */ /* but they're used to connect the metrics header to the relevant */ /* `HMTX' or `VMTX' table. */ void* long_metrics; void* short_metrics; } TT_VertHeader; /*************************************************************************/ /* */ /* <Struct> */ /* TT_OS2 */ /* */ /* <Description> */ /* A structure used to model a TrueType OS/2 table. This is the long */ /* table version. All fields comply to the TrueType specification. */ /* */ /* Note that we now support old Mac fonts which do not include an */ /* OS/2 table. In this case, the `version' field is always set to */ /* 0xFFFF. */ /* */ typedef struct TT_OS2_ { TT_UShort version; /* 0x0001 - more or 0xFFFF */ TT_FWord xAvgCharWidth; TT_UShort usWeightClass; TT_UShort usWidthClass; TT_Short fsType; TT_FWord ySubscriptXSize; TT_FWord ySubscriptYSize; TT_FWord ySubscriptXOffset; TT_FWord ySubscriptYOffset; TT_FWord ySuperscriptXSize; TT_FWord ySuperscriptYSize; TT_FWord ySuperscriptXOffset; TT_FWord ySuperscriptYOffset; TT_FWord yStrikeoutSize; TT_FWord yStrikeoutPosition; TT_Short sFamilyClass; TT_Byte panose[10]; TT_ULong ulUnicodeRange1; /* Bits 0-31 */ TT_ULong ulUnicodeRange2; /* Bits 32-63 */ TT_ULong ulUnicodeRange3; /* Bits 64-95 */ TT_ULong ulUnicodeRange4; /* Bits 96-127 */ TT_Char achVendID[4]; TT_UShort fsSelection; TT_UShort usFirstCharIndex; TT_UShort usLastCharIndex; TT_Short sTypoAscender; TT_Short sTypoDescender; TT_Short sTypoLineGap; TT_UShort usWinAscent; TT_UShort usWinDescent; /* only version 1 tables: */ TT_ULong ulCodePageRange1; /* Bits 0-31 */ TT_ULong ulCodePageRange2; /* Bits 32-63 */ } TT_OS2; /*************************************************************************/ /* */ /* <Struct> */ /* TT_Postscript */ /* */ /* <Description> */ /* A structure used to model a TrueType Postscript table. All fields */ /* comply to the TrueType table. This structure does not reference */ /* the Postscript glyph names, which can be nevertheless accessed */ /* with the `ttpost' module. */ /* */ typedef struct TT_Postscript_ { TT_Fixed FormatType; TT_Fixed italicAngle; TT_FWord underlinePosition; TT_FWord underlineThickness; TT_ULong isFixedPitch; TT_ULong minMemType42; TT_ULong maxMemType42; TT_ULong minMemType1; TT_ULong maxMemType1; /* Glyph names follow in the file, but we don't */ /* load them by default. See the ttpost.c file. */ } TT_Postscript; /*************************************************************************/ /* */ /* <Struct> */ /* TT_CMapDir */ /* */ /* <Description> */ /* This structure describes the directory of the `cmap' table, */ /* containing the font's character mappings table. */ /* */ /* <Fields> */ /* tableVersionNumber :: The version number. */ /* numCMaps :: The number of charmaps in the font. */ /* */ /* <Note> */ /* This structure is only used during font loading. */ /* */ typedef struct TT_CMapDir_ { TT_UShort tableVersionNumber; TT_UShort numCMaps; } TT_CMapDir; /*************************************************************************/ /* */ /* <Struct> */ /* TT_CMapDirEntry */ /* */ /* <Description> */ /* This structure describes a charmap in a TrueType font. */ /* */ /* <Fields> */ /* platformID :: An ID used to specify for which platform this */ /* charmap is defined (FreeType manages all platforms). */ /* */ /* encodingID :: A platform-specific ID used to indicate which source */ /* encoding is used in this charmap. */ /* */ /* offset :: The offset of the charmap relative to the start of */ /* the `cmap' table. */ /* */ /* <Note> */ /* This structure is only used during font loading. */ /* */ typedef struct TT_CMapDirEntry_ { TT_UShort platformID; TT_UShort platformEncodingID; TT_Long offset; } TT_CMapDirEntry; /*************************************************************************/ /* */ /* <Struct> */ /* TT_MaxProfile */ /* */ /* <Description> */ /* The maximum profile is a table containing many max values which */ /* can be used to pre-allocate arrays. This ensures that no memory */ /* allocation occurs during a glyph load. */ /* */ /* <Fields> */ /* version :: The version number. */ /* */ /* numGlyphs :: The number of glyphs in this TrueType */ /* font. */ /* */ /* maxPoints :: The maximum number of points in a */ /* non-composite TrueType glyph. See also */ /* the structure element */ /* `maxCompositePoints'. */ /* */ /* maxContours :: The maximum number of contours in a */ /* non-composite TrueType glyph. See also */ /* the structure element */ /* `maxCompositeContours'. */ /* */ /* maxCompositePoints :: The maximum number of points in a */ /* composite TrueType glyph. See also the */ /* structure element `maxPoints'. */ /* */ /* maxCompositeContours :: The maximum number of contours in a */ /* composite TrueType glyph. See also the */ /* structure element `maxContours'. */ /* */ /* maxZones :: The maximum number of zones used for */ /* glyph hinting. */ /* */ /* maxTwilightPoints :: The maximum number of points in the */ /* twilight zone used for glyph hinting. */ /* */ /* maxStorage :: The maximum number of elements in the */ /* storage area used for glyph hinting. */ /* */ /* maxFunctionDefs :: The maximum number of function */ /* definitions in the TrueType bytecode for */ /* this font. */ /* */ /* maxInstructionDefs :: The maximum number of instruction */ /* definitions in the TrueType bytecode for */ /* this font. */ /* */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -