Conversation
|
It took me some time to be able to test this :). Should we include a variation with a font file in the "emptytheme" embedded in the Gutenberg plugin to make testing this easier in the future? Regardless, I'm noticing two bugs: I have a default theme.json without font family (default) and one variation with a font applied to the whole body.
(Testing in safari) |
|
This I'm also testing alongside the Twenty Twenty-Two style variations here: WordPress/wordpress-develop#2440 The former works just fine aside from the issues that @youknowriad noted above — I am able to reproduce those. But the Twenty Twenty-Two PR doesn't seem to load any fonts at all. 🤔 If someone could help gut check that for me, I'd appreciate it — I'm unclear if the problem is over on the Twenty Twenty-Two end or in this PR. |
Apparently I didn't test after rebasing the PR, and some things have changed 😅
After some debugging, I don't think this is a bug in this PR... "styles": {
"typography": {
"fontFamily": "sans-serif"
}
}If we want to change that behavior, it will need to be done in a separate PR since it's more generic and not related to the webfonts... it's an overrides/resets issue when a variation has something defined that doesn't exist in the main file. |
youknowriad
left a comment
There was a problem hiding this comment.
This is looking good to me. (I agree the reset bug is separate, I'll look into it).
Also cc @oandregal in case you want to take a look here.
What?
Fixes #39702
Registers webfonts defined in variations, as described in the issue.
Why?
This will allow defining webfonts in styles variations.
How?
Testing Instructions
Testing instructions available in #39702