MCPcopy Index your code
hub / github.com/fontsource/fontsource / formatStyle

Function formatStyle

packages/core/src/utils/style.ts:25–31  ·  view source on GitHub ↗
(style: FontStyle)

Source from the content-addressed store, hash-verified

23 * Fontsource-style published assets collapse oblique faces into `italic`.
24 */
25export const formatStyle = (style: FontStyle): 'normal' | 'italic' => {
26 if (style === 'normal' || style === 'italic') {
27 return style;
28 }
29
30 return 'italic';
31};
32
33export const formatStretchValue = (axis: VariableFontAxis): string =>
34 String(axis.min) === String(axis.max)

Callers 4

generateStaticFilenameFunction · 0.90
generateVariableFilenameFunction · 0.90
getCSSFilesFunction · 0.90
getFaceCommentFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected