Relative Content

Tag Archive for wordpressfontsthemesgoogle-fonts

Activate fonts programmatically

Adding fonts via theme.json adds them to the library, but they are inactive (so they do not appear in the block editor properties). How can I activate them programmatically?

Adding font (theme.json) is not active

I try to add a new font using theme.json but it does not show in the gutenberg editor.
I understood that you don’t need to enqueue the font when you add it to the theme.json but it does not seem to work.
This is the part of my theme.json concerning the font
I tried both using the external source as source with https://fonts.gstatic.com/s/rubik/v28/iJWKBXyIfDnIV7nBrXw.woff2 but also downloaded the woff2 file in the theme/fonts folder, neither works. What am I missing?