Archeo: Add fonts to theme.json#5609
Conversation
mikachan
left a comment
There was a problem hiding this comment.
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