⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ftobjs.h

📁 一个Xpdf应用的例子
💻 H
📖 第 1 页 / 共 3 页
字号:
  /* 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                         ****/  /****                                                                 ****/  /****                                                                 ****/  /*************************************************************************/  /*************************************************************************/  /*************************************************************************/#define FT_DEBUG_HOOK_TRUETYPE   0#define FT_DEBUG_HOOK_TYPE1      1  /*************************************************************************/  /*                                                                       */  /* <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.    */  /*                                                                       */  /*    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];  } 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_UInt       render_mode );  typedef const char*  (*FT_PSName_Requester)( FT_Face  face );  typedef FT_Error  (*FT_Glyph_Name_Requester)( FT_Face     face,                              FT_UInt     glyph_index,                              FT_Pointer  buffer,                              FT_UInt     buffer_max );  typedef FT_UInt  (*FT_Name_Index_Requester)( FT_Face     face,                              FT_String*  glyph_name );#ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM  /*************************************************************************/  /*                                                                       */  /* <Function>                                                            */  /*    FT_New_Stream                                                      */  /*                                                                       */  /* <Description>                                                         */  /*    Creates a new stream object.                                       */  /*                                                                       */  /* <Input>                                                               */  /*    filepathname :: The name of the stream (usually a file) to be      */  /*                    opened.                                            */  /*                                                                       */  /*    stream       :: A pointer to the stream object.                    */  /*                                                                       */  /* <Return>                                                              */  /*    FreeType error code.  0 means success.                             */  /*                                                                       */  FT_EXPORT( FT_Error )  FT_New_Stream( const char*  filepathname,                 FT_Stream    astream );  /*************************************************************************/  /*                                                                       */  /* <Function>                                                            */  /*    FT_Done_Stream                                                     */  /*                                                                       */  /* <Description>                                                         */  /*    Closes and destroys a stream object.                               */  /*                                                                       */  /* <Input>                                                               */  /*    stream :: The stream to be closed and destroyed.                   */  /*                                                                       */  FT_EXPORT( void )  FT_Done_Stream( FT_Stream  stream );  /*************************************************************************/  /*                                                                       */  /* <Function>                                                            */  /*    FT_New_Memory                                                      */  /*                                                                       */  /* <Description>                                                         */  /*    Creates a new memory object.                                       */  /*                                                                       */  /* <Return>                                                              */  /*    A pointer to the new memory object.  0 in case of error.           */  /*                                                                       */  FT_EXPORT( FT_Memory )  FT_New_Memory( void );  /*************************************************************************/  /*                                                                       */  /* <Function>                                                            */  /*    FT_Done_Memory                                                     */  /*                                                                       */  /* <Description>                                                         */  /*    Discards memory manager.                                           */  /*                                                                       */  /* <Input>                                                               */  /*    memory :: A handle to the memory manager.                          */  /*                                                                       */  FT_EXPORT( 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 + -