-
-
Notifications
You must be signed in to change notification settings - Fork 41
fix(fontless): skip non-optimial fonts by google provider #660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
woff2
formats withoutwoff
#659