Skip to content

Conversation

@Jungzl
Copy link
Contributor

@Jungzl Jungzl commented Aug 13, 2025

fix: #4876

@Jungzl Jungzl requested review from antfu and zyyv as code owners August 13, 2025 03:41
@netlify
Copy link

netlify bot commented Aug 13, 2025

Deploy Preview for unocss ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 378c908
🔍 Latest deploy log https://app.netlify.com/projects/unocss/deploys/689c33a57cebf300086ce24b
😎 Deploy Preview https://deploy-preview-4878--unocss.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Aug 13, 2025

Open in StackBlitz

commit: 378c908

@zyyv zyyv requested a review from Copilot August 13, 2025 06:20

This comment was marked as outdated.

@Jungzl Jungzl requested a review from Copilot August 13, 2025 06:34
Copy link
Contributor

Copilot AI left a 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.

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.

[presetWebFonts] italic: true without weights misses the italic variant on Google Fonts

2 participants