-
-
Notifications
You must be signed in to change notification settings - Fork 943
fix(preset-web-fonts): support width axis and single axis config for google provider #4878
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
Conversation
✅ Deploy Preview for unocss ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
commit: |
Co-authored-by: Chris <[email protected]>
Co-authored-by: Copilot <[email protected]>
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.
Pull Request Overview
This PR adds support for the font width axis and single axis configuration for the Google Fonts provider. It refactors the Google Fonts URL generation to handle multiple font axes (italic, width, weight) in the correct alphabetical order as required by the Google Fonts API.
- Adds width axis support to the WebFontMeta interface
- Refactors Google provider to use a more flexible axis-based approach
- Consolidates CoolLabs provider to use the same Google-compatible implementation
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages-presets/preset-web-fonts/src/types.ts | Adds width property to WebFontMeta interface for font width axis support |
| packages-presets/preset-web-fonts/src/providers/google.ts | Refactors URL generation to support multiple font axes with proper alphabetical ordering |
| packages-presets/preset-web-fonts/src/providers/coollabs.ts | Replaces duplicate implementation with reuse of Google-compatible provider |
| test/preset-web-fonts.test.ts | Updates test to verify width axis support in generated font URLs |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
fix: #4876