import { type FontInfo, type FontType, type ShxFontData, ShxParserFont } from '@mlightcad/mtext-renderer'; export type { FontInfo, FontType, ShxFontData } from '@mlightcad/mtext-renderer'; export { ShxParserFont } from '@mlightcad/mtext-renderer'; /** * Font helpers for MTEXT and UI (character map, ribbon): wraps the shared * {@link FontManager} cache, SHX parsing ({@link ShxParserFont}), and drawing * font catalog ({@link AcApDocManager}). * * @remarks * Keeps UI packages off direct `@mlightcad/mtext-renderer` imports while using * the same global font pipeline as rendering. */ export declare class AcApFontUtil { /** * @inheritdoc FontManager.isFontLoaded */ static isFontLoaded(fontName: string): boolean; /** * @inheritdoc FontManager.getFontType */ static getFontType(fontName: string): FontType | undefined; /** * Sorted SHX glyph indices present in the loaded font payload. * * @param fontName - Name as registered in the font manager after load. * @returns Code list, or empty when the font is missing or not SHX. */ static getShxCodePoints(fontName: string): number[]; /** * Raw SHX font data for UI previews (e.g. character map SVG). * * @param fontName - Name as registered in {@link FontManager}. * @returns Parsed SHX payload, or `undefined` if unavailable or not SHX. */ static getLoadedShxFontData(fontName: string): ShxFontData | undefined; /** * Creates a SHX parser for inline SVG glyph previews. * * @param data - Parsed SHX payload from {@link getLoadedShxFontData}. */ static createShxParserFont(data: ShxFontData): ShxParserFont; /** * Looks up {@link FontInfo} for a display name against the drawing’s available-font * catalog ({@link AcApDocManager.instance.avaiableFonts}). * * @remarks * Matching is case-insensitive; the first catalog entry whose `name` array * contains a trimmed, case-insensitive match wins. */ static findFontInfoByName(fontName: string): FontInfo | undefined; /** * Declared font engine kind from the CAD font catalog only (before or after load). * * @remarks * Use when {@link AcApFontUtil} has not yet loaded the font: the catalog still * knows `shx` vs `mesh`. After load, {@link getFontType} is authoritative. */ static getCatalogFontType(fontName: string): 'shx' | 'mesh' | undefined; /** * Loads a font through the same pipeline as MTEXT rendering so binaries are cached * and SHX glyph tables are available. * * @remarks * No-ops when there is no {@link AcApDocManager.instance} or the font is already * loaded. Delegates to {@link AcApDocManager.loadFonts}. */ static ensureDrawingFontLoaded(fontName: string): Promise; } //# sourceMappingURL=AcApFontUtil.d.ts.map