Load fonts in your app
Fonts are your host page’s responsibility.@font-face, a hosted stylesheet, or a font CDN: anything the browser can resolve.
Register fonts in the toolbar
The toolbar’s font dropdown shows whatever you register inmodules.toolbar.fonts. Each entry is a { label, key } pair where key is the CSS font-family value:
@font-face (or equivalent) on your host page.
Programmatic font changes
For AI agents or scripts setting a brand font:Common pitfalls
- Font name preserved, browser falls back. The font name from the DOCX is intact, but the actual file isn’t loaded. Add
@font-face. - Dropdown doesn’t show a font. Imported documents don’t auto-populate the toolbar list. If a
.docxuses Cambria but Cambria isn’t infonts, the user can’t pick it from the dropdown: even though the current selection indicator may show “Cambria” if that’s what the run uses. - Office font licensing. Calibri, Cambria, and Aptos are licensed Microsoft fonts. Self-hosting requires a license. Free substitutes are common in non-pixel-perfect contexts.
Where to next
- Built-in UI > Toolbar: full toolbar font configuration options
- Document API > Available operations: programmatic font formatting
- Editor > Theming: set the default font for SuperDoc’s UI chrome

