import type { uint16 } from "../../types.ts"; import type { Reader } from "../binary/reader.ts"; /** * JSTF table - Justification data * Provides justification alternatives for scripts */ /** Justification priority levels */ export declare const JstfPriority: { /** Shrink GPOS lookups */ readonly ShrinkGpos: 0; /** Disable GPOS lookups */ readonly DisableGpos: 1; /** Shrink GSUB lookups */ readonly ShrinkGsub: 2; /** Disable GSUB lookups */ readonly DisableGsub: 3; /** Enable GPOS lookups */ readonly EnableGpos: 4; /** Enable GSUB lookups */ readonly EnableGsub: 5; /** Max extension GPOS lookups */ readonly MaxExtendGpos: 6; /** Max extension GSUB lookups */ readonly MaxExtendGsub: 7; }; /** JstfMax table - lookup indices for maximum extension */ export interface JstfMax { lookupIndices: uint16[]; } /** JstfModList - enable/disable lookup list */ export interface JstfModList { lookupIndices: uint16[]; } /** Justification priority record */ export interface JstfPriorityRecord { /** GSUB lookups to enable for shrinkage */ shrinkageEnableGsub: JstfModList | null; /** GSUB lookups to disable for shrinkage */ shrinkageDisableGsub: JstfModList | null; /** GPOS lookups to enable for shrinkage */ shrinkageEnableGpos: JstfModList | null; /** GPOS lookups to disable for shrinkage */ shrinkageDisableGpos: JstfModList | null; /** Maximum shrinkage GSUB */ shrinkageJstfMax: JstfMax | null; /** GSUB lookups to enable for extension */ extensionEnableGsub: JstfModList | null; /** GSUB lookups to disable for extension */ extensionDisableGsub: JstfModList | null; /** GPOS lookups to enable for extension */ extensionEnableGpos: JstfModList | null; /** GPOS lookups to disable for extension */ extensionDisableGpos: JstfModList | null; /** Maximum extension GSUB */ extensionJstfMax: JstfMax | null; } /** Justification language system */ export interface JstfLangSys { priorities: JstfPriorityRecord[]; } /** Justification script record */ export interface JstfScriptRecord { scriptTag: number; /** Extender glyphs for Kashida-like justification */ extenderGlyphs: uint16[]; /** Default language system */ defaultLangSys: JstfLangSys | null; /** Language-specific systems */ langSysRecords: Map; } /** JSTF table */ export interface JstfTable { majorVersion: uint16; minorVersion: uint16; scripts: JstfScriptRecord[]; } export declare function parseJstf(reader: Reader): JstfTable; /** Get extender glyphs for a script (e.g., Kashida for Arabic) */ export declare function getExtenderGlyphs(jstf: JstfTable, scriptTag: number): uint16[]; /** Get justification priorities for a script/language */ export declare function getJstfPriorities(jstf: JstfTable, scriptTag: number, languageTag?: number): JstfPriorityRecord[]; /** Get lookup modifications for shrinkage at a given priority level */ export declare function getShrinkageMods(priority: JstfPriorityRecord): { enableGsub: uint16[]; disableGsub: uint16[]; enableGpos: uint16[]; disableGpos: uint16[]; maxLookups: uint16[]; }; /** Get lookup modifications for extension at a given priority level */ export declare function getExtensionMods(priority: JstfPriorityRecord): { enableGsub: uint16[]; disableGsub: uint16[]; enableGpos: uint16[]; disableGpos: uint16[]; maxLookups: uint16[]; };