WordPress / create-block-theme

A WordPress plugin to create block themes
https://wordpress.org/plugins/create-block-theme/
GNU General Public License v2.0
310 stars 44 forks source link

Installed font families are not downloaded to the theme folder when the option 'Clone theme' is used. #677

Closed matiasbenedetto closed 1 day ago

matiasbenedetto commented 2 days ago

What?

Installed font families are not downloaded to the theme folder when the option 'Clone theme' and after that changes are saved to the theme using Save Changes to the Theme` button.

This issue was found working on this: https://github.com/Automattic/themes/pull/7865

Step by step:

  1. Install a font face
  2. Clone the theme using these buttons: Create Theme -> Clone Theme.
  3. Save using Save Changes to the Theme button.

Problem explained technically:

When Clone Theme is used and there are custom fonts activated in the global styles, these fonts are added using an absolute link in the new theme.json created. When the changes are saved using Save Changes to the Theme those fonts are not processed (they are not downloaded and the link is not transformed to be relative to theme).

Expected result

The Clone Theme option probably should have the same options so the user can control if the fonts are processed when the theme is cloned.

image