StaticcacheParses a user-uploaded font file, registers it for rendering, and stores it in IndexedDB when font caching is enabled.
Supported formats: .shx, .ttf, .otf, .woff.
Font file contents or a browser File selected by the user
OptionalfileName: stringFont file name when data is an ArrayBuffer
Optionalaliases: string[]Optional alias names (e.g. missed drawing font names)
Optionalencoding: stringOptional character encoding for SHX bigfonts
StaticcreateCreates a SHX parser for inline SVG glyph previews.
Parsed SHX payload from getLoadedShxFontData.
StaticensureLoads a font through the same pipeline as MTEXT rendering so binaries are cached and SHX glyph tables are available.
No-ops when there is no AcApDocManager.instance or the font is already loaded. Delegates to AcApDocManager.loadFonts.
StaticfindLooks up FontInfo for a display name against the drawing’s available-font catalog (AcApDocManager.instance.avaiableFonts).
StaticgetDeclared font engine kind from the CAD font catalog only (before or after load).
Use when AcApFontUtil has not yet loaded the font: the catalog still
knows shx vs mesh. After load, getFontType is authoritative.
StaticgetStaticgetRaw SHX font data for UI previews (e.g. character map SVG).
Name as registered in FontManager.
Parsed SHX payload, or undefined if unavailable or not SHX.
StaticgetFont name used at render time when the requested font is missing.
Checks user FontManager.setFontMapping | font mapping first, then falls back to FontManager.defaultFonts.
Original font name referenced by the drawing.
The loaded font name if available; otherwise the mapped or default replacement.
StaticgetSorted SHX glyph indices present in the loaded font payload.
Name as registered in the font manager after load.
Code list, or empty when the font is missing or not SHX.
Staticis
Font helpers for MTEXT and UI (character map, ribbon): wraps the shared FontManager cache, SHX parsing (ShxParserFont), and drawing font catalog (AcApDocManager).
Remarks
Keeps UI packages off direct
@mlightcad/mtext-rendererimports while using the same global font pipeline as rendering.