📄 ftobjs.h
字号:
FT_ULong size ); /* Set the bitmap buffer in a glyph slot to a given pointer. The buffer */ /* will not be freed by a later call to ft_glyphslot_free_bitmap. */ FT_BASE( void ) ft_glyphslot_set_bitmap( FT_GlyphSlot slot, FT_Byte* buffer ); /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /**** ****/ /**** ****/ /**** 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; FT_Renderer_RenderFunc render; } FT_RendererRec; /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /**** ****/ /**** ****/ /**** F O N T D R I V E R S ****/ /**** ****/ /**** ****/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /* typecast a module into a driver easily */#define FT_DRIVER( x ) ((FT_Driver)(x)) /* typecast a module as a driver, and get its driver class */#define FT_DRIVER_CLASS( x ) FT_DRIVER( x )->clazz /*************************************************************************/ /* */ /* <Struct> */ /* FT_DriverRec */ /* */ /* <Description> */ /* The root font driver class. A font driver is responsible for */ /* managing and loading font files of a given format. */ /* */ /* <Fields> */ /* root :: Contains the fields of the root module class. */ /* */ /* clazz :: A pointer to the font driver's class. Note that */ /* this is NOT root.clazz. `class' wasn't used */ /* as it is a reserved word in C++. */ /* */ /* faces_list :: The list of faces currently opened by this */ /* driver. */ /* */ /* extensions :: A typeless pointer to the driver's extensions */ /* registry, if they are supported through the */ /* configuration macro FT_CONFIG_OPTION_EXTENSIONS. */ /* */ /* glyph_loader :: The glyph loader for all faces managed by this */ /* driver. This object isn't defined for unscalable */ /* formats. */ /* */ typedef struct FT_DriverRec_ { FT_ModuleRec root; FT_Driver_Class clazz; FT_ListRec faces_list; void* extensions; FT_GlyphLoader glyph_loader; } FT_DriverRec; /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /**** ****/ /**** ****/ /**** L I B R A R I E S ****/ /**** ****/ /**** ****/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /* This hook is used by the TrueType debugger. It must be set to an */ /* alternate truetype bytecode interpreter function. */#define FT_DEBUG_HOOK_TRUETYPE 0 /* Set this debug hook to a non-null pointer to force unpatented hinting */ /* for all faces when both TT_USE_BYTECODE_INTERPRETER and */ /* TT_CONFIG_OPTION_UNPATENTED_HINTING are defined. This is only used */ /* during debugging. */#define FT_DEBUG_HOOK_UNPATENTED_HINTING 1 typedef void (*FT_Bitmap_LcdFilterFunc)( FT_Bitmap* bitmap, FT_Render_Mode render_mode, FT_Library library ); /*************************************************************************/ /* */ /* <Struct> */ /* FT_LibraryRec */ /* */ /* <Description> */ /* The FreeType library class. This is the root of all FreeType */ /* data. Use FT_New_Library() to create a library object, and */ /* FT_Done_Library() to discard it and all child objects. */ /* */ /* <Fields> */ /* memory :: The library's memory object. Manages memory */ /* allocation. */ /* */ /* generic :: Client data variable. Used to extend the */ /* Library class by higher levels and clients. */ /* */ /* version_major :: The major version number of the library. */ /* */ /* version_minor :: The minor version number of the library. */ /* */ /* version_patch :: The current patch level of the library. */ /* */ /* num_modules :: The number of modules currently registered */ /* within this library. This is set to 0 for new */ /* libraries. New modules are added through the */ /* FT_Add_Module() API function. */ /* */ /* modules :: A table used to store handles to the currently */ /* registered modules. Note that each font driver */ /* contains a list of its opened faces. */ /* */ /* renderers :: The list of renderers currently registered */ /* within the library. */ /* */ /* cur_renderer :: The current outline renderer. This is a */ /* shortcut used to avoid parsing the list on */ /* each call to FT_Outline_Render(). It is a */ /* handle to the current renderer for the */ /* FT_GLYPH_FORMAT_OUTLINE format. */ /* */ /* auto_hinter :: XXX */ /* */ /* raster_pool :: The raster object's render pool. This can */ /* ideally be changed dynamically at run-time. */ /* */ /* raster_pool_size :: The size of the render pool in bytes. */ /* */ /* debug_hooks :: XXX */ /* */ typedef struct FT_LibraryRec_ { FT_Memory memory; /* library's memory manager */ FT_Generic generic; FT_Int version_major; FT_Int version_minor; FT_Int version_patch; FT_UInt num_modules; FT_Module modules[FT_MAX_MODULES]; /* module objects */ FT_ListRec renderers; /* list of renderers */ FT_Renderer cur_renderer; /* current outline renderer */ FT_Module auto_hinter; FT_Byte* raster_pool; /* scan-line conversion */ /* render pool */ FT_ULong raster_pool_size; /* size of render pool in bytes */ FT_DebugHook_Func debug_hooks[4];#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING FT_LcdFilter lcd_filter; FT_Int lcd_extra; /* number of extra pixels */ FT_Byte lcd_weights[7]; /* filter weights, if any */ FT_Bitmap_LcdFilterFunc lcd_filter_func; /* filtering callback */#endif } FT_LibraryRec; FT_BASE( FT_Renderer ) FT_Lookup_Renderer( FT_Library library, FT_Glyph_Format format, FT_ListNode* node ); FT_BASE( FT_Error ) FT_Render_Glyph_Internal( FT_Library library, FT_GlyphSlot slot, FT_Render_Mode render_mode ); typedef const char* (*FT_Face_GetPostscriptNameFunc)( FT_Face face ); typedef FT_Error (*FT_Face_GetGlyphNameFunc)( FT_Face face, FT_UInt glyph_index, FT_Pointer buffer, FT_UInt buffer_max ); typedef FT_UInt (*FT_Face_GetGlyphNameIndexFunc)( FT_Face face, FT_String* glyph_name );#ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM /*************************************************************************/ /* */ /* <Function> */ /* FT_New_Memory */ /* */ /* <Description> */ /* Creates a new memory object. */ /* */ /* <Return> */ /* A pointer to the new memory object. 0 in case of error. */ /* */ FT_BASE( FT_Memory ) FT_New_Memory( void ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Done_Memory */ /* */ /* <Description> */ /* Discards memory manager. */ /* */ /* <Input> */ /* memory :: A handle to the memory manager. */ /* */ FT_BASE( void ) FT_Done_Memory( FT_Memory memory );#endif /* !FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM */ /* Define default raster's interface. The default raster is located in */ /* `src/base/ftraster.c'. */ /* */ /* Client applications can register new rasters through the */ /* FT_Set_Raster() API. */#ifndef FT_NO_DEFAULT_RASTER FT_EXPORT_VAR( FT_Raster_Funcs ) ft_default_raster;#endifFT_END_HEADER#endif /* __FTOBJS_H__ *//* END */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -