Skip to content
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

feat: support variable axis #141

Closed
wants to merge 5 commits into from
Closed

Conversation

qwerzl
Copy link
Member

@qwerzl qwerzl commented Apr 26, 2024

This PR adds support for variable font axis. It's quite sad that AFAIK only Google provides this level of configuration.

@qwerzl qwerzl requested a review from danielroe April 26, 2024 14:03
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Apr 26, 2024
@dosubot dosubot bot added the enhancement New feature or request label Apr 26, 2024
@qwerzl qwerzl marked this pull request as draft April 27, 2024 22:27
@codecov-commenter
Copy link

codecov-commenter commented Apr 27, 2024

Codecov Report

Attention: Patch coverage is 82.50000% with 14 lines in your changes missing coverage. Please review.

Project coverage is 45.91%. Comparing base (d83aa0d) to head (98d3697).

Files Patch % Lines
playground/pages/providers/google.vue 0.00% 11 Missing ⚠️
src/module.ts 50.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #141      +/-   ##
==========================================
+ Coverage   45.25%   45.91%   +0.65%     
==========================================
  Files          56       56              
  Lines        3964     4036      +72     
  Branches      429      450      +21     
==========================================
+ Hits         1794     1853      +59     
- Misses       2130     2145      +15     
+ Partials       40       38       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@qwerzl qwerzl marked this pull request as ready for review April 28, 2024 00:55
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Apr 28, 2024
@qwerzl
Copy link
Member Author

qwerzl commented Apr 28, 2024

Hi @danielroe, the type issues are fixed and I've added tests for Recursive. Sorry I didn't see the failed checks yesterday so it took some time.

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.

Rather than creating a new property (variableAxis) I think we ought to try to use font-variation-settings/variationSettings which could take a string or an object of dimension/value.

We could then use this to render both the font-face and also detect the required variations from CSS directly rather than require it to be configured.

@qwerzl
Copy link
Member Author

qwerzl commented May 3, 2024

@danielroe I've also thought about this, but I'm not sure whether font-variation-settings allows a range of values.

@qwerzl
Copy link
Member Author

qwerzl commented Oct 5, 2024

Now that unifont is released, I think this PR should be closed.

For fine-grained variable axis control of providers other than google, I'm thinking about a variable axis subsetter built into unifont once klippa supports it.

@qwerzl qwerzl closed this Oct 5, 2024
@danielroe
Copy link
Member

we could also open again on unifont - for nuxt/fonts i wanted to think if there was a way to make this zero config but i know it’s taken too long 🙈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants