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

📄 ftobjs.h

📁 一个Xpdf应用的例子
💻 H
📖 第 1 页 / 共 3 页
字号:
/***************************************************************************//*                                                                         *//*  ftobjs.h                                                               *//*                                                                         *//*    The FreeType private base classes (specification).                   *//*                                                                         *//*  Copyright 1996-2001 by                                                 *//*  David Turner, Robert Wilhelm, and Werner Lemberg.                      *//*                                                                         *//*  This file is part of the FreeType project, and may only be used,       *//*  modified, and distributed under the terms of the FreeType project      *//*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     *//*  this file you indicate that you have read the license and              *//*  understand and accept it fully.                                        *//*                                                                         *//***************************************************************************/  /*************************************************************************/  /*                                                                       */  /*  This file contains the definition of all internal FreeType classes.  */  /*                                                                       */  /*************************************************************************/#ifndef __FTOBJS_H__#define __FTOBJS_H__#include <ft2build.h>#include FT_RENDER_H#include FT_SIZES_H#include FT_INTERNAL_MEMORY_H#include FT_INTERNAL_DRIVER_H#include FT_INTERNAL_AUTOHINT_HFT_BEGIN_HEADER  /*************************************************************************/  /*                                                                       */  /* Some generic definitions.                                             */  /*                                                                       */#ifndef TRUE#define TRUE  1#endif#ifndef FALSE#define FALSE  0#endif#ifndef NULL#define NULL  (void*)0#endif#ifndef UNUSED#define UNUSED( arg )  ( (arg)=(arg) )#endif  /*************************************************************************/  /*                                                                       */  /* The min and max functions missing in C.  As usual, be careful not to  */  /* write things like MIN( a++, b++ ) to avoid side effects.              */  /*                                                                       */#ifndef MIN#define MIN( a, b )  ( (a) < (b) ? (a) : (b) )#endif#ifndef MAX#define MAX( a, b )  ( (a) > (b) ? (a) : (b) )#endif#ifndef ABS#define ABS( a )     ( (a) < 0 ? -(a) : (a) )#endif  /*************************************************************************/  /*                                                                       */  /* <Struct>                                                              */  /*    FT_GlyphLoader                                                     */  /*                                                                       */  /* <Description>                                                         */  /*    The glyph loader is an internal object used to load several glyphs */  /*    together (for example, in the case of composites).                 */  /*                                                                       */  /* <Note>                                                                */  /*    The glyph loader implementation is not part of the high-level API, */  /*    hence the forward structure declaration.                           */  /*                                                                       */  typedef struct FT_GlyphLoader_  FT_GlyphLoader;  /*************************************************************************/  /*                                                                       */  /* <Struct>                                                              */  /*    FT_Face_InternalRec                                                */  /*                                                                       */  /* <Description>                                                         */  /*    This structure contains the internal fields of each FT_Face        */  /*    object.  These fields may change between different releases of     */  /*    FreeType.                                                          */  /*                                                                       */  /* <Fields>                                                              */  /*    max_points       :: The maximal number of points 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.     */  /*                                                                       */  /*    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.        */  /*                                                                       */  /*    postscript_name  :: Postscript font name for this face.            */  /*                                                                       */  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;    const char*  postscript_name;  } 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 & \

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -