@pdfa-lab/fontkit / GSUBProcessor
Class: GSUBProcessor<T> ​
Defined in: src/open-type/gsub-processor.ts:11
Applies OpenType GSUB lookups (substitutions) to a glyph buffer. Supports lookup types 1–7, delegating contextual (5) and chaining contextual (6) lookups to OTProcessor, and recursively resolving extension substitutions (7).
Extends ​
Type Parameters ​
| Type Parameter |
|---|
T |
Constructors ​
Constructor ​
new GSUBProcessor<
T>(font,table):GSUBProcessor<T>
Defined in: src/open-type/open-type-processor.ts:35
Parameters ​
| Parameter | Type |
|---|---|
font | TrueTypeFont |
table | GPOS | GSUB |
Returns ​
GSUBProcessor<T>
Inherited from ​
Properties ​
| Property | Modifier | Type | Inherited from | Defined in |
|---|---|---|---|---|
direction | protected | BidiDirection | undefined | OpenTypeProcessor.direction | src/open-type/open-type-processor.ts:32 |
features | public | Partial<Record<FeatureTag, Feature>> | OpenTypeProcessor.features | src/open-type/open-type-processor.ts:26 |
font | protected | TrueTypeFont | OpenTypeProcessor.font | src/open-type/open-type-processor.ts:20 |
glyphIterator | protected | GlyphIterator<T> | undefined | OpenTypeProcessor.glyphIterator | src/open-type/open-type-processor.ts:33 |
glyphs | protected | GlyphInfo<T>[] | OpenTypeProcessor.glyphs | src/open-type/open-type-processor.ts:28 |
ligatureID | protected | number | OpenTypeProcessor.ligatureID | src/open-type/open-type-processor.ts:30 |
positions? | protected | GlyphPosition[] | OpenTypeProcessor.positions | src/open-type/open-type-processor.ts:29 |
Methods ​
applyChainingContext() ​
protectedapplyChainingContext(table):boolean
Defined in: src/open-type/open-type-processor.ts:491
Parameters ​
| Parameter | Type |
|---|---|
table | ChainingContext |
Returns ​
boolean
Inherited from ​
OpenTypeProcessor.applyChainingContext
applyContext() ​
protectedapplyContext(table):boolean
Defined in: src/open-type/open-type-processor.ts:439
Parameters ​
| Parameter | Type |
|---|---|
table | Context |
Returns ​
boolean
Inherited from ​
OpenTypeProcessor.applyContext
applyFeatures() ​
applyFeatures(
userFeatures,glyphs,advances?):void
Defined in: src/open-type/open-type-processor.ts:242
Parameters ​
| Parameter | Type |
|---|---|
userFeatures | keyof Features[] |
glyphs | GlyphInfo<T>[] |
advances? | GlyphPosition[] |
Returns ​
void
Inherited from ​
OpenTypeProcessor.applyFeatures
applyLookup() ​
applyLookup(
lookupType,table):boolean
Defined in: src/open-type/gsub-processor.ts:12
Parameters ​
| Parameter | Type |
|---|---|
lookupType | number |
table | LookupTable |
Returns ​
boolean
Overrides ​
coverageIndex() ​
protectedcoverageIndex(coverage,glyph?):number
Defined in: src/open-type/open-type-processor.ts:317
Parameters ​
| Parameter | Type |
|---|---|
coverage | Coverage |
glyph? | number |
Returns ​
number
Inherited from ​
OpenTypeProcessor.coverageIndex
getClassID() ​
getClassID(
glyph,classDef):number
Defined in: src/open-type/open-type-processor.ts:402
Parameters ​
| Parameter | Type |
|---|---|
glyph | number |
classDef | ClassDef |
Returns ​
number
Inherited from ​
selectScript() ​
selectScript(
script?,language?,direction?):string|null
Defined in: src/open-type/open-type-processor.ts:82
Parameters ​
| Parameter | Type |
|---|---|
script? | string |
language? | string | null |
direction? | BidiDirection |
Returns ​
string | null
Inherited from ​
OpenTypeProcessor.selectScript
sequenceMatchIndices() ​
protectedsequenceMatchIndices(sequenceIndex,sequence):boolean|number[]
Defined in: src/open-type/open-type-processor.ts:374
Parameters ​
| Parameter | Type |
|---|---|
sequenceIndex | number |
sequence | number[] |
Returns ​
boolean | number[]