import { type GlyphRun } from '../glyph-run.ts'; import { ClassDefTable } from './common/classdef.ts'; import { CoverageTable } from './common/coverage.ts'; import { FeatureListTable, type FeatureTable } from './common/feature-list.ts'; import { LookupListTable, type LookupTable } from './common/lookup-list.ts'; import { type LangSysTable, ScriptListTable, type ScriptTable } from './common/script-list.ts'; /** * The 'GPOS' table provides glyph positioning information for advanced typography. */ export declare class GposTable { private readonly data; /** The script list table in this 'GPOS' table. */ readonly scriptListTable: ScriptListTable; /** The feature list table in this 'GPOS' table. */ readonly featureListTable: FeatureListTable; /** The lookup list table in this 'GPOS' table. */ readonly lookupListTable: LookupListTable; /** * Reads a 'GPOS' table from the given DataView. */ static read(data: DataView): GposTable; private constructor(); findScriptTable(scriptTag?: string): ScriptTable | undefined; findLangSysTable(scriptTable: ScriptTable, langSysTag: string | undefined): LangSysTable | undefined; findFeatureTables(featureTag: string): FeatureTable[]; } type ValueRecord = { xPlacement?: number | undefined; yPlacement?: number | undefined; xAdvance?: number | undefined; yAdvance?: number | undefined; xPlacementDeviceOffset?: number | undefined; yPlacementDeviceOffset?: number | undefined; xAdvanceDeviceOffset?: number | undefined; yAdvanceDeviceOffset?: number | undefined; }; export declare function readGposSubtable(lookupTable: LookupTable, subtableIndex: number): GposSubtable | undefined; export type GposSubtable = GposSinglePosSubtable | GposPairPosSubtable | GposMarkBasePosSubtable; /** * Lookup type 1 subtable: single adjustment positioning */ export declare class GposSinglePosSubtable { private readonly isFormat1; readonly coverageTable: CoverageTable; readonly valueRecords: ValueRecord[]; static read(data: DataView): GposSinglePosSubtable; private constructor(); /** * Applies the subtable's value records to a glyph sequence. * For performance reasons, the glyphs are modified in place. */ applyToGlyphRun(glyphRun: GlyphRun, skip?: (glyphId: number) => boolean): void; } /** * Lookup type 2 subtable: pair adjustment positioning */ export declare class GposPairPosSubtable { readonly coverageTable: CoverageTable; readonly pairSets?: PairSet[]; readonly classDef1?: ClassDefTable; readonly classDef2?: ClassDefTable; readonly class1Records?: Class1Record[]; static read(data: DataView): GposPairPosSubtable; private constructor(); applyToGlyphRun(glyphRun: GlyphRun, skip?: (glyphId: number) => boolean): void; } type PairSet = { pairs: { secondGlyph: number; valueRecord1: ValueRecord; valueRecord2: ValueRecord; }[]; }; type Class1Record = { valueRecord1: ValueRecord; valueRecord2: ValueRecord; }[]; /** * Lookup type 4 subtable: mark-to-base attachment positioning * * Positions combining marks with respect to base glyphs by aligning * anchor points. Each mark has a class and an anchor; each base glyph * defines one anchor per mark class. */ export declare class GposMarkBasePosSubtable { readonly markCoverage: CoverageTable; readonly baseCoverage: CoverageTable; readonly markArray: MarkRecord[]; readonly baseArray: (AnchorPoint | null)[][]; static read(data: DataView): GposMarkBasePosSubtable; private constructor(); applyToGlyphRun(glyphRun: GlyphRun, skip?: (glyphId: number) => boolean, markAttachments?: Map): void; } type AnchorPoint = { readonly x: number; readonly y: number; }; type MarkRecord = { readonly markClass: number; readonly anchor: AnchorPoint; }; export {};