-
Notifications
You must be signed in to change notification settings - Fork 358
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
Archeo: Add fonts to theme.json #5609
Conversation
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.
Thanks for doing this! This seems to work great for me, all the fonts load as they did before. The only difference I could see was that the main font files are no longer preloaded, so I think we should keep that function as you mentioned.
We should hold off on merging this until it makes it to dotcom, right? |
Yes I think so, it looks like it'll be included in GB 12.8. |
We should do this to Stewart, Livro and Remote too |
Done |
Do you think we should be preloading fonts? This comment is very interesting. Maybe we just need to change font-display to 'block'? See https://css-tricks.com/almanac/properties/f/font-display/ |
Makes sense to me, if CSS already has that option |
I added a commit to remove the code that preloads fonts. Instead we can use |
I think we can bring this in now. I tested on my sandbox and it's working, someone else have a look and then we can merge, please? |
Tested across all affected themes and the fonts are loading as expected. |
Do not merge until GB 12.8 is on wpcom
Changes proposed in this Pull Request:
This moves the font definitions to the theme.json file. This was made possible because WordPress/gutenberg#37140 was merged.
To test check that the font loads as before.
I'm not sure if we can also remove the pre-loading script.
Related issue(s):
WordPress/gutenberg#37140