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