@eigenpal/docx-editor-core/utils/fontOptions

Shared FontOption shape + normaliser used by FontPicker components in both adapters. Lifted from packages/react/src/components/ui/ normalizeFontFamilies.ts so the type definition has a single home.

Functions (1)

normalizeFontFamiliesfunctionSource ↗

Normalize a fontFamilies prop (mix of strings and FontOption objects) into a uniform FontOption[]. Returns undefined for undefined input so callers fall back to their built-in defaults. Strings expand into the 'other' group with no CSS fallback chain.

declare function normalizeFontFamilies(fontFamilies: ReadonlyArray<string | FontOption> | undefined): FontOption[] | undefined;

Interfaces (1)

FontOptioninterfaceSource ↗

Shared FontOption shape + normaliser used by FontPicker components in both adapters. Lifted from packages/react/src/components/ui/ normalizeFontFamilies.ts so the type definition has a single home.

interface FontOption
MemberTypeSummary
category?'sans-serif' | 'serif' | 'monospace' | 'other'
fontFamilystring
namestring

On this page