You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When downloading a family that has an available variable font with the default settings, the whole variable font is downloaded (https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900)
When downloading a family that has an available variable font with the default settings, only the 400 weight should be downloaded (https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;1,400)
Yes, this has been the expected behavior, but we might need to re-think about the way to handle google's variable fonts instead of simply defaulting to the full-axis one. @danielroe what's your opinion on this?
🐛 The bug
When downloading a family that has an available variable font with the default settings, the whole variable font is downloaded (
https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900
)🛠️ To reproduce
https://stackblitz.com/edit/github-anxb2im8?file=index.js
🌈 Expected behaviour
When downloading a family that has an available variable font with the default settings, only the
400
weight should be downloaded (https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;1,400
)ℹ️ Additional context
I think the faulty logic lives here https://github.com/unjs/unifont/blob/main/src/providers/google.ts#L42, it should check the provided weights for
..
first. I'd be happy to submit a PRThe text was updated successfully, but these errors were encountered: