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
Add createFontStack
for metrics-based font fallbacks
#117
Conversation
🦋 Changeset detectedLatest commit: 14d3086 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Really excited for this work to finally get published! 👏👏👏
Just a few nitpicky comments from me 🏃♂️
Really hyped about this one, can we help in any way? I'd like to try and test this |
Apologies for the festive season delays on this one 😄. Hoping to get it through soon. The full benefit will be had in tandem with the update to the FWIW, there is a snapshot deployment of this PR you can take for a spin: npm install @capsizecss/core@0.0.0-create-font-stack-20221130045640 To test out the fallbacks with the npm install @capsizecss/metrics@0.0.0-x-width-avg-20230123213508 |
Creates metrics-based
@font-face
declarations to improve the alignment of font family fallbacks, which can dramatically improve the Cumulative Layout Shift metric for sites that depend on a web font.Example usage
The returned values are the computed font family and the generated font face declarations: