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

Function getVariableWght

packages/generate/src/utils.ts:4–10  ·  view source on GitHub ↗
(axes?: Axes)

Source from the content-addressed store, hash-verified

2
3// Find the lowest and highest value in a weight array
4export const getVariableWght = (axes?: Axes) => {
5 if (!axes) return '400';
6
7 if (axes.min === axes.max) return `${axes.min}`;
8
9 return `${axes.min} ${axes.max}`;
10};

Callers 1

generateFontFaceFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected