( axisKey: VariableAxisKey, variableConfig: VariableAxisConfig, )
| 90 | |
| 91 | /** Return the published CSS `font-stretch` for one axis key variant. */ |
| 92 | export 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`. */ |
| 107 | export const pickAxisConfig = ( |
no test coverage detected