📄 ftobjs.h
字号:
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_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 ); /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /**** ****/ /**** ****/ /**** G L Y P H L O A D E R ****/ /**** ****/ /**** ****/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/#define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS 1#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES 2#define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID 4#define FT_SUBGLYPH_FLAG_SCALE 8#define FT_SUBGLYPH_FLAG_XY_SCALE 0x40#define FT_SUBGLYPH_FLAG_2X2 0x80#define FT_SUBGLYPH_FLAG_USE_MY_METRICS 0x200 enum { ft_glyph_own_bitmap = 1 }; struct FT_SubGlyph_ { FT_Int index; FT_UShort flags; FT_Int arg1; FT_Int arg2; FT_Matrix transform; }; typedef struct FT_GlyphLoad_ { FT_Outline outline; /* outline */ FT_UInt num_subglyphs; /* number of subglyphs */ FT_SubGlyph* subglyphs; /* subglyphs */ FT_Vector* extra_points; /* extra points table */ } FT_GlyphLoad; struct FT_GlyphLoader_ { FT_Memory memory; FT_UInt max_points; FT_UInt max_contours; FT_UInt max_subglyphs; FT_Bool use_extra; FT_GlyphLoad base; FT_GlyphLoad current; void* other; /* for possible future extension? */ }; FT_BASE( FT_Error ) FT_GlyphLoader_New( FT_Memory memory, FT_GlyphLoader* *aloader ); FT_BASE( FT_Error ) FT_GlyphLoader_Create_Extra( FT_GlyphLoader* loader ); FT_BASE( void ) FT_GlyphLoader_Done( FT_GlyphLoader* loader ); FT_BASE( void ) FT_GlyphLoader_Reset( FT_GlyphLoader* loader ); FT_BASE( void ) FT_GlyphLoader_Rewind( FT_GlyphLoader* loader ); FT_BASE( FT_Error ) FT_GlyphLoader_Check_Points( FT_GlyphLoader* loader, FT_UInt n_points, FT_UInt n_contours ); FT_BASE( FT_Error ) FT_GlyphLoader_Check_Subglyphs( FT_GlyphLoader* loader, FT_UInt n_subs ); FT_BASE( void ) FT_GlyphLoader_Prepare( FT_GlyphLoader* loader ); FT_BASE( void ) FT_GlyphLoader_Add( FT_GlyphLoader* loader ); FT_BASE( FT_Error ) FT_GlyphLoader_Copy_Points( FT_GlyphLoader* target, FT_GlyphLoader* source ); /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /**** ****/ /**** ****/ /**** R E N D E R E R S ****/ /**** ****/ /**** ****/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/#define FT_RENDERER( x ) ((FT_Renderer)( x ))#define FT_GLYPH( x ) ((FT_Glyph)( x ))#define FT_BITMAP_GLYPH( x ) ((FT_BitmapGlyph)( x ))#define FT_OUTLINE_GLYPH( x ) ((FT_OutlineGlyph)( x )) typedef struct FT_RendererRec_ { FT_ModuleRec root; FT_Renderer_Class* clazz; FT_Glyph_Format glyph_format; FT_Glyph_Class glyph_class; FT_Raster raster; FT_Raster_Render_Func raster_render; FTRenderer_render render; } FT_RendererRec; /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /**** ****/ /**** ****/ /**** F O N T D R I V E R S ****/ /**** ****/ /**** ****/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -