(font: RequiredFontMetrics)
| 13 | type RequiredFontMetrics = Pick<Font, 'ascent' | 'descent' | 'lineGap' | 'unitsPerEm' | 'xWidthAvg'> & { category?: string } |
| 14 | |
| 15 | function filterRequiredMetrics(font: RequiredFontMetrics): FontFaceMetrics { |
| 16 | return { |
| 17 | ascent: font.ascent, |
| 18 | descent: font.descent, |
| 19 | lineGap: font.lineGap, |
| 20 | unitsPerEm: font.unitsPerEm, |
| 21 | xWidthAvg: font.xWidthAvg, |
| 22 | category: font.category, |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | /** |
| 27 | * Retrieves the font metrics for a given font family from the metrics collection. Uses caching to avoid redundant calculations. |
no outgoing calls
no test coverage detected