You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you create a style variation containing a font installed using the font library, the assets linked in the style variation JSON file link to the assets in the uploads folder; the font assets are not copied to the theme folder.
Expected
The font assets should be added to the theme folder.
The assets referenced in the style variation JSON should point to the theme assets.
I had to try quite a few things before landing on a scenario to recreate the issue.
Here are the steps:
With Gutenberg trunk plugin, Create Block Theme and Twenty Twenty-Four theme:
Visit Appearance > Create Block Theme and choose 'Create a Clone of "Twenty Twenty-Four"'
Open Site Editor (wp-admin/site-editor.php?canvas=edit), open global 'Styles' in sidebar > Typography > Manage Fonts to launch Font Library.
Select 'Install Fonts' tab, search and choose a new font to install, and 'Install' it.
Close the Font Library modal. At the bottom of the Typography section of Global Styles under Elements choose 'Headings' and assign your newly installed font as the default font for headings, and be sure to 'Save' your changes in the Site Editor.
Choose the Create Block Theme (🔧 wrench icon) menu > Create Theme Variation > give your variation a name and then 'Save Theme Variation'.
Open the newly created styles/whatever.json in your theme and you'll notice paths for your newly installed font are of the format: https://your-local.local/wp-content/uploads/fonts/K2FyfZJVlfNNSEBXGb7WCI6oBjLz.woff2, as opposed to file:./assets/fonts/K2FyfZJVlfNNSEBXGb7WCI6oBjLz.woff2
What?
If you create a style variation containing a font installed using the font library, the assets linked in the style variation JSON file link to the assets in the uploads folder; the font assets are not copied to the theme folder.
Expected
Example
Example of a current (wrong) style variation:
The text was updated successfully, but these errors were encountered: