theme-fonts.ts#
6 documented symbols. Read the signatures first, then expand each item for parameters, return types, and examples.
6
symbols
4
functions
1
interfaces
1
modules
4
parameters
11
members
4
returns
Reference#
fncssFamilyName(family: string): stringCSS font-family identifier; quotes names that are not a single ident.
CSS font-family identifier; quotes names that are not a single ident.
Signature
export function cssFamilyName(family: string): stringParameters
-
familystring
Returns
string
fnflattenThemeFonts(fonts: ThemeFontsLike): { sans?: string; mono?: string } | undefinedFlatten object fonts so JsThemeFonts stays { sans?: string; mono?: string }.
Flatten object fonts so JsThemeFonts stays { sans?: string; mono?: string }.
Signature
export function flattenThemeFonts(fonts: ThemeFontsLike): { sans?: string; mono?: string } | undefinedParameters
-
fontsThemeFontsLike
Returns
{ sans?: string; mono?: string } | undefined
fnnamedFontVarsCss(fonts: ThemeFontsLike): stringExtra --octc-font-* variables for fonts.named. Roles stay in Rust theme CSS.
Extra --octc-font-* variables for fonts.named. Roles stay in Rust theme CSS.
Signature
export function namedFontVarsCss(fonts: ThemeFontsLike): stringParameters
-
fontsThemeFontsLike
Returns
string
moduletheme-fontsOpt-in web-font objects for theme.fonts, plus SSG self-host emission. NAPI still receives flattened CSS stacks (JsTheme…
Opt-in web-font objects for theme.fonts, plus SSG self-host emission.
NAPI still receives flattened CSS stacks (JsThemeFonts). File acquisition and @font-face generation stay in TypeScript so other PRs can keep landing NAPI theme-type changes independently.
interfaceThemeWebFontUnoCSS-inspired family descriptor. The string stack form remains valid.
UnoCSS-inspired family descriptor. The string stack form remains valid.
Signature
export interface ThemeWebFontMembers
Properties
| Name | Type | Description |
|---|---|---|
displayoptional |
ThemeFontDisplay |
|
fallbacksoptional |
string[] |
Extra families after family in the emitted CSS stack. |
family |
string |
Family name, e.g. "Inter" or "DM Mono". |
pathoptional |
string |
File, directory, or @fontsource/* package. Required for local. |
preloadoptional |
boolean | number[] |
Preload every self-hosted face, or only these weights. |
provideroptional |
ThemeFontProvider |
Defaults to "local" when path is set, otherwise "google". |
selfHostoptional |
boolean |
Copy files into the SSG output and emit @font-face. |
stylesoptional |
ThemeFontStyle[] |
|
subsetsoptional |
string[] |
|
unicodeRangeoptional |
string |
Optional unicode-range for local faces. |
weightsoptional |
number[] |
fnwriteSelfHostedThemeFonts(options: WriteThemeFontsOptions): Promise<string[]>Copy self-hosted faces into outDir and write @font-face CSS.
Copy self-hosted faces into outDir and write @font-face CSS.
Signature
export async function writeSelfHostedThemeFonts(options: WriteThemeFontsOptions): Promise<string[]>Parameters
-
optionsWriteThemeFontsOptions
Returns
Promise<string[]>