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

📄 ftxgsub.h

📁 神龙卡开发原代码
💻 H
📖 第 1 页 / 共 2 页
字号:
/******************************************************************* * *  ftxgsub.h * *    TrueType Open GSUB table support * *  Copyright 1996-1999 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 FTXGSUB_H#define FTXGSUB_H#ifdef __cplusplusextern "C" {#endif#define TTO_Err_Invalid_GSUB_SubTable_Format  0x1010#define TTO_Err_Invalid_GSUB_SubTable         0x1011/* Lookup types for glyph substitution */#define GSUB_LOOKUP_SINGLE     1#define GSUB_LOOKUP_MULTIPLE   2#define GSUB_LOOKUP_ALTERNATE  3#define GSUB_LOOKUP_LIGATURE   4#define GSUB_LOOKUP_CONTEXT    5#define GSUB_LOOKUP_CHAIN      6/* Use this if a feature applies to all glyphs */#define ALL_GLYPHS  0xFFFF  /* A pointer to a function which selects the alternate glyph.  `pos' is     the position of the glyph with index `glyphID', `num_alternates'     gives the number of alternates in the `alternates' array.  `data'     points to the user-defined structure specified during a call to     TT_GSUB_Register_Alternate_Function().  The function must return an     index into the `alternates' array.                                   */  typedef TT_UShort  (*TTO_AltFunction)(TT_ULong    pos,                                        TT_UShort   glyphID,                                        TT_UShort   num_alternates,                                        TT_UShort*  alternates,                                        void*       data );  struct  TTO_GSUBHeader_  {    TT_Bool          loaded;    TT_ULong         offset;    TT_Fixed         Version;    TTO_ScriptList   ScriptList;    TTO_FeatureList  FeatureList;    TTO_LookupList   LookupList;    TTO_GDEFHeader*  gdef;    /* the next two fields are used for an alternate substitution callback       function to select the proper alternate glyph.                      */    TTO_AltFunction  alt;    void*            data;  };  typedef struct TTO_GSUBHeader_  TTO_GSUBHeader;  /* LookupType 1 */  struct  TTO_SingleSubstFormat1_  {    TT_Short  DeltaGlyphID;             /* constant added to get                                           substitution glyph index */  };  typedef struct TTO_SingleSubstFormat1_  TTO_SingleSubstFormat1;  struct  TTO_SingleSubstFormat2_  {    TT_UShort   GlyphCount;             /* number of glyph IDs in                                           Substitute array              */    TT_UShort*  Substitute;             /* array of substitute glyph IDs */  };  typedef struct TTO_SingleSubstFormat2_  TTO_SingleSubstFormat2;  struct  TTO_SingleSubst_  {    TT_UShort     SubstFormat;          /* 1 or 2         */    TTO_Coverage  Coverage;             /* Coverage table */    union    {      TTO_SingleSubstFormat1  ssf1;      TTO_SingleSubstFormat2  ssf2;    } ssf;  };  typedef struct TTO_SingleSubst_  TTO_SingleSubst;  /* LookupType 2 */  struct  TTO_Sequence_  {    TT_UShort   GlyphCount;             /* number of glyph IDs in the                                           Substitute array           */    TT_UShort*  Substitute;             /* string of glyph IDs to                                           substitute                 */  };  typedef struct TTO_Sequence_  TTO_Sequence;  struct  TTO_MultipleSubst_  {    TT_UShort      SubstFormat;         /* always 1                  */    TTO_Coverage   Coverage;            /* Coverage table            */    TT_UShort      SequenceCount;       /* number of Sequence tables */    TTO_Sequence*  Sequence;            /* array of Sequence tables  */  };  typedef struct TTO_MultipleSubst_  TTO_MultipleSubst;  /* LookupType 3 */  struct  TTO_AlternateSet_  {    TT_UShort   GlyphCount;             /* number of glyph IDs in the                                           Alternate array              */    TT_UShort*  Alternate;              /* array of alternate glyph IDs */  };  typedef struct TTO_AlternateSet_  TTO_AlternateSet;  struct  TTO_AlternateSubst_  {    TT_UShort          SubstFormat;     /* always 1                      */    TTO_Coverage       Coverage;        /* Coverage table                */    TT_UShort          AlternateSetCount;                                        /* number of AlternateSet tables */    TTO_AlternateSet*  AlternateSet;    /* array of AlternateSet tables  */  };  typedef struct TTO_AlternateSubst_  TTO_AlternateSubst;  /* LookupType 4 */  struct  TTO_Ligature_  {    TT_UShort   LigGlyph;               /* glyphID of ligature                                           to substitute                    */    TT_UShort   ComponentCount;         /* number of components in ligature */    TT_UShort*  Component;              /* array of component glyph IDs     */  };  typedef struct TTO_Ligature_  TTO_Ligature;  struct  TTO_LigatureSet_  {    TT_UShort      LigatureCount;       /* number of Ligature tables */    TTO_Ligature*  Ligature;            /* array of Ligature tables  */  };  typedef struct TTO_LigatureSet_  TTO_LigatureSet;  struct  TTO_LigatureSubst_  {    TT_UShort         SubstFormat;      /* always 1                     */    TTO_Coverage      Coverage;         /* Coverage table               */    TT_UShort         LigatureSetCount; /* number of LigatureSet tables */    TTO_LigatureSet*  LigatureSet;      /* array of LigatureSet tables  */  };  typedef struct TTO_LigatureSubst_  TTO_LigatureSubst;  /* needed by both lookup type 5 and 6 */  struct  TTO_SubstLookupRecord_  {    TT_UShort  SequenceIndex;           /* index into current                                           glyph sequence               */    TT_UShort  LookupListIndex;         /* Lookup to apply to that pos. */  };  typedef struct TTO_SubstLookupRecord_  TTO_SubstLookupRecord;  /* LookupType 5 */  struct  TTO_SubRule_  {    TT_UShort               GlyphCount; /* total number of input glyphs */    TT_UShort               SubstCount; /* number of SubstLookupRecord                                           tables                       */    TT_UShort*              Input;      /* array of input glyph IDs     */    TTO_SubstLookupRecord*  SubstLookupRecord;                                        /* array of SubstLookupRecord                                           tables                       */  };  typedef struct TTO_SubRule_  TTO_SubRule;  struct  TTO_SubRuleSet_  {    TT_UShort     SubRuleCount;         /* number of SubRule tables */    TTO_SubRule*  SubRule;              /* array of SubRule tables  */  };  typedef struct TTO_SubRuleSet_  TTO_SubRuleSet;  struct  TTO_ContextSubstFormat1_  {    TTO_Coverage     Coverage;          /* Coverage table              */    TT_UShort        SubRuleSetCount;   /* number of SubRuleSet tables */    TTO_SubRuleSet*  SubRuleSet;        /* array of SubRuleSet tables  */  };  typedef struct TTO_ContextSubstFormat1_  TTO_ContextSubstFormat1;  struct  TTO_SubClassRule_  {    TT_UShort               GlyphCount; /* total number of context classes */    TT_UShort               SubstCount; /* number of SubstLookupRecord                                           tables                          */    TT_UShort*              Class;      /* array of classes                */    TTO_SubstLookupRecord*  SubstLookupRecord;                                        /* array of SubstLookupRecord                                           tables                          */  };  typedef struct TTO_SubClassRule_  TTO_SubClassRule;  struct  TTO_SubClassSet_  {    TT_UShort          SubClassRuleCount;                                        /* number of SubClassRule tables */    TTO_SubClassRule*  SubClassRule;    /* array of SubClassRule tables  */  };  typedef struct TTO_SubClassSet_  TTO_SubClassSet;  /* The `MaxContextLength' field is not defined in the TTO specification     but simplifies the implementation of this format.  It holds the     maximal context length used in the context rules.                    */  struct  TTO_ContextSubstFormat2_  {    TT_UShort            MaxContextLength;                                        /* maximal context length       */    TTO_Coverage         Coverage;      /* Coverage table               */    TTO_ClassDefinition  ClassDef;      /* ClassDef table               */    TT_UShort            SubClassSetCount;                                        /* number of SubClassSet tables */    TTO_SubClassSet*     SubClassSet;   /* array of SubClassSet tables  */  };  typedef struct TTO_ContextSubstFormat2_  TTO_ContextSubstFormat2;  struct  TTO_ContextSubstFormat3_

⌨️ 快捷键说明

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