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

Function generateCSS

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

Source from the content-addressed store, hash-verified

33 * one combined stylesheet.
34 */
35const generateCSS = (config: FontConfig, options: CSSOptions = {}): string =>
36 resolveFontFaces(config, options)
37 .map((face) => renderFontFace(face, config.family, options))
38 .join('\n\n');
39
40export { generateCSS, generateCSSAssets, type UrlResolver };

Callers 4

css.test.tsFile · 0.90
buildStaticPreviewCSSFunction · 0.90
buildVariablePreviewCSSFunction · 0.90
loaderFunction · 0.90

Calls 2

resolveFontFacesFunction · 0.90
renderFontFaceFunction · 0.90

Tested by

no test coverage detected