import type { Font } from "../font/font.ts"; import type { AnyGposLookup } from "../font/tables/gpos.ts"; import type { AnyGsubLookup } from "../font/tables/gsub.ts"; import type { Tag } from "../types.ts"; /** Feature with optional value */ export interface ShapeFeature { tag: Tag; enabled: boolean; } /** Lookup entry with index */ export interface LookupEntry { index: number; lookup: T; } /** Collected lookups for shaping */ export interface ShapePlan { script: Tag; language: Tag | null; direction: "ltr" | "rtl"; /** GSUB lookups to apply, in order */ gsubLookups: LookupEntry[]; /** GPOS lookups to apply, in order */ gposLookups: LookupEntry[]; /** Fast O(1) lookup by index for nested GSUB lookups */ gsubLookupMap: Map>; /** Fast O(1) lookup by index for nested GPOS lookups */ gposLookupMap: Map>; } /** Get or create a cached shape plan */ export declare function getOrCreateShapePlan(font: Font, script: string, language: string | null, direction: "ltr" | "rtl", userFeatures?: ShapeFeature[], axisCoords?: number[] | null): ShapePlan; /** Create a shape plan for the given font and settings */ export declare function createShapePlan(font: Font, script: string, language: string | null, direction: "ltr" | "rtl", userFeatures?: ShapeFeature[], axisCoords?: number[] | null): ShapePlan;