Skip to content

@pdfa-lab/fontkit / OpenTypeProcessor

Class: OpenTypeProcessor<T> ​

Defined in: src/open-type/open-type-processor.ts:19

Extended by ​

Type Parameters ​

Type Parameter
T

Constructors ​

Constructor ​

new OpenTypeProcessor<T>(font, table): OpenTypeProcessor<T>

Defined in: src/open-type/open-type-processor.ts:35

Parameters ​

ParameterType
fontTrueTypeFont
tableGPOS | GSUB

Returns ​

OpenTypeProcessor<T>

Properties ​

PropertyModifierTypeDefined in
directionprotectedBidiDirection | undefinedsrc/open-type/open-type-processor.ts:32
featurespublicPartial<Record<FeatureTag, Feature>>src/open-type/open-type-processor.ts:26
fontprotectedTrueTypeFontsrc/open-type/open-type-processor.ts:20
glyphIteratorprotectedGlyphIterator<T> | undefinedsrc/open-type/open-type-processor.ts:33
glyphsprotectedGlyphInfo<T>[]src/open-type/open-type-processor.ts:28
ligatureIDprotectednumbersrc/open-type/open-type-processor.ts:30
positions?protectedGlyphPosition[]src/open-type/open-type-processor.ts:29

Methods ​

applyChainingContext() ​

protected applyChainingContext(table): boolean

Defined in: src/open-type/open-type-processor.ts:491

Parameters ​

ParameterType
tableChainingContext

Returns ​

boolean


applyContext() ​

protected applyContext(table): boolean

Defined in: src/open-type/open-type-processor.ts:439

Parameters ​

ParameterType
tableContext

Returns ​

boolean


applyFeatures() ​

applyFeatures(userFeatures, glyphs, advances?): void

Defined in: src/open-type/open-type-processor.ts:242

Parameters ​

ParameterType
userFeatureskeyof Features[]
glyphsGlyphInfo<T>[]
advances?GlyphPosition[]

Returns ​

void


applyLookup() ​

applyLookup(_lookupType, _table): boolean

Defined in: src/open-type/open-type-processor.ts:284

Parameters ​

ParameterType
_lookupTypenumber
_tableLookupTable | LookupTable

Returns ​

boolean


coverageIndex() ​

protected coverageIndex(coverage, glyph?): number

Defined in: src/open-type/open-type-processor.ts:317

Parameters ​

ParameterType
coverageCoverage
glyph?number

Returns ​

number


getClassID() ​

getClassID(glyph, classDef): number

Defined in: src/open-type/open-type-processor.ts:402

Parameters ​

ParameterType
glyphnumber
classDefClassDef

Returns ​

number


selectScript() ​

selectScript(script?, language?, direction?): string | null

Defined in: src/open-type/open-type-processor.ts:82

Parameters ​

ParameterType
script?string
language?string | null
direction?BidiDirection

Returns ​

string | null


sequenceMatchIndices() ​

protected sequenceMatchIndices(sequenceIndex, sequence): boolean | number[]

Defined in: src/open-type/open-type-processor.ts:374

Parameters ​

ParameterType
sequenceIndexnumber
sequencenumber[]

Returns ​

boolean | number[]