📄 ftdriver.h
字号:
/* */ /* <FuncType> */ /* FTDriver_doneGlyphSlot */ /* */ /* <Description> */ /* A driver method used to finalize a given glyph slot. The object */ /* is not destroyed by this function. */ /* */ /* <InOut> */ /* slot :: A handle to the new glyph slot object. */ /* */ typedef void (*FTDriver_doneGlyphSlot)( FT_GlyphSlot slot ); /*************************************************************************/ /* */ /* <FuncType> */ /* FTDriver_loadGlyph */ /* */ /* <Description> */ /* A driver method used to load a glyph within a given glyph slot. */ /* */ /* <InOut> */ /* slot :: A handle to target slot object where the glyph will */ /* be loaded. */ /* size :: A handle to the source face size at which the glyph */ /* must be scaled/loaded. */ /* */ /* <Input> */ /* glyph_index :: The index of the glyph in the font file. */ /* load_flags :: A flag indicating what to load for this glyph. The */ /* FTLOAD_??? constants can be used to control the */ /* glyph loading process (e.g., whether the outline */ /* should be scaled, whether to load bitmaps or not, */ /* whether to hint the outline, etc). */ /* */ /* <Return> */ /* FreeType error code. 0 means success. */ /* */ typedef FT_Error (*FTDriver_loadGlyph)( FT_GlyphSlot slot, FT_Size size, FT_UInt glyph_index, FT_Int load_flags ); /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /**** ****/ /**** ****/ /**** C H A R A C T E R M A P S ****/ /**** ****/ /**** ****/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /* */ /* <FuncType> */ /* FTDriver_getCharIndex */ /* */ /* <Description> */ /* Uses a charmap to return a given character code's glyph index. */ /* */ /* <Input> */ /* charmap :: A handle to the source charmap object. */ /* charcode :: The character code. */ /* */ /* <Return> */ /* The glyph index. 0 means `undefined character code'. */ /* */ typedef FT_UInt (*FTDriver_getCharIndex)( FT_CharMap charmap, FT_Long charcode ); /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /**** ****/ /**** ****/ /**** I N T E R F A C E ****/ /**** ****/ /**** ****/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /* */ /* <Struct> */ /* FT_DriverInterface */ /* */ /* <Description> */ /* A structure which holds a font driver's basic interface used by */ /* the high-level parts of FreeType (or other applications). */ /* */ /* Most scalable drivers provide a specialized interface to access */ /* format specific features. It can be retrieved with a call to */ /* `get_format_interface()', and should be defined in each font */ /* driver header (e.g., ttdriver.h, t1driver.h, etc). */ /* */ /* All fields are function pointers. */ /* */ /* <Fields> */ /* driver_object_size :: The size in bytes of a single driver */ /* object. */ /* face_object_size :: The size in bytes of a single face object. */ /* size_object_size :: The size in bytes of a single size object. */ /* slot_object_size :: The size in bytes of a single glyph slot */ /* object. */ /* */ /* driver_name :: A string to describe the driver to the */ /* system. It doesn't necessarily describe */ /* in detail all the font formats the driver */ /* may support. */ /* driver_version :: The driver version number. Starts at 1. */ /* driver_requires :: The FreeType major version this driver is */ /* written for. This number should be equal */ /* to or greater than 2! */ /* */ /* format_interface :: A pointer to the driver's format-specific */ /* interface. */ /* */ /* init_driver :: Used to initialize a given driver object. */ /* done_driver :: Used to finalize and destroy a given */ /* driver object. */ /* get_interface :: Returns an interface for a given driver */ /* extension. */ /* */ /* init_face :: Initializes a given face object. */ /* done_face :: Discards a face object, as well as all */ /* child objects (sizes, charmaps, glyph */ /* slots). */ /* get_kerning :: Returns the kerning vector corresponding */ /* to a pair of glyphs, expressed in unscaled */ /* font units. */ /* */ /* init_size :: Initializes a given size object. */ /* done_size :: Finalizes a given size object. */ /* set_size_char_sizes :: Resets a scalable size object's character */ /* size. */ /* set_pixel_sizes :: Resets a face size object's pixel */ /* dimensions. Applies to both scalable and */ /* fixed faces. */ /* */ /* init_glyph_slot :: Initializes a given glyph slot object. */ /* done_glyph_slot :: Finalizes a given glyph slot. */ /* load_glyph :: Loads a given glyph into a given slot. */ /* */ /* get_char_index :: Returns the glyph index for a given */ /* charmap. */ /* */ typedef struct FT_DriverInterface_ { FT_Int driver_object_size; FT_Int face_object_size; FT_Int size_object_size; FT_Int slot_object_size; FT_String* driver_name; FT_Int driver_version; FT_Int driver_requires; void* format_interface; FTDriver_initDriver init_driver; FTDriver_doneDriver done_driver; FTDriver_getInterface get_interface; FTDriver_initFace init_face; FTDriver_doneFace done_face; FTDriver_getKerning get_kerning; FTDriver_initSize init_size; FTDriver_doneSize done_size; FTDriver_setCharSizes set_char_sizes; FTDriver_setPixelSizes set_pixel_sizes; FTDriver_initGlyphSlot init_glyph_slot; FTDriver_doneGlyphSlot done_glyph_slot; FTDriver_loadGlyph load_glyph; FTDriver_getCharIndex get_char_index; } FT_DriverInterface;#endif /* FTDRIVER_H *//* END */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -