(value: StyleValue | number)
| 3 | |
| 4 | /** Read a numeric style value from static or variable Glypht output. */ |
| 5 | export const extractStyleValue = (value: StyleValue | number): number => { |
| 6 | if (typeof value === 'number') { |
| 7 | return value; |
| 8 | } |
| 9 | |
| 10 | if (value.type === 'single') { |
| 11 | return value.value; |
| 12 | } |
| 13 | |
| 14 | return value.value.defaultValue; |
| 15 | }; |
| 16 | |
| 17 | export const formatAxisValue = (axis: VariableFontAxis): string => |
| 18 | String(axis.min) === String(axis.max) |
no outgoing calls
no test coverage detected