(font: string)
| 6 | * 检查字体是否存在,这里主要是为了加缓存和 warning |
| 7 | */ |
| 8 | export function checkFont(font: string) { |
| 9 | if (FontAvailableCache.has(font)) { |
| 10 | return FontAvailableCache.get(font); |
| 11 | } |
| 12 | const result = isFontAvailable(font); |
| 13 | FontAvailableCache.set(font, result); |
| 14 | return result; |
| 15 | } |
| 16 | |
| 17 | /** |
| 18 | * 获取所有不可用的字体 |
no test coverage detected