create-block-theme
create-block-theme copied to clipboard
Saving Font Assets from native WP Font Management tooling
With the introduction of the Font Manager in WP 6.4 CBT should be able to work with that workflow to manage fonts.
Currently when installing fonts via that tool and then 'Saving' (or exporting) the theme via CBT the Font Face values are added to theme.json (as expected) but the font face resources are referenced from a remote location.
{
"fontFamily": "Jost",
"fontStyle": "normal",
"fontWeight": 500,
"src": "http://localhost:4759/wp-content/fonts/jost_normal_500.ttf"
}
To address this when a theme is saved (or exported) the Font Face files should be copied (moved?) to the theme's /assets/fonts/ folder and referenced from there.
Note: This would probably be addressed by fixing it in Gutenberg instead.