|
THotPDF GSUB Lookup Methods THotPDF API reference
|
THotPDF Methods Auto Shaping GSUB |
|
Documents the capability-level GSUB lookup APIs for single, multiple, alternate, ligature, contextual, chained contextual, reverse chained, contextual-feature, and localized-form substitutions
Delphi syntax function GetSingleSubstituteGlyph(InputGID: Word; const FeatureTag: AnsiString): Word; function GetMultipleSubstituteGlyphs(InputGID: Word; const FeatureTag: AnsiString; var OutGIDs: TGSUBLookupArray): Boolean; function GetAlternateGlyphCount(InputGID: Word; const FeatureTag: AnsiString): Integer; function GetAlternateGlyph(InputGID: Word; const FeatureTag: AnsiString; AlternateIndex: Integer): Word; function ApplyLigatureSubstitution(const InputGIDs: array of Word; StartIndex: Integer; const FeatureTag: AnsiString; out OutGID: Word; out ConsumedCount: Integer): Boolean; function ApplyContextualSubst(const InputGIDs: array of Word; StartIndex: Integer; const FeatureTag: AnsiString; var OutGIDs: TGSUBLookupArray; out ConsumedLen: Integer): Boolean; function ApplyReverseChainedContextualSubst(const InputGIDs: array of Word; StartIndex: Integer; const FeatureTag: AnsiString; out OutGID: Word): Boolean; function ApplyGSUBContextualFeature(const Wide: UnicodeString; const AFeatureTag: AnsiString): UnicodeString; function ApplyLocalizedForms(const Wide: UnicodeString): UnicodeString;
Covered APIs
Usage notes These methods answer what the font's GSUB table would do. ApplyGSUBContextualFeature is the shared path for contextual features such as rclt and calt; ApplyLocalizedForms applies locl under the active GSUB script and language. If the caller emits returned substitute GIDs manually, MarkUnicodeGlyphUsed or a synthetic-codepoint mapping must keep those glyphs inside the embedded subset and ToUnicode map
See also: OpenType GSUB Engine GSUB script and language methods ShapingFeatures Subset and mapping methods |