fix(fontless): skip non-optimial fonts by google provider#660
fix(fontless): skip non-optimial fonts by google provider#660
Conversation
❌ Deploy Preview for fontless failed.
|
commit: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #660 +/- ##
==========================================
- Coverage 53.40% 52.75% -0.65%
==========================================
Files 11 11
Lines 734 743 +9
Branches 93 93
==========================================
Hits 392 392
- Misses 342 351 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
danielroe
left a comment
There was a problem hiding this comment.
I'm not sure about doing this by default. What about browsers that don't support woff2? (admittedly few)
I think we can add experimental option to control this, but comparing Vite's default browser compatibility https://vite.dev/guide/build.html#browser-compatibility, woff2 support is expected, so can the default be still woff2 only? (i.e. we can assume the 1st user agent of unifont request https://github.com/unjs/unifont/blob/782fab5d03f162b866670c21034965941e8a2969/src/providers/google.ts#L76-L77) |
…_font_for_old_browser
|
Probably experimental option on fontless side is odd. We might need unifont google provider's experimental option to skip the fonts from 2nd user agent. EDIT: made a PR on unifont unjs/unifont#254 |
|
resolved in 67d5c54 |
woff2formats withoutwoff#659