-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Register webfonts from theme.json #35625
Conversation
f65e3a5
to
667751e
Compare
667751e
to
c19d647
Compare
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.
I left a comment related to the API here #35591 (comment).
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.
The logic seems to be the expected one and things seem to be on a good path. I have the opinion that we should not have a separate webfont key but instead nest things inside the fontFamilies. It is not a big change. In the future, we should look into providing this information to the editor so the editor knows which styles and weights are available for a font family. Without this connection, themes may select only some weights for a font in theme.json but users can still pick any so it seems like the weights are not used.
c19d647
to
45e9028
Compare
* POC: Register webfonts from theme.json * Early exit if function doesn't exist * Implement relative URLs
* POC: Register webfonts from theme.json * Early exit if function doesn't exist * Implement relative URLs
* POC: Register webfonts from theme.json * Early exit if function doesn't exist * Implement relative URLs
* POC: Register webfonts from theme.json * Early exit if function doesn't exist * Implement relative URLs
* POC: Register webfonts from theme.json * Early exit if function doesn't exist * Implement relative URLs
* POC: Register webfonts from theme.json * Early exit if function doesn't exist * Implement relative URLs
* POC: Register webfonts from theme.json * Early exit if function doesn't exist * Implement relative URLs
* POC: Register webfonts from theme.json * Early exit if function doesn't exist * Implement relative URLs
* POC: Register webfonts from theme.json * Early exit if function doesn't exist * Implement relative URLs
* POC: Register webfonts from theme.json * Early exit if function doesn't exist * Implement relative URLs
Description
This is a proof of concept for the discussion on #35591
To test:
theme.json
file add the following undersettings.typography
:Easiest way to test is using the TT2 theme from https://github.com/aristath/twentytwentytwo
Checklist:
*.native.js
files for terms that need renaming or removal).