import { type ClassDef } from "../../layout/structures/class-def.ts"; import type { GlyphId, uint16 } from "../../types.ts"; import { GlyphClass } from "../../types.ts"; import type { Reader } from "../binary/reader.ts"; /** Attach point for a glyph */ export interface AttachPoint { pointIndices: uint16[]; } /** Ligature caret for a ligature glyph */ export interface LigatureCaret { caretValues: number[]; } /** Mark glyph sets */ export interface MarkGlyphSets { /** Check if glyph is in mark set */ has(setIndex: number, glyphId: GlyphId): boolean; } /** Glyph Definition table */ export interface GdefTable { version: { major: number; minor: number; }; /** Glyph class definitions (Base=1, Ligature=2, Mark=3, Component=4) */ glyphClassDef: ClassDef; /** Attachment point list (optional) */ attachList: Map | null; /** Ligature caret list (optional) */ ligCaretList: Map | null; /** Mark attachment class definitions */ markAttachClassDef: ClassDef; /** Mark glyph sets (version 1.2+) */ markGlyphSets: MarkGlyphSets | null; } export declare function parseGdef(reader: Reader): GdefTable; export declare function parseAttachList(reader: Reader): Map; export declare function parseLigCaretList(reader: Reader): Map; export declare function parseMarkGlyphSets(reader: Reader): MarkGlyphSets; /** Get glyph class from GDEF */ export declare function getGlyphClass(gdef: GdefTable | null, glyphId: GlyphId): GlyphClass | 0; /** Check if glyph is a base glyph */ export declare function isBaseGlyph(gdef: GdefTable | null, glyphId: GlyphId): boolean; /** Check if glyph is a ligature */ export declare function isLigature(gdef: GdefTable | null, glyphId: GlyphId): boolean; /** Check if glyph is a mark */ export declare function isMark(gdef: GdefTable | null, glyphId: GlyphId): boolean; /** Check if glyph is a component */ export declare function isComponent(gdef: GdefTable | null, glyphId: GlyphId): boolean;