MCPcopy Create free account
hub / github.com/fontsource/fontsource / generateCSSAssets

Function generateCSSAssets

packages/core/src/css/index.ts:16–26  ·  view source on GitHub ↗
(
	config: FontConfig,
	options: CSSOptions = {},
)

Source from the content-addressed store, hash-verified

14 * all necessary variations of CSS files, for example `latin.css`, `400.css`, and `index.css`.
15 */
16const generateCSSAssets = (
17 config: FontConfig,
18 options: CSSOptions = {},
19): CSSAsset[] => {
20 // Expand config once, then reuse the face-based pipeline.
21 const faces = resolveFontFaces(config, options);
22 return generateFaceCSSAssets(config.family, faces, {
23 ...options,
24 variable: config.variable,
25 });
26};
27
28/**
29 * Generate one stylesheet from a config..

Callers 1

css.test.tsFile · 0.90

Calls 2

resolveFontFacesFunction · 0.90
generateFaceCSSAssetsFunction · 0.90

Tested by

no test coverage detected