import { type Font } from './font.ts'; import { CmapTableBuilder } from './tables/cmap.ts'; export type SubsetOptions = { /** * Whether font hinting instructions should be preserved. * Default is false, meaning hinting instructions will be removed to * reduce font size. */ keepHinting: boolean; }; /** * The result of subsetting a font. */ export type SubsetResult = { /** The subset font data. */ fontData: Uint8Array; /** Maps original glyph IDs to their new IDs in the subset font. */ glyphIdMapping: ReadonlyMap; }; /** * Creates a subset of the given font containing only the specified glyphs. * * The resulting font will include glyph ID 0 (.notdef) automatically, plus * all glyphs referenced by composite glyphs in the subset. * * @param font The font to subset * @param glyphIds The glyph IDs to include in the subset */ export declare function createSubset(font: Font, glyphIds: number[], options?: SubsetOptions): SubsetResult; /** * Creates a subset cmap table containing only the specified mappings. */ export declare function subsetCmapTable(codePointToGlyphId: Map): CmapTableBuilder;