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

Function getFaceStretch

packages/core/src/utils/variable.ts:92–104  ·  view source on GitHub ↗
(
	axisKey: VariableAxisKey,
	variableConfig: VariableAxisConfig,
)

Source from the content-addressed store, hash-verified

90
91/** Return the published CSS `font-stretch` for one axis key variant. */
92export const getFaceStretch = (
93 axisKey: VariableAxisKey,
94 variableConfig: VariableAxisConfig,
95): string | null => {
96 const includesStretch =
97 axisKey === 'wdth' || axisKey === 'standard' || axisKey === 'full';
98
99 if (includesStretch && variableConfig.wdth) {
100 return formatStretchValue(variableConfig.wdth);
101 }
102
103 return null;
104};
105
106/** Filter a variable config to only the axes relevant to `axisKey`. */
107export const pickAxisConfig = (

Callers 2

buildFontFunction · 0.90
resolveFontFacesFunction · 0.90

Calls 1

formatStretchValueFunction · 0.90

Tested by

no test coverage detected