📄 ftobjs.h
字号:
/* vectorial outline of any glyph in this face. */ /* If this value cannot be known in advance, or */ /* if the face isn't scalable, this should be set */ /* to 0. Only relevant for scalable formats. */ /* */ /* max_contours :: The maximal number of contours used to store */ /* the vectorial outline of any glyph in this */ /* face. If this value cannot be known in */ /* advance, or if the face isn't scalable, this */ /* should be set to 0. Only relevant for */ /* scalable formats. */ /* */ /* transform_matrix :: A 2x2 matrix of 16.16 coefficients used to */ /* transform glyph outlines after they are loaded */ /* from the font. Only used by the convenience */ /* functions. */ /* */ /* transform_delta :: A translation vector used to transform glyph */ /* outlines after they are loaded from the font. */ /* Only used by the convenience functions. */ /* */ /* transform_flags :: Some flags used to classify the transform. */ /* Only used by the convenience functions. */ /* */ /* hint_flags :: Some flags used to change the hinters' */ /* behaviour. Only used for debugging for now. */ /* */ /* postscript_name :: Postscript font name for this face. */ /* */ /* incremental_interface :: */ /* If non-null, the interface through */ /* which glyph data and metrics are loaded */ /* incrementally for faces that do not provide */ /* all of this data when first opened. */ /* This field exists only if */ /* @FT_CONFIG_OPTION_INCREMENTAL is defined. */ /* */ typedef struct FT_Face_InternalRec_ { FT_UShort max_points; FT_Short max_contours; FT_Matrix transform_matrix; FT_Vector transform_delta; FT_Int transform_flags; FT_UInt32 hint_flags; const char* postscript_name;#ifdef FT_CONFIG_OPTION_INCREMENTAL FT_Incremental_InterfaceRec* incremental_interface;#endif } FT_Face_InternalRec; /*************************************************************************/ /* */ /* <Struct> */ /* FT_Slot_InternalRec */ /* */ /* <Description> */ /* This structure contains the internal fields of each FT_GlyphSlot */ /* object. These fields may change between different releases of */ /* FreeType. */ /* */ /* <Fields> */ /* loader :: The glyph loader object used to load outlines */ /* into the glyph slot. */ /* */ /* glyph_transformed :: Boolean. Set to TRUE when the loaded glyph */ /* must be transformed through a specific */ /* font transformation. This is _not_ the same */ /* as the face transform set through */ /* FT_Set_Transform(). */ /* */ /* glyph_matrix :: The 2x2 matrix corresponding to the glyph */ /* transformation, if necessary. */ /* */ /* glyph_delta :: The 2d translation vector corresponding to */ /* the glyph transformation, if necessary. */ /* */ /* glyph_hints :: Format-specific glyph hints management. */ /* */ typedef struct FT_Slot_InternalRec_ { FT_GlyphLoader loader; FT_Bool glyph_transformed; FT_Matrix glyph_matrix; FT_Vector glyph_delta; void* glyph_hints; } FT_GlyphSlot_InternalRec; /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /**** ****/ /**** ****/ /**** M O D U L E S ****/ /**** ****/ /**** ****/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /* */ /* <Struct> */ /* FT_ModuleRec */ /* */ /* <Description> */ /* A module object instance. */ /* */ /* <Fields> */ /* clazz :: A pointer to the module's class. */ /* */ /* library :: A handle to the parent library object. */ /* */ /* memory :: A handle to the memory manager. */ /* */ /* generic :: A generic structure for user-level extensibility (?). */ /* */ typedef struct FT_ModuleRec_ { FT_Module_Class* clazz; FT_Library library; FT_Memory memory; FT_Generic generic; } FT_ModuleRec; /* typecast an object to a FT_Module */#define FT_MODULE( x ) ((FT_Module)( x ))#define FT_MODULE_CLASS( x ) FT_MODULE( x )->clazz#define FT_MODULE_LIBRARY( x ) FT_MODULE( x )->library#define FT_MODULE_MEMORY( x ) FT_MODULE( x )->memory#define FT_MODULE_IS_DRIVER( x ) ( FT_MODULE_CLASS( x )->module_flags & \ ft_module_font_driver )#define FT_MODULE_IS_RENDERER( x ) ( FT_MODULE_CLASS( x )->module_flags & \ ft_module_renderer )#define FT_MODULE_IS_HINTER( x ) ( FT_MODULE_CLASS( x )->module_flags & \ ft_module_hinter )#define FT_MODULE_IS_STYLER( x ) ( FT_MODULE_CLASS( x )->module_flags & \ ft_module_styler )#define FT_DRIVER_IS_SCALABLE( x ) ( FT_MODULE_CLASS( x )->module_flags & \ ft_module_driver_scalable )#define FT_DRIVER_USES_OUTLINES( x ) !( FT_MODULE_CLASS( x )->module_flags & \ ft_module_driver_no_outlines )#define FT_DRIVER_HAS_HINTER( x ) ( FT_MODULE_CLASS( x )->module_flags & \ ft_module_driver_has_hinter ) /*************************************************************************/ /* */ /* <Function> */ /* FT_Get_Module_Interface */ /* */ /* <Description> */ /* Finds a module and returns its specific interface as a typeless */ /* pointer. */ /* */ /* <Input> */ /* library :: A handle to the library object. */ /* */ /* module_name :: The module's name (as an ASCII string). */ /* */ /* <Return> */ /* A module-specific interface if available, 0 otherwise. */ /* */ /* <Note> */ /* You should better be familiar with FreeType internals to know */ /* which module to look for, and what its interface is :-) */ /* */ FT_BASE( const void* ) FT_Get_Module_Interface( FT_Library library, const char* mod_name ); /* */ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /**** ****/ /**** ****/ /**** FACE, SIZE & GLYPH SLOT OBJECTS ****/ /**** ****/ /**** ****/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /* a few macros used to perform easy typecasts with minimal brain damage */#define FT_FACE( x ) ((FT_Face)(x))#define FT_SIZE( x ) ((FT_Size)(x))#define FT_SLOT( x ) ((FT_GlyphSlot)(x))#define FT_FACE_DRIVER( x ) FT_FACE( x )->driver#define FT_FACE_LIBRARY( x ) FT_FACE_DRIVER( x )->root.library#define FT_FACE_MEMORY( x ) FT_FACE( x )->memory#define FT_FACE_STREAM( x ) FT_FACE( x )->stream#define FT_SIZE_FACE( x ) FT_SIZE( x )->face#define FT_SLOT_FACE( x ) FT_SLOT( x )->face#define FT_FACE_SLOT( x ) FT_FACE( x )->glyph#define FT_FACE_SIZE( x ) FT_FACE( x )->size /*************************************************************************/ /* */ /* <Function> */ /* FT_New_GlyphSlot */ /* */ /* <Description> */ /* It is sometimes useful to have more than one glyph slot for a */ /* given face object. This function is used to create additional */ /* slots. All of them are automatically discarded when the face is */ /* destroyed. */ /* */ /* <Input> */ /* face :: A handle to a parent face object. */ /* */ /* <Output> */ /* aslot :: A handle to a new glyph slot object. */ /* */ /* <Return> */ /* FreeType error code. 0 means success. */ /* */ FT_BASE( FT_Error ) FT_New_GlyphSlot( FT_Face face, FT_GlyphSlot *aslot ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Done_GlyphSlot */ /* */ /* <Description> */ /* Destroys a given glyph slot. Remember however that all slots are */ /* automatically destroyed with its parent. Using this function is */ /* not always mandatory. */ /* */ /* <Input> */ /* slot :: A handle to a target glyph slot. */ /* */ FT_BASE( void ) FT_Done_GlyphSlot( FT_GlyphSlot slot ); /* */ /* * free the bitmap of a given glyphslot when needed * (i.e. only when it was allocated with ft_glyphslot_alloc_bitmap) */ FT_BASE( void ) ft_glyphslot_free_bitmap( FT_GlyphSlot slot ); /*
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -