📄 sfnt.h
字号:
/* PSname :: The address of a string pointer. Will be NULL in case */ /* of error, otherwise it is a pointer to the glyph name. */ /* */ /* You must not modify the returned string! */ /* */ /* <Output> */ /* FreeType error code. 0 means success. */ /* */ typedef FT_Error (*TT_Get_PS_Name_Func)( TT_Face face, FT_UInt idx, FT_String** PSname ); /*************************************************************************/ /* */ /* <FuncType> */ /* TT_Load_Metrics_Func */ /* */ /* <Description> */ /* Load a metrics table, which is a table with a horizontal and a */ /* vertical version. */ /* */ /* <Input> */ /* face :: A handle to the target face object. */ /* */ /* stream :: The input stream. */ /* */ /* vertical :: A boolean flag. If set, load the vertical one. */ /* */ /* <Return> */ /* FreeType error code. 0 means success. */ /* */ typedef FT_Error (*TT_Load_Metrics_Func)( TT_Face face, FT_Stream stream, FT_Bool vertical ); /*************************************************************************/ /* */ /* <FuncType> */ /* TT_Get_Metrics_Func */ /* */ /* <Description> */ /* Load the horizontal or vertical header in a face object. */ /* */ /* <Input> */ /* face :: A handle to the target face object. */ /* */ /* stream :: The input stream. */ /* */ /* vertical :: A boolean flag. If set, load vertical metrics. */ /* */ /* <Return> */ /* FreeType error code. 0 means success. */ /* */ typedef FT_Error (*TT_Get_Metrics_Func)( TT_Face face, FT_Bool vertical, FT_UInt gindex, FT_Short* abearing, FT_UShort* aadvance ); /*************************************************************************/ /* */ /* <FuncType> */ /* TT_Load_Table_Func */ /* */ /* <Description> */ /* Load a given TrueType table. */ /* */ /* <Input> */ /* face :: A handle to the target face object. */ /* */ /* stream :: The input stream. */ /* */ /* <Return> */ /* FreeType error code. 0 means success. */ /* */ /* <Note> */ /* The function uses `face->goto_table' to seek the stream to the */ /* start of the table, except while loading the font directory. */ /* */ typedef FT_Error (*TT_Load_Table_Func)( TT_Face face, FT_Stream stream ); /*************************************************************************/ /* */ /* <FuncType> */ /* TT_Free_Table_Func */ /* */ /* <Description> */ /* Free a given TrueType table. */ /* */ /* <Input> */ /* face :: A handle to the target face object. */ /* */ typedef void (*TT_Free_Table_Func)( TT_Face face ); /* * @functype: * TT_Face_GetKerningFunc * * @description: * Return the horizontal kerning value between two glyphs. * * @input: * face :: A handle to the source face object. * left_glyph :: The left glyph index. * right_glyph :: The right glyph index. * * @return: * The kerning value in font units. */ typedef FT_Int (*TT_Face_GetKerningFunc)( TT_Face face, FT_UInt left_glyph, FT_UInt right_glyph ); /*************************************************************************/ /* */ /* <Struct> */ /* SFNT_Interface */ /* */ /* <Description> */ /* This structure holds pointers to the functions used to load and */ /* free the basic tables that are required in a `sfnt' font file. */ /* */ /* <Fields> */ /* Check the various xxx_Func() descriptions for details. */ /* */ typedef struct SFNT_Interface_ { TT_Loader_GotoTableFunc goto_table; TT_Init_Face_Func init_face; TT_Load_Face_Func load_face; TT_Done_Face_Func done_face; FT_Module_Requester get_interface; TT_Load_Any_Func load_any;#ifdef FT_CONFIG_OPTION_OLD_INTERNALS TT_Load_SFNT_HeaderRec_Func load_sfnt_header; TT_Load_Directory_Func load_directory;#endif /* these functions are called by `load_face' but they can also */ /* be called from external modules, if there is a need to do so */ TT_Load_Table_Func load_head; TT_Load_Metrics_Func load_hhea; TT_Load_Table_Func load_cmap; TT_Load_Table_Func load_maxp; TT_Load_Table_Func load_os2; TT_Load_Table_Func load_post; TT_Load_Table_Func load_name; TT_Free_Table_Func free_name; /* optional tables */#ifdef FT_CONFIG_OPTION_OLD_INTERNALS TT_Load_Table_Func load_hdmx_stub; TT_Free_Table_Func free_hdmx_stub;#endif /* this field was called `load_kerning' up to version 2.1.10 */ TT_Load_Table_Func load_kern; TT_Load_Table_Func load_gasp; TT_Load_Table_Func load_pclt; /* see `ttload.h'; this field was called `load_bitmap_header' up to */ /* version 2.1.10 */ TT_Load_Table_Func load_bhed;#ifdef FT_CONFIG_OPTION_OLD_INTERNALS /* see `ttsbit.h' */ TT_Set_SBit_Strike_OldFunc set_sbit_strike_stub; TT_Load_Table_Func load_sbits_stub; /* * The following two fields appeared in version 2.1.8, and were placed * between `load_sbits' and `load_sbit_image'. We support them as a * special exception since they are used by Xfont library within the * X.Org xserver, and because the probability that other rogue clients * use the other version 2.1.7 fields below is _extremely_ low. * * Note that this forces us to disable an interesting memory-saving * optimization though... */ TT_Find_SBit_Image_Func find_sbit_image; TT_Load_SBit_Metrics_Func load_sbit_metrics;#endif TT_Load_SBit_Image_Func load_sbit_image;#ifdef FT_CONFIG_OPTION_OLD_INTERNALS TT_Free_Table_Func free_sbits_stub;#endif /* see `ttpost.h' */ TT_Get_PS_Name_Func get_psname; TT_Free_Table_Func free_psnames;#ifdef FT_CONFIG_OPTION_OLD_INTERNALS TT_CharMap_Load_Func load_charmap_stub; TT_CharMap_Free_Func free_charmap_stub;#endif /* starting here, the structure differs from version 2.1.7 */ /* this field was introduced in version 2.1.8, named `get_psname' */ TT_Face_GetKerningFunc get_kerning; /* new elements introduced after version 2.1.10 */ /* load the font directory, i.e., the offset table and */ /* the table directory */ TT_Load_Table_Func load_font_dir; TT_Load_Metrics_Func load_hmtx; TT_Load_Table_Func load_eblc; TT_Free_Table_Func free_eblc; TT_Set_SBit_Strike_Func set_sbit_strike; TT_Load_Strike_Metrics_Func load_strike_metrics; TT_Get_Metrics_Func get_metrics; } SFNT_Interface; /* transitional */ typedef SFNT_Interface* SFNT_Service;FT_END_HEADER#endif /* __SFNT_H__ *//* END */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -