import type { GlyphId, uint32 } from "../../types.ts"; import type { Reader } from "../binary/reader.ts"; /** * loca table - Glyph location index * Maps glyph IDs to byte offsets in the glyf table */ export interface LocaTable { /** Glyph offsets (numGlyphs + 1 entries) */ offsets: uint32[]; /** Whether the font uses short (16-bit) or long (32-bit) offsets */ isShort: boolean; } /** * Parse loca table * @param reader - Reader positioned at start of loca table * @param numGlyphs - Number of glyphs from maxp table * @param indexToLocFormat - 0 for short offsets, 1 for long (from head table) */ export declare function parseLoca(reader: Reader, numGlyphs: number, indexToLocFormat: number): LocaTable; /** * Get byte offset and length for a glyph in the glyf table * Returns null if glyph has no outline (empty glyph) * @param loca - Parsed loca table * @param glyphId - Glyph ID to look up * @returns Object with offset and length, or null if glyph has no outline */ export declare function getGlyphLocation(loca: LocaTable, glyphId: GlyphId): { offset: uint32; length: uint32; } | null; /** * Check if a glyph has outline data */ export declare function hasGlyphOutline(loca: LocaTable, glyphId: GlyphId): boolean;