/** * Icon font generator using modern stream/conversion toolchain. * Supports woff2, woff, ttf, svg, eot formats with stable codepoints. */ import type { FontFormat } from "../types/config.js"; export interface IconFontInput { name: string; svgPath: string; } export interface GenerateFontOptions { fontName: string; outputDir: string; icons: IconFontInput[]; formats: FontFormat; engine?: "webfonts-generator" | "advanced"; existingCodepoints?: CodepointsMap; } export interface CodepointsMap { [iconName: string]: number; } export interface GlyphInfo { name: string; codepoint: string; unicode: string; } export declare class FontGenerator { private readonly startCodepoint; private woff2InitPromise; /** * Generate icon font with all formats and preview */ generateFont(options: GenerateFontOptions): Promise; /** * Assign stable codepoints to icons */ private assignCodepoints; /** * Build SVG font from input glyph files. */ private buildSvgFont; /** * Write requested font formats to output directory. */ private writeRequestedFormats; private bufferToArrayBuffer; private toBuffer; private deflateForFontEditor; private validateEngine; private ensureWoff2Ready; private generateStylesheet; /** * Generate HTML preview with copy functionality */ private generatePreview; }