📄 ftxgsub.h
字号:
}; typedef struct TTO_ContextSubstFormat2_ TTO_ContextSubstFormat2; struct TTO_ContextSubstFormat3_ { FT_UShort GlyphCount; /* number of input glyphs */ FT_UShort SubstCount; /* number of SubstLookupRecords */ TTO_Coverage* Coverage; /* array of Coverage tables */ TTO_SubstLookupRecord* SubstLookupRecord; /* array of substitution lookups */ }; typedef struct TTO_ContextSubstFormat3_ TTO_ContextSubstFormat3; struct TTO_ContextSubst_ { FT_UShort SubstFormat; /* 1, 2, or 3 */ union { TTO_ContextSubstFormat1 csf1; TTO_ContextSubstFormat2 csf2; TTO_ContextSubstFormat3 csf3; } csf; }; typedef struct TTO_ContextSubst_ TTO_ContextSubst; /* LookupType 6 */ struct TTO_ChainSubRule_ { FT_UShort BacktrackGlyphCount; /* total number of backtrack glyphs */ FT_UShort* Backtrack; /* array of backtrack glyph IDs */ FT_UShort InputGlyphCount; /* total number of input glyphs */ FT_UShort* Input; /* array of input glyph IDs */ FT_UShort LookaheadGlyphCount; /* total number of lookahead glyphs */ FT_UShort* Lookahead; /* array of lookahead glyph IDs */ FT_UShort SubstCount; /* number of SubstLookupRecords */ TTO_SubstLookupRecord* SubstLookupRecord; /* array of SubstLookupRecords */ }; typedef struct TTO_ChainSubRule_ TTO_ChainSubRule; struct TTO_ChainSubRuleSet_ { FT_UShort ChainSubRuleCount; /* number of ChainSubRule tables */ TTO_ChainSubRule* ChainSubRule; /* array of ChainSubRule tables */ }; typedef struct TTO_ChainSubRuleSet_ TTO_ChainSubRuleSet; struct TTO_ChainContextSubstFormat1_ { TTO_Coverage Coverage; /* Coverage table */ FT_UShort ChainSubRuleSetCount; /* number of ChainSubRuleSet tables */ TTO_ChainSubRuleSet* ChainSubRuleSet; /* array of ChainSubRuleSet tables */ }; typedef struct TTO_ChainContextSubstFormat1_ TTO_ChainContextSubstFormat1; struct TTO_ChainSubClassRule_ { FT_UShort BacktrackGlyphCount; /* total number of backtrack classes */ FT_UShort* Backtrack; /* array of backtrack classes */ FT_UShort InputGlyphCount; /* total number of context classes */ FT_UShort* Input; /* array of context classes */ FT_UShort LookaheadGlyphCount; /* total number of lookahead classes */ FT_UShort* Lookahead; /* array of lookahead classes */ FT_UShort SubstCount; /* number of SubstLookupRecords */ TTO_SubstLookupRecord* SubstLookupRecord; /* array of substitution lookups */ }; typedef struct TTO_ChainSubClassRule_ TTO_ChainSubClassRule; struct TTO_ChainSubClassSet_ { FT_UShort ChainSubClassRuleCount; /* number of ChainSubClassRule tables */ TTO_ChainSubClassRule* ChainSubClassRule; /* array of ChainSubClassRule tables */ }; typedef struct TTO_ChainSubClassSet_ TTO_ChainSubClassSet; /* The `MaxXXXLength' fields are not defined in the TTO specification but simplifies the implementation of this format. It holds the maximal context length used in the specific context rules. */ struct TTO_ChainContextSubstFormat2_ { TTO_Coverage Coverage; /* Coverage table */ FT_UShort MaxBacktrackLength; /* maximal backtrack length */ TTO_ClassDefinition BacktrackClassDef; /* BacktrackClassDef table */ FT_UShort MaxInputLength; /* maximal input length */ TTO_ClassDefinition InputClassDef; /* InputClassDef table */ FT_UShort MaxLookaheadLength; /* maximal lookahead length */ TTO_ClassDefinition LookaheadClassDef; /* LookaheadClassDef table */ FT_UShort ChainSubClassSetCount; /* number of ChainSubClassSet tables */ TTO_ChainSubClassSet* ChainSubClassSet; /* array of ChainSubClassSet tables */ }; typedef struct TTO_ChainContextSubstFormat2_ TTO_ChainContextSubstFormat2; struct TTO_ChainContextSubstFormat3_ { FT_UShort BacktrackGlyphCount; /* number of backtrack glyphs */ TTO_Coverage* BacktrackCoverage; /* array of backtrack Coverage tables */ FT_UShort InputGlyphCount; /* number of input glyphs */ TTO_Coverage* InputCoverage; /* array of input coverage tables */ FT_UShort LookaheadGlyphCount; /* number of lookahead glyphs */ TTO_Coverage* LookaheadCoverage; /* array of lookahead coverage tables */ FT_UShort SubstCount; /* number of SubstLookupRecords */ TTO_SubstLookupRecord* SubstLookupRecord; /* array of substitution lookups */ }; typedef struct TTO_ChainContextSubstFormat3_ TTO_ChainContextSubstFormat3; struct TTO_ChainContextSubst_ { FT_UShort SubstFormat; /* 1, 2, or 3 */ union { TTO_ChainContextSubstFormat1 ccsf1; TTO_ChainContextSubstFormat2 ccsf2; TTO_ChainContextSubstFormat3 ccsf3; } ccsf; }; typedef struct TTO_ChainContextSubst_ TTO_ChainContextSubst; union TTO_GSUB_SubTable_ { TTO_SingleSubst single; TTO_MultipleSubst multiple; TTO_AlternateSubst alternate; TTO_LigatureSubst ligature; TTO_ContextSubst context; TTO_ChainContextSubst chain; }; typedef union TTO_GSUB_SubTable_ TTO_GSUB_SubTable; /* A simple string object. It can both `send' and `receive' data. In case of sending, `length' and `pos' will be used. In case of receiving, `pos' points to the first free slot, and `allocated' specifies the amount of allocated memory (and the `length' field will be ignored). The routine TT_Add_String() will increase the amount of memory if necessary. After end of receive, `length' should be set to the value of `pos', and `pos' will be set to zero. `properties' (which is treated as a bit field) gives the glyph's properties: If a certain bit is set for a glyph, the feature which has the same bit set in its property value is applied. `components' is an internal array which tracks components of ligatures. We need this for MarkToLigature Attachment Positioning Subtables (in GPOS) together with `ligIDs' (which is used to mark ligatures and the skipped glyphs during a ligature lookup). `max_ligID' is increased after a successful ligature lookup. NEVER modify any elements of the structure! You should rather copy its contents if necessary. TT_Add_String() will also handle allocation; you should use free() in case you want to destroy the arrays in the object. */ /* finally, the GSUB API */ /* EXPORT_DEF TT_Error TT_Init_GSUB_Extension( TT_Engine engine ); */ EXPORT_DEF FT_Error TT_Load_GSUB_Table( FT_Face face, TTO_GSUBHeader** gsub, TTO_GDEFHeader* gdef ); EXPORT_DEF FT_Error TT_Done_GSUB_Table( TTO_GSUBHeader* gsub ); EXPORT_DEF FT_Error TT_GSUB_Select_Script( TTO_GSUBHeader* gsub, FT_ULong script_tag, FT_UShort* script_index ); EXPORT_DEF FT_Error TT_GSUB_Select_Language( TTO_GSUBHeader* gsub, FT_ULong language_tag, FT_UShort script_index, FT_UShort* language_index, FT_UShort* req_feature_index ); EXPORT_DEF FT_Error TT_GSUB_Select_Feature( TTO_GSUBHeader* gsub, FT_ULong feature_tag, FT_UShort script_index, FT_UShort language_index, FT_UShort* feature_index ); EXPORT_DEF FT_Error TT_GSUB_Query_Scripts( TTO_GSUBHeader* gsub, FT_ULong** script_tag_list ); EXPORT_DEF FT_Error TT_GSUB_Query_Languages( TTO_GSUBHeader* gsub, FT_UShort script_index, FT_ULong** language_tag_list ); EXPORT_DEF FT_Error TT_GSUB_Query_Features( TTO_GSUBHeader* gsub, FT_UShort script_index, FT_UShort language_index, FT_ULong** feature_tag_list ); EXPORT_DEF FT_Error TT_GSUB_Add_Feature( TTO_GSUBHeader* gsub, FT_UShort feature_index, FT_UInt property ); EXPORT_DEF FT_Error TT_GSUB_Clear_Features( TTO_GSUBHeader* gsub ); EXPORT_DEF FT_Error TT_GSUB_Register_Alternate_Function( TTO_GSUBHeader* gsub, TTO_AltFunction altfunc, void* data ); EXPORT_DEF FT_Error TT_GSUB_Apply_String( TTO_GSUBHeader* gsub, OTL_Buffer buffer );#ifdef __cplusplus}#endif#endif /* FTXGSUB_H *//* END */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -