( axisKey: VariableAxisKey, style: FontStyle, variableConfig: VariableAxisConfig, )
| 74 | |
| 75 | /** Return the published CSS `font-style` for one axis key variant. */ |
| 76 | export const getFaceStyle = ( |
| 77 | axisKey: VariableAxisKey, |
| 78 | style: FontStyle, |
| 79 | variableConfig: VariableAxisConfig, |
| 80 | ): FontStyle => { |
| 81 | const includesSlant = |
| 82 | axisKey === 'slnt' || axisKey === 'standard' || axisKey === 'full'; |
| 83 | |
| 84 | if (includesSlant && variableConfig.slnt) { |
| 85 | return `oblique ${formatSlantValue(variableConfig.slnt)}` as FontStyle; |
| 86 | } |
| 87 | |
| 88 | return style; |
| 89 | }; |
| 90 | |
| 91 | /** Return the published CSS `font-stretch` for one axis key variant. */ |
| 92 | export const getFaceStretch = ( |
no test coverage detected