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

📄 ttobjs.h

📁 神龙卡开发原代码
💻 H
📖 第 1 页 / 共 3 页
字号:
    Byte*         touch;      /* current touch flags         */    UShort*       contours;   /* contour end points          */  };  typedef struct TGlyph_Zone_  TGlyph_Zone;  typedef TGlyph_Zone*         PGlyph_Zone;#ifndef TT_STATIC_INTEPRETER  /* indirect implementation */#define EXEC_OPS   PExecution_Context exc,#define EXEC_OP    PExecution_Context exc#define EXEC_ARGS  exc,#define EXEC_ARG   exc#else                          /* static implementation */#define EXEC_OPS   /* void */#define EXEC_OP    /* void */#define EXEC_ARGS  /* void */#define EXEC_ARG   /* void */#endif  /* Rounding function, as used by the interpreter */  typedef TT_F26Dot6  (*TRound_Function)( EXEC_OPS TT_F26Dot6 distance,                                                   TT_F26Dot6 compensation );  /* Point displacement along the freedom vector routine, as */  /* used by the interpreter                                 */  typedef void  (*TMove_Function)( EXEC_OPS PGlyph_Zone  zone,                                            UShort       point,                                            TT_F26Dot6   distance );  /* Distance projection along one of the proj. vectors, as used */  /* by the interpreter                                          */  typedef TT_F26Dot6  (*TProject_Function)( EXEC_OPS TT_Vector*  v1,                                                     TT_Vector*  v2 );  /* reading a cvt value. Take care of non-square pixels when needed */  typedef TT_F26Dot6  (*TGet_CVT_Function)( EXEC_OPS ULong  index );  /* setting or moving a cvt value.  Take care of non-square pixels  */  /* when needed                                                     */  typedef void  (*TSet_CVT_Function)( EXEC_OPS  ULong       index,                                                TT_F26Dot6  value );  /* subglyph transformation record */  struct  TTransform_  {    TT_Fixed    xx, xy; /* transformation */    TT_Fixed    yx, yy; /*     matrix     */    TT_F26Dot6  ox, oy; /*    offsets     */  };  typedef struct TTransform_  TTransform;  typedef TTransform*         PTransform;  /* subglyph loading record.  Used to load composite components */  struct  TSubglyph_Record_  {    Long         index;        /* subglyph index; initialized with -1 */    Bool         is_scaled;    /* is the subglyph scaled?  */    Bool         is_hinted;    /* should it be hinted?     */    Bool         preserve_pps; /* preserve phantom points? */    Long         file_offset;    TT_Big_Glyph_Metrics  metrics;    TGlyph_Zone  zone;    Long         arg1;  /* first argument  */    Long         arg2;  /* second argument */    UShort       element_flag;    /* current load element flag */    TTransform   transform;       /* transform */    TT_Vector    pp1, pp2;        /* phantom points */  };  typedef struct TSubglyph_Record_  TSubglyph_Record;  typedef TSubglyph_Record*         PSubglyph_Record;  typedef TSubglyph_Record*         PSubglyph_Stack;  /* A note regarding non-squared pixels:                                */  /*                                                                     */  /* (This text will probably go into some docs at some time, for        */  /*  now, it is kept there to explain some definitions in the           */  /*  TIns_Metrics record).                                              */  /*                                                                     */  /* The CVT is a one-dimensional array containing values that           */  /* control certain important characteristics in a font, like           */  /* the height of all capitals, all lowercase letter, default           */  /* spacing or stem width/height.                                       */  /*                                                                     */  /* These values are found in FUnits in the font file, and must be      */  /* scaled to pixel coordinates before being used by the CVT and        */  /* glyph programs.  Unfortunately, when using distinct x and y         */  /* resolutions (or distinct x and y pointsizes), there are two         */  /* possible scalings.                                                  */  /*                                                                     */  /* A first try was to implement a 'lazy' scheme where all values       */  /* were scaled when first used.  However, while some values are always */  /* used in the same direction, and some other are used in many         */  /* different circumstances and orientations.                           */  /*                                                                     */  /* I have found a simpler way to do the same, and it even seems to     */  /* work in most of the cases:                                          */  /*                                                                     */  /* - all CVT values are scaled to the maximum ppem size                */  /*                                                                     */  /* - when performing a read or write in the CVT, a ratio factor        */  /*   is used to perform adequate scaling. Example:                     */  /*                                                                     */  /*    x_ppem = 14                                                      */  /*    y_ppem = 10                                                      */  /*                                                                     */  /*   we choose ppem = x_ppem = 14 as the CVT scaling size.  All cvt    */  /*   entries are scaled to it.                                         */  /*                                                                     */  /*    x_ratio = 1.0                                                    */  /*    y_ratio = y_ppem/ppem (< 1.0)                                    */  /*                                                                     */  /*   we compute the current ratio like:                                */  /*                                                                     */  /*     - if projVector is horizontal,                                  */  /*         ratio = x_ratio = 1.0                                       */  /*     - if projVector is vertical,                                    */  /*         ratop = y_ratio                                             */  /*     - else,                                                         */  /*         ratio = sqrt((proj.x*x_ratio)^2 + (proj.y*y_ratio)^2)       */  /*                                                                     */  /*   reading a cvt value returns      ratio * cvt[index]               */  /*   writing a cvt value in pixels    cvt[index] / ratio               */  /*                                                                     */  /*   the current ppem is simply       ratio * ppem                     */  /*                                                                     */  /* metrics used by the instance and execution context objects */  struct  TIns_Metrics_  {    TT_F26Dot6  pointSize;      /* point size.  1 point = 1/72 inch. */    UShort      x_resolution;   /* device horizontal resolution in dpi. */    UShort      y_resolution;   /* device vertical resolution in dpi.   */    UShort      x_ppem;         /* horizontal pixels per EM */    UShort      y_ppem;         /* vertical pixels per EM   */    Long        x_scale1;    Long        x_scale2;    /* used to scale FUnits to fractional pixels */    Long        y_scale1;    Long        y_scale2;    /* used to scale FUnits to fractional pixels */    /* for non-square pixels */    Long        x_ratio;    Long        y_ratio;    UShort      ppem;        /* maximum ppem size */    Long        ratio;       /* current ratio     */    Long        scale1;    Long        scale2;      /* scale for ppem */    TT_F26Dot6  compensations[4];  /* device-specific compensations */    Bool        rotated;        /* `is the glyph rotated?'-flag   */    Bool        stretched;      /* `is the glyph stretched?'-flag */  };  typedef struct TIns_Metrics_  TIns_Metrics;  typedef TIns_Metrics*         PIns_Metrics;  /***********************************************************************/  /*                                                                     */  /*                         FreeType Face Type                          */  /*                                                                     */  /***********************************************************************/  struct  TFace_  {    /* parent engine instance for the face object */    PEngine_Instance  engine;    /* i/o stream */    TT_Stream  stream;    /* used only by the threaded builds of the library */    TMutex  lock;    /* TrueType collection header, if any was found */    TTTCHeader  ttcHeader;    /* maximum profile table, as found in the TrueType file */    TMaxProfile  maxProfile;    /* Note:                                          */    /*  it seems that some maximum values cannot be   */    /*  taken directly from this table, but rather by */    /*  combining some of its fields; e.g. the max.   */    /*  number of points seems to be given by         */    /*  MAX( maxPoints, maxCompositePoints )          */    /*                                                */    /*  For this reason, we define later our own      */    /*  max values that are used to load and allocate */    /*  further tables.                               */    TT_Header             fontHeader;           /* the font header, as   */                                                /* found in the TTF file */    TT_Horizontal_Header  horizontalHeader;     /* the horizontal header */    Bool                  verticalInfo;         /* True when vertical table */    TT_Vertical_Header    verticalHeader;       /* is present in the font   */    TT_OS2                os2;                  /* 'OS/2' table */    TT_Postscript         postscript;           /* 'Post' table */    TT_Hdmx               hdmx;                 /* 'Hdmx' table */    TName_Table           nameTable;            /* name table */    TGasp                 gasp;                 /* the 'gasp' table */    /* The directory of TrueType tables for this typeface */    UShort          numTables;    PTableDirEntry  dirTables;    /* The directory of character mappings table for */    /* this typeface                                 */    UShort      numCMaps;    PCMapTable  cMaps;    /* The glyph locations table */    ULong     numLocations;         /* UShort is not enough */#ifndef TT_HUGE_PTR    PStorage  glyphLocations;#else    Storage TT_HUGE_PTR * glyphLocations;#endif    /* NOTE : The "hmtx" is now part of the horizontal header */    /* the font program, if any */    ULong   fontPgmSize;    PByte   fontProgram;    /* the cvt program, if any */    ULong   cvtPgmSize;    PByte   cvtProgram;    /* the original, unscaled, control value table */    ULong   cvtSize;    PShort  cvt;    /* The following values _must_ be set by the */    /* maximum profile loader                    */    UShort  numGlyphs;     /* the face's total number of glyphs */    UShort  maxPoints;     /* max glyph points number, simple and composite */    UShort  maxContours;   /* max glyph contours numb, simple and composite */    UShort  maxComponents; /* max components in a composite glyph */    /* the following are object caches to track active */    /* and recycled instances and execution contexts   */    /* objects.  See 'ttcache.h'                       */    TCache  instances;   /* current instances for this face */    TCache  glyphs;      /* current glyph containers for this face */    /* A typeless pointer to the face object extensions defined */    /* in the 'ttextend.*' files.                               */    void*  extension;    Int    n_extensions;    /* number of extensions */    /* Use extensions to provide additional capabilities to the */    /* engine.  Read the developer's guide in the documentation */    /* directory to know how to do that.                        */    /* a generic pointer for client use - see TT_Set/Get_Face_Pointer */    void*  generic;  };

⌨️ 快捷键说明

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