import { PathSeg } from './content.js'; /** A reader for one font program's outlines, with its tables located once. */ export interface OutlineSource { /** The glyph's contours in a one-unit em, or `undefined` for an empty one. */ readonly path: (gid: number) => Array | undefined; /** * How many glyphs the program holds. A glyph INSIDE that count which draws * nothing is a blank one — a space — and not a glyph the program lacks. */ readonly count: number; /** * Whether an sfnt program carries a `cmap` at all. Without one there is no * way to reach a glyph by character (§9.6.6.4), which says what the file * means by its codes: they are glyph INDICES. Absent for a bare CFF, which * has no such table and is addressed by NAME through its charset. */ readonly cmap?: boolean; } /** * Prepare an embedded TrueType program for outline reading (§9.6.6). * * @param program The raw `/FontFile2` bytes. * @returns A reader, or `undefined` where the program carries no `glyf`/`loca` * pair — an OpenType/CFF program under `/FontFile2` is one such, and * its outlines are charstrings this does not read. */ export declare function outlineSource(program: Uint8Array): OutlineSource | undefined; /** * §post format 2.0 — the NAME each glyph of a TrueType program goes by. * * A legacy eight-bit font is reached through this table and nothing else. Its * program carries no `cmap`, so a code cannot be turned into a character and * then into a glyph; what it can be turned into is a glyph NAME, through the * encoding the font dictionary states (Annex D.2) — and the name is looked up * here. TrueType_without_cmap.pdf is an Armenian face, Masis, whose `i` draws * ի: read as text its line came back "'>in", and drawn by name it is the line * the page shows. * * @param program The raw `/FontFile2` bytes. * @returns Glyph name → index, or `undefined` where the table is missing or * states no names of its own (formats 1.0 and 3.0). */ export declare function postGlyphNames(program: Uint8Array): Map | undefined;