THotPDF GSUB Script and Language Methods

THotPDF API reference

 

THotPDF Methods  Auto Shaping  GSUB

Selects and discovers the OpenType GSUB ScriptList, LangSys, and FeatureList entries used by all GSUB lookup queries

 

Delphi syntax

procedure SetGSUBScript(const ScriptTag: AnsiString);

procedure SetGSUBLanguage(const LangTag: AnsiString);

function GetGSUBScripts: TGSUBStringArray;

function GetGSUBLanguages(const ScriptTag: AnsiString): TGSUBStringArray;

function GetGSUBFeatures(const ScriptTag, LangTag: AnsiString): TGSUBStringArray;

 

Covered APIs

APIUsage notes
SetGSUBScriptSelects the OpenType script tag used by later GSUB feature and lookup queries
SetGSUBLanguageSelects the OpenType language-system tag and falls back to the script default when unavailable, matching common OpenType behaviour
GetGSUBScriptsReturns the script tags advertised by the registered Unicode font's GSUB ScriptList
GetGSUBLanguagesReturns the language-system tags available for a script tag
GetGSUBFeaturesReturns the feature tags reachable for a script and language-system pair

 

Usage notes

SetGSUBScript is strict: an unknown script tag makes later queries return no-op results. SetGSUBLanguage falls back to the script default LangSys when the requested language tag is unavailable, matching common OpenType behaviour

 

See also: OpenType GSUB Engine GSUB lookup methods ShapingFeatures