Skip to content

Conversation

hi-ogawa
Copy link
Collaborator

Copy link

netlify bot commented Sep 28, 2025

Deploy Preview for fontless failed.

Name Link
🔨 Latest commit 281a685
🔍 Latest deploy log https://app.netlify.com/projects/fontless/deploys/68db372bb4481c00088d8402

@hi-ogawa hi-ogawa changed the title feat(fontless): ability to remove google font for old browser feat(fontless): ability to skip non-optimial fonts by google provider Sep 28, 2025
Copy link

pkg-pr-new bot commented Sep 28, 2025

Open in StackBlitz

npm i https://pkg.pr.new/fontaine@660
npm i https://pkg.pr.new/fontless@660

commit: 281a685

Copy link

codecov bot commented Sep 28, 2025

Codecov Report

❌ Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.75%. Comparing base (d66809d) to head (281a685).

Files with missing lines Patch % Lines
packages/fontless/src/resolve.ts 0.00% 9 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hi-ogawa hi-ogawa changed the title feat(fontless): ability to skip non-optimial fonts by google provider feat(fontless): skip non-optimial fonts by google provider Sep 28, 2025
@hi-ogawa hi-ogawa changed the title feat(fontless): skip non-optimial fonts by google provider fix(fontless): skip non-optimial fonts by google provider Sep 28, 2025
@hi-ogawa hi-ogawa marked this pull request as ready for review September 28, 2025 09:54
@hi-ogawa hi-ogawa requested a review from danielroe as a code owner September 28, 2025 09:54
Copy link
Member

@danielroe danielroe left a 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)

@hi-ogawa
Copy link
Collaborator Author

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)

@hi-ogawa
Copy link
Collaborator Author

hi-ogawa commented Sep 30, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fontless] support generating only woff2 formats without woff

3 participants