📄 tttypes.h
字号:
} TT_CMap2; /* format 4 */ typedef struct TT_CMap4Segment_ { FT_UShort endCount; FT_UShort startCount; FT_Short idDelta; FT_UShort idRangeOffset; } TT_CMap4Segment; typedef struct TT_CMap4_ { FT_UShort segCountX2; /* number of segments * 2 */ FT_UShort searchRange; /* these parameters can be used */ FT_UShort entrySelector; /* for a binary search */ FT_UShort rangeShift; TT_CMap4Segment* segments; FT_UShort* glyphIdArray; FT_UShort numGlyphId; /* control value */ TT_CMap4Segment* last_segment; /* last used segment; this is a small */ /* cache to potentially increase speed */ } TT_CMap4; /* format 6 */ typedef struct TT_CMap6_ { FT_UShort firstCode; /* first character code of subrange */ FT_UShort entryCount; /* number of character codes in subrange */ FT_UShort* glyphIdArray; } TT_CMap6; typedef struct TT_CMapTable_ TT_CMapTable; typedef FT_UInt (*TT_CharMap_Func)( TT_CMapTable* charmap, FT_ULong char_code ); /* charmap table */ struct TT_CMapTable_ { FT_UShort platformID; FT_UShort platformEncodingID; FT_UShort format; FT_UShort length; FT_UShort version; FT_Bool loaded; FT_ULong offset; union { TT_CMap0 cmap0; TT_CMap2 cmap2; TT_CMap4 cmap4; TT_CMap6 cmap6; } c; TT_CharMap_Func get_index; }; /*************************************************************************/ /* */ /* <Struct> */ /* TT_CharMapRec */ /* */ /* <Description> */ /* The TrueType character map object type. */ /* */ /* <Fields> */ /* root :: The parent character map structure. */ /* */ /* cmap :: The used character map. */ /* */ typedef struct TT_CharMapRec_ { FT_CharMapRec root; TT_CMapTable cmap; } TT_CharMapRec; /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /*** ***/ /*** ***/ /*** ORIGINAL TT_FACE CLASS DEFINITION ***/ /*** ***/ /*** ***/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /* */ /* This structure/class is defined here because it is common to the */ /* following formats: TTF, OpenType-TT, and OpenType-CFF. */ /* */ /* Note, however, that the classes TT_Size, TT_GlyphSlot, and TT_CharMap */ /* are not shared between font drivers, and are thus defined normally in */ /* `ttobjs.h'. */ /* */ /*************************************************************************/ /*************************************************************************/ /* */ /* <Type> */ /* TT_Face */ /* */ /* <Description> */ /* A handle to a TrueType face/font object. A TT_Face encapsulates */ /* the resolution and scaling independent parts of a TrueType font */ /* resource. */ /* */ /* <Note> */ /* The TT_Face structure is also used as a `parent class' for the */ /* OpenType-CFF class (T2_Face). */ /* */ typedef struct TT_FaceRec_* TT_Face; /*************************************************************************/ /* */ /* <Type> */ /* TT_CharMap */ /* */ /* <Description> */ /* A handle to a TrueType character mapping object. */ /* */ typedef struct TT_CharMapRec_* TT_CharMap; /* a function type used for the truetype bytecode interpreter hooks */ typedef FT_Error (*TT_Interpreter)( void* exec_context ); /* forward declaration */ typedef struct TT_Loader_ TT_Loader; /*************************************************************************/ /* */ /* <FuncType> */ /* TT_Goto_Table_Func */ /* */ /* <Description> */ /* Seeks a stream to the start of a given TrueType table. */ /* */ /* <Input> */ /* face :: A handle to the target face object. */ /* */ /* tag :: A 4-byte tag used to name the table. */ /* */ /* stream :: The input stream. */ /* */ /* <Output> */ /* length :: The length of the table in bytes. Set to 0 if not */ /* needed. */ /* */ /* <Return> */ /* FreeType error code. 0 means success. */ /* */ /* <Note> */ /* The stream cursor must be at the font file's origin. */ /* */ typedef FT_Error (*TT_Goto_Table_Func)( TT_Face face, FT_ULong tag, FT_Stream stream, FT_ULong* length ); /*************************************************************************/ /* */ /* <FuncType> */ /* TT_Access_Glyph_Frame_Func */ /* */ /* <Description> */ /* Seeks a stream to the start of a given glyph element, and opens a */ /* frame for it. */ /* */ /* <Input> */ /* loader :: The current TrueType glyph loader object. */ /* */ /* glyph index :: The index of the glyph to access. */ /* */ /* offset :: The offset of the glyph according to the */ /* `locations' table. */ /* */ /* byte_count :: The size of the frame in bytes. */ /* */ /* <Return> */ /* FreeType error code. 0 means success. */ /* */ /* <Note> */ /* This function is normally equivalent to FILE_Seek(offset) */ /* followed by ACCESS_Frame(byte_count) with the loader's stream, but */ /* alternative formats (e.g. compressed ones) might use something */ /* different. */ /* */ typedef FT_Error (*TT_Access_Glyph_Frame_Func)( TT_Loader* loader, FT_UInt glyph_index, FT_ULong offset, FT_UInt byte_count ); /*************************************************************************/ /* */ /* <FuncType> */ /* TT_Load_Glyph_Element_Func */ /* */ /* <Description> */ /* Reads one glyph element (its header, a simple glyph, or a */ /* composite) from the loader's current stream frame. */ /* */ /* <Input> */ /* loader :: The current TrueType glyph loader object. */ /* */ /* <Return>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -