API Referencev1.0.2
@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)
fn
packages/core/src/utils/fontOptions.ts:21normalizeFontFamilies
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)
interface
packages/core/src/utils/fontOptions.ts:9FontOption
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| Member | Type | Summary |
|---|---|---|
| category? | 'sans-serif' | 'serif' | 'monospace' | 'other' | |
| fontFamily | string | |
| name | string |