📄 tttypes.h
字号:
REDEFINE( Fixed ); /*************************************************************************/ /* */ /* <Type> */ /* TT_Pos */ /* */ /* <Description> */ /* The type FT_Pos is a 32-bit integer used to store vectorial */ /* coordinates. Depending on the context, these can represent */ /* distances in integer font units, or 26.6 fixed float pixel */ /* coordinates. */ /* */ REDEFINE( Pos ); /*************************************************************************/ /* */ /* <Struct> */ /* TT_Vector */ /* */ /* <Description> */ /* A simple structure used to store a 2d vector; coordinates are of */ /* the TT_Pos type. */ /* */ /* <Fields> */ /* x :: The horizontal coordinate. */ /* y :: The vertical coordinate. */ /* */ REDEFINE( Vector ); /*************************************************************************/ /* */ /* <Struct> */ /* TT_UnitVector */ /* */ /* <Description> */ /* A simple structure used to store a 2d vector unit vector. Uses */ /* TT_F2Dot14 types. */ /* */ /* <Fields> */ /* x :: Horizontal coordinate. */ /* y :: Vertical coordinate. */ /* */ REDEFINE( UnitVector ); /*************************************************************************/ /* */ /* <Struct> */ /* TT_Matrix */ /* */ /* <Description> */ /* A simple structure used to store a 2x2 matrix. Coefficients are */ /* in 16.16 fixed float format. The computation performed is: */ /* */ /* { */ /* x' = x*xx + y*xy */ /* y' = x*yx + y*yy */ /* } */ /* */ /* <Fields> */ /* xx :: Matrix coefficient. */ /* xy :: Matrix coefficient. */ /* yx :: Matrix coefficient. */ /* yy :: Matrix coefficient. */ /* */ REDEFINE( Matrix ); /*************************************************************************/ /* */ /* <Struct> */ /* TT_BBox */ /* */ /* <Description> */ /* A structure used to hold an outline's bounding box, i.e., the */ /* coordinates of its extrema in the horizontal and vertical */ /* directions. */ /* */ /* <Fields> */ /* xMin :: The horizontal minimum (left-most). */ /* yMin :: The vertical minimum (bottom-most). */ /* xMax :: The horizontal maximum (right-most). */ /* yMax :: The vertical maximum (top-most). */ /* */ REDEFINE( BBox ); /*************************************************************************/ /* */ /* <Type> */ /* TT_Error */ /* */ /* <Description> */ /* The TrueType error code type. A value of 0 is always interpreted */ /* as a successful operation. */ /* */ REDEFINE( Error ); /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /*** ***/ /*** ***/ /*** REQUIRED TRUETYPE/OPENTYPE TABLES DEFINITIONS ***/ /*** ***/ /*** ***/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /* */ /* <Struct> */ /* TTC_Header */ /* */ /* <Description> */ /* TrueType collection header. This table contains the offsets of */ /* the font headers of each distinct TrueType face in the file. */ /* */ /* <Fields> */ /* tag :: Must be `ttc ' to indicate a TrueType collection. */ /* version :: The version number. */ /* count :: The number of faces in the collection. The */ /* specification says this should be an unsigned long, but */ /* we use a signed long since we need the value -1 for */ /* specific purposes. */ /* offsets :: The offsets of the font headers, one per face. */ /* */ typedef struct TTC_Header_ { TT_ULong Tag; TT_Fixed version; TT_Long DirCount; TT_ULong* TableDirectory; } TTC_Header; /*************************************************************************/ /* */ /* <Struct> */ /* TT_TableDir */ /* */ /* <Description> */ /* This structure models a TrueType table directory. It is used to */ /* access the various tables of the font face. */ /* */ /* <Fields> */ /* version :: The version number; starts with 0x00010000. */ /* numTables :: The number of tables. */ /* */ /* searchRange :: Unused. */ /* entrySelector :: Unused. */ /* rangeShift :: Unused. */ /* */ /* <Note> */ /* This structure is only used during font opening. */ /* */ typedef struct TT_TableDir_ { TT_Fixed version; /* should be 0x10000 */ TT_UShort numTables; /* number of tables */ TT_UShort searchRange; /* These parameters are only used */ TT_UShort entrySelector; /* for a dichotomy search in the */ TT_UShort rangeShift; /* directory. We ignore them. */ } TT_TableDir; /*************************************************************************/ /* */ /* <Struct> */ /* TT_Table */ /* */ /* <Description> */ /* This structure describes a given table of a TrueType font. */ /* */ /* <Fields> */ /* Tag :: A four-bytes tag describing the table. */ /* CheckSum :: The table checksum. This value can be ignored. */ /* Offset :: The offset of the table from the start of the TrueType */ /* font in its resource. */ /* Length :: The table length (in bytes). */ /* */ typedef struct TT_Table_ { TT_ULong Tag; /* table type */ TT_ULong CheckSum; /* table checksum */ TT_ULong Offset; /* table file offset */ TT_ULong Length; /* table length */ } TT_Table; /*************************************************************************/ /* */ /* <Struct> */ /* TT_Header */ /* */ /* <Description> */ /* A structure used to model a TrueType font header table. All */ /* fields follow the TrueType specification. */ /* */ typedef struct TT_Header_ { TT_Fixed Table_Version; TT_Fixed Font_Revision; TT_Long CheckSum_Adjust; TT_Long Magic_Number; TT_UShort Flags; TT_UShort Units_Per_EM; TT_Long Created [2]; TT_Long Modified[2];
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -