📄 ftxsbit.h
字号:
/*************************************************************/ /* */ /* <Struct> TT_SBit_Component */ /* */ /* <Description> */ /* A simple structure to describe a compound sbit element */ /* */ /* <Fields> */ /* glyph_code :: element's glyph index */ /* x_offset :: element's left bearing */ /* y_offset :: element's top bearing */ /* */ typedef struct TT_SBit_Component_ { TT_UShort glyph_code; TT_Char x_offset; TT_Char y_offset; } TT_SBit_Component; /*************************************************************/ /* */ /* <Struct> TT_SBit_Scale */ /* */ /* <Description> */ /* A structure used describe a given bitmap scaling */ /* table, as defined for the `EBSC' table. */ /* */ /* <Fields> */ /* hori :: horizontal line metrics */ /* vert :: vertical line metrics */ /* */ /* x_ppem :: horizontal pixels per EM */ /* y_ppem :: vertical pixels per EM */ /* */ /* x_ppem_substitute :: substitution x_ppem */ /* y_ppem_substitute :: substitution y_ppem */ /* */ typedef struct TT_SBit_Scale_ { TT_SBit_Line_Metrics hori; TT_SBit_Line_Metrics vert; TT_Byte x_ppem; TT_Byte y_ppem; TT_Byte x_ppem_substitute; TT_Byte y_ppem_substitute; } TT_SBit_Scale; /*************************************************************/ /* */ /* <Struct> TT_SBit_Image */ /* */ /* <Description> */ /* A structure used to describe a given embedded bitmap */ /* image. */ /* */ /* <Fields> */ /* map :: bitmap descriptor */ /* bit_depth :: pixel bit depth */ /* metrics :: glyph metrics for the bitmap */ /* */ typedef struct TT_SBit_Image_ { TT_Raster_Map map; int bit_depth; TT_Big_Glyph_Metrics metrics; } TT_SBit_Image; /*************************************************************/ /* */ /* <Struct> TT_EBLC */ /* */ /* <Description> */ /* A structure used to describe the `EBLC' table from */ /* a TrueType font. */ /* */ /* <Fields> */ /* version :: version number of the EBLC table */ /* */ /* num_strikes :: the number of strikes, i.e. bitmap */ /* sizes, present in this font */ /* */ /* strikes :: array of strikes */ /* */ typedef struct TT_EBLC_ { TT_ULong version; TT_ULong num_strikes; TT_SBit_Strike* strikes; } TT_EBLC; /*************************************************************/ /* */ /* <Function> */ /* TT_Init_SBit_Extension */ /* */ /* <Description> */ /* Initializes the embedded bitmap extension for the */ /* FreeType engine. */ /* */ /* <Input> */ /* engine :: handle to current FreeType library instance */ /* */ /* <Return> */ /* Error code. 0 means success. */ /* */ EXPORT_DEF TT_Error TT_Init_SBit_Extension( TT_Engine engine ); /*************************************************************/ /* */ /* <Function> */ /* TT_Get_Face_Bitmaps */ /* */ /* <Description> */ /* Loads the `EBLC' table from a font file, if any. */ /* */ /* <Input> */ /* face :: handle to the source TrueType font/face */ /* */ /* <Output> */ /* eblc_table :: a descriptor for the EBLC table */ /* */ /* <Return> */ /* Error code. 0 means success. */ /* */ /* <Note> */ /* This function returns TT_Err_Table_Missing if the */ /* font contains no embedded bitmaps. All fields in */ /* `eblc_table' will then be set to 0. */ /* */ EXPORT_DEF TT_Error TT_Get_Face_Bitmaps( TT_Face face, TT_EBLC* eblc_table ); /*************************************************************/ /* */ /* <Function> */ /* TT_New_SBit_Image */ /* */ /* <Description> */ /* Allocates a new embedded bitmap container. */ /* */ /* <Output> */ /* image :: sbit image */ /* */ /* <Return> */ /* Error code. 0 means success. */ /* */ EXPORT_DEF TT_Error TT_New_SBit_Image( TT_SBit_Image** image ); /*************************************************************/ /* */ /* <Function> */ /* TT_Done_SBit_Image */ /* */ /* <Description> */ /* Releases an embedded bitmap container. */ /* */ /* <Input> */ /* image :: sbit image */ /* */ EXPORT_DEF void TT_Done_SBit_Image( TT_SBit_Image* image ); /*************************************************************/ /* */ /* <Function> TT_Get_SBit_Strike */ /* */ /* <Description> */ /* Loads a suitable strike (bitmap sizetable) for the */ /* given instance. This strike includes */ /* sbitLineMetrics. */ /* */ /* <Input> */ /* face :: the source face */ /* instance :: the current size instance */ /* */ /* <Output> */ /* strike :: the bitmap strike descriptor */ /* */ /* <Return> */ /* Error code. 0 means success. */ /* */ EXPORT_DEF TT_Error TT_Get_SBit_Strike( TT_Face face, TT_Instance instance, TT_SBit_Strike* strike ); /*************************************************************/ /* */ /* <Function> */ /* TT_Load_Glyph_Bitmap */ /* */ /* <Description> */ /* Loads a given glyph embedded bitmap. */ /* */ /* <Input> */ /* face :: handle to the source TrueType font/face */ /* instance :: current size/transform instance */ /* glyph_index :: index of source glyph */ /* bitmap :: target embedded bitmap descriptor */ /* */ /* <Return> */ /* Error code. 0 means success. */ /* */ /* <Note> */ /* This function returns an error if there is no */ /* embedded bitmap for the glyph at the given */ /* instance. */ /* */ EXPORT_DEF TT_Error TT_Load_Glyph_Bitmap( TT_Face face, TT_Instance instance, TT_UShort glyph_index, TT_SBit_Image* bitmap );#ifdef __cplusplus}#endif#endif /* FTXSBIT_H *//* END */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -