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

📄 ftxgpos.h

📁 qt-x11-opensource-src-4.1.4.tar.gz源码
💻 H
📖 第 1 页 / 共 2 页
字号:
/******************************************************************* * *  ftxgpos.h * *    TrueType Open GPOS table support * *  Copyright 1996-2000 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. * ******************************************************************/#ifndef FTXOPEN_H#error "Don't include this file! Use ftxopen.h instead."#endif#ifndef FTXGPOS_H#define FTXGPOS_H#ifdef __cplusplusextern "C" {#endif#define TTO_Err_Invalid_GPOS_SubTable_Format  0x1020#define TTO_Err_Invalid_GPOS_SubTable         0x1021/* Lookup types for glyph positioning */#define GPOS_LOOKUP_SINGLE     1#define GPOS_LOOKUP_PAIR       2#define GPOS_LOOKUP_CURSIVE    3#define GPOS_LOOKUP_MARKBASE   4#define GPOS_LOOKUP_MARKLIG    5#define GPOS_LOOKUP_MARKMARK   6#define GPOS_LOOKUP_CONTEXT    7#define GPOS_LOOKUP_CHAIN      8#define GPOS_LOOKUP_EXTENSION  9  /* A pointer to a function which loads a glyph.  Its parameters are     the same as in a call to TT_Load_Glyph() -- if no glyph loading     function will be registered with TTO_GPOS_Register_Glyph_Function(),     TT_Load_Glyph() will be called indeed.  The purpose of this function     pointer is to provide a hook for caching glyph outlines and sbits     (using the instance's generic pointer to hold the data).     If for some reason no outline data is available (e.g. for an     embedded bitmap glyph), _glyph->outline.n_points should be set to     zero.  _glyph can be computed with        _glyph = HANDLE_Glyph( glyph )                                    */  typedef FT_Error  (*TTO_GlyphFunction)(FT_Face      face,					 FT_UInt      glyphIndex,					 FT_Int       loadFlags );  /* A pointer to a function which accesses the PostScript interpreter.     Multiple Master fonts need this interface to convert a metric ID     (as stored in an OpenType font version 1.2 or higher) `metric_id'     into a metric value (returned in `metric_value').     `data' points to the user-defined structure specified during a     call to TT_GPOS_Register_MM_Function().     `metric_value' must be returned as a scaled value (but shouldn't     be rounded).                                                       */  typedef FT_Error  (*TTO_MMFunction)(FT_Face      face,				      FT_UShort    metric_id,                                      FT_Pos*      metric_value,                                      void*        data );                                            struct  TTO_GPOSHeader_  {    FT_Memory          memory;        FT_Fixed           Version;    TTO_ScriptList     ScriptList;    TTO_FeatureList    FeatureList;    TTO_LookupList     LookupList;    TTO_GDEFHeader*    gdef;    /* the next field is used for a callback function to get the       glyph outline.                                            */    TTO_GlyphFunction  gfunc;    /* this is OpenType 1.2 -- Multiple Master fonts need this       callback function to get various metric values from the       PostScript interpreter.                                 */    TTO_MMFunction     mmfunc;    void*              data;  };  typedef struct TTO_GPOSHeader_  TTO_GPOSHeader;  typedef struct TTO_GPOSHeader_* TTO_GPOS;  /* shared tables */  struct  TTO_ValueRecord_  {    FT_Short    XPlacement;             /* horizontal adjustment for                                           placement                      */    FT_Short    YPlacement;             /* vertical adjustment for                                           placement                      */    FT_Short    XAdvance;               /* horizontal adjustment for                                           advance                        */    FT_Short    YAdvance;               /* vertical adjustment for                                           advance                        */    TTO_Device  XPlacementDevice;       /* device table for horizontal                                           placement                      */    TTO_Device  YPlacementDevice;       /* device table for vertical                                           placement                      */    TTO_Device  XAdvanceDevice;         /* device table for horizontal                                           advance                        */    TTO_Device  YAdvanceDevice;         /* device table for vertical                                           advance                        */    FT_UShort   XIdPlacement;           /* horizontal placement metric ID */    FT_UShort   YIdPlacement;           /* vertical placement metric ID   */    FT_UShort   XIdAdvance;             /* horizontal advance metric ID   */    FT_UShort   YIdAdvance;             /* vertical advance metric ID     */  };  typedef struct TTO_ValueRecord_  TTO_ValueRecord;/* Mask values to scan the value format of the ValueRecord structure.   We always expand compressed ValueRecords of the font.              */#define HAVE_X_PLACEMENT         0x0001#define HAVE_Y_PLACEMENT         0x0002#define HAVE_X_ADVANCE           0x0004#define HAVE_Y_ADVANCE           0x0008#define HAVE_X_PLACEMENT_DEVICE  0x0010#define HAVE_Y_PLACEMENT_DEVICE  0x0020#define HAVE_X_ADVANCE_DEVICE    0x0040#define HAVE_Y_ADVANCE_DEVICE    0x0080#define HAVE_X_ID_PLACEMENT      0x0100#define HAVE_Y_ID_PLACEMENT      0x0200#define HAVE_X_ID_ADVANCE        0x0400#define HAVE_Y_ID_ADVANCE        0x0800  struct  TTO_AnchorFormat1_  {    FT_Short   XCoordinate;             /* horizontal value */    FT_Short   YCoordinate;             /* vertical value   */  };  typedef struct TTO_AnchorFormat1_  TTO_AnchorFormat1;  struct  TTO_AnchorFormat2_  {    FT_Short   XCoordinate;             /* horizontal value             */    FT_Short   YCoordinate;             /* vertical value               */    FT_UShort  AnchorPoint;             /* index to glyph contour point */  };  typedef struct TTO_AnchorFormat2_  TTO_AnchorFormat2;  struct  TTO_AnchorFormat3_  {    FT_Short    XCoordinate;            /* horizontal value              */    FT_Short    YCoordinate;            /* vertical value                */    TTO_Device  XDeviceTable;           /* device table for X coordinate */    TTO_Device  YDeviceTable;           /* device table for Y coordinate */  };  typedef struct TTO_AnchorFormat3_  TTO_AnchorFormat3;  struct  TTO_AnchorFormat4_  {    FT_UShort  XIdAnchor;               /* horizontal metric ID */    FT_UShort  YIdAnchor;               /* vertical metric ID   */  };  typedef struct TTO_AnchorFormat4_  TTO_AnchorFormat4;  struct  TTO_Anchor_  {    FT_UShort  PosFormat;               /* 1, 2, 3, or 4 -- 0 indicates                                           that there is no Anchor table */    union    {      TTO_AnchorFormat1  af1;      TTO_AnchorFormat2  af2;      TTO_AnchorFormat3  af3;      TTO_AnchorFormat4  af4;    } af;  };  typedef struct TTO_Anchor_  TTO_Anchor;  struct  TTO_MarkRecord_  {    FT_UShort   Class;                  /* mark class   */    TTO_Anchor  MarkAnchor;             /* anchor table */  };  typedef struct TTO_MarkRecord_  TTO_MarkRecord;  struct  TTO_MarkArray_  {    FT_UShort        MarkCount;         /* number of MarkRecord tables */    TTO_MarkRecord*  MarkRecord;        /* array of MarkRecord tables  */  };  typedef struct TTO_MarkArray_  TTO_MarkArray;  /* LookupType 1 */  struct  TTO_SinglePosFormat1_  {    TTO_ValueRecord  Value;             /* ValueRecord for all covered                                           glyphs                      */  };  typedef struct TTO_SinglePosFormat1_  TTO_SinglePosFormat1;  struct  TTO_SinglePosFormat2_  {    FT_UShort         ValueCount;       /* number of ValueRecord tables */    TTO_ValueRecord*  Value;            /* array of ValueRecord tables  */  };  typedef struct TTO_SinglePosFormat2_  TTO_SinglePosFormat2;  struct  TTO_SinglePos_  {    FT_UShort     PosFormat;            /* 1 or 2         */    TTO_Coverage  Coverage;             /* Coverage table */    FT_UShort     ValueFormat;          /* format of ValueRecord table */    union    {      TTO_SinglePosFormat1  spf1;      TTO_SinglePosFormat2  spf2;    } spf;  };  typedef struct TTO_SinglePos_  TTO_SinglePos;  /* LookupType 2 */  struct  TTO_PairValueRecord_  {    FT_UShort        SecondGlyph;       /* glyph ID for second glyph  */    TTO_ValueRecord  Value1;            /* pos. data for first glyph  */    TTO_ValueRecord  Value2;            /* pos. data for second glyph */  };  typedef struct TTO_PairValueRecord_  TTO_PairValueRecord;  struct  TTO_PairSet_  {    FT_UShort             PairValueCount;                                        /* number of PairValueRecord tables */    TTO_PairValueRecord*  PairValueRecord;                                        /* array of PairValueRecord tables  */  };  typedef struct TTO_PairSet_  TTO_PairSet;  struct  TTO_PairPosFormat1_  {    FT_UShort     PairSetCount;         /* number of PairSet tables    */    TTO_PairSet*  PairSet;              /* array of PairSet tables     */  };  typedef struct TTO_PairPosFormat1_  TTO_PairPosFormat1;  struct  TTO_Class2Record_  {    TTO_ValueRecord  Value1;            /* pos. data for first glyph  */    TTO_ValueRecord  Value2;            /* pos. data for second glyph */  };  typedef struct TTO_Class2Record_  TTO_Class2Record;  struct  TTO_Class1Record_  {    TTO_Class2Record*  Class2Record;    /* array of Class2Record tables */  };  typedef struct TTO_Class1Record_  TTO_Class1Record;  struct  TTO_PairPosFormat2_  {    TTO_ClassDefinition  ClassDef1;     /* class def. for first glyph     */    TTO_ClassDefinition  ClassDef2;     /* class def. for second glyph    */    FT_UShort            Class1Count;   /* number of classes in ClassDef1                                           table                          */    FT_UShort            Class2Count;   /* number of classes in ClassDef2                                           table                          */    TTO_Class1Record*    Class1Record;  /* array of Class1Record tables   */  };  typedef struct TTO_PairPosFormat2_  TTO_PairPosFormat2;  struct  TTO_PairPos_  {    FT_UShort     PosFormat;            /* 1 or 2         */    TTO_Coverage  Coverage;             /* Coverage table */    FT_UShort     ValueFormat1;         /* format of ValueRecord table                                           for first glyph             */    FT_UShort     ValueFormat2;         /* format of ValueRecord table                                           for second glyph            */    union    {      TTO_PairPosFormat1  ppf1;      TTO_PairPosFormat2  ppf2;    } ppf;  };  typedef struct TTO_PairPos_  TTO_PairPos;  /* LookupType 3 */  struct  TTO_EntryExitRecord_  {    TTO_Anchor  EntryAnchor;            /* entry Anchor table */    TTO_Anchor  ExitAnchor;             /* exit Anchor table  */  };  typedef struct TTO_EntryExitRecord_  TTO_EntryExitRecord;  struct  TTO_CursivePos_  {    FT_UShort             PosFormat;    /* always 1                         */    TTO_Coverage          Coverage;     /* Coverage table                   */    FT_UShort             EntryExitCount;                                        /* number of EntryExitRecord tables */    TTO_EntryExitRecord*  EntryExitRecord;                                        /* array of EntryExitRecord tables  */  };  typedef struct TTO_CursivePos_  TTO_CursivePos;  /* LookupType 4 */  struct  TTO_BaseRecord_  {    TTO_Anchor*  BaseAnchor;            /* array of base glyph anchor                                           tables                     */  };  typedef struct TTO_BaseRecord_  TTO_BaseRecord;  struct  TTO_BaseArray_  {    FT_UShort        BaseCount;         /* number of BaseRecord tables */    TTO_BaseRecord*  BaseRecord;        /* array of BaseRecord tables  */  };  typedef struct TTO_BaseArray_  TTO_BaseArray;  struct  TTO_MarkBasePos_  {    FT_UShort      PosFormat;           /* always 1                  */    TTO_Coverage   MarkCoverage;        /* mark glyph coverage table */    TTO_Coverage   BaseCoverage;        /* base glyph coverage table */    FT_UShort      ClassCount;          /* number of mark classes    */    TTO_MarkArray  MarkArray;           /* mark array table          */    TTO_BaseArray  BaseArray;           /* base array table          */  };  typedef struct TTO_MarkBasePos_  TTO_MarkBasePos;  /* LookupType 5 */  struct  TTO_ComponentRecord_  {    TTO_Anchor*  LigatureAnchor;        /* array of ligature glyph anchor                                           tables                         */  };  typedef struct TTO_ComponentRecord_  TTO_ComponentRecord;  struct  TTO_LigatureAttach_  {    FT_UShort             ComponentCount;                                        /* number of ComponentRecord tables */

⌨️ 快捷键说明

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