Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deactivating a theme font removes it from the Font Library #60392

Open
creativecoder opened this issue Apr 2, 2024 · 2 comments
Open

Deactivating a theme font removes it from the Font Library #60392

creativecoder opened this issue Apr 2, 2024 · 2 comments
Labels
[Feature] Font Library [Type] Bug An existing feature does not function as intended

Comments

@creativecoder
Copy link
Contributor

Description

After de-activating a theme font variant (font face), it no longer appears in the Font Library modal.

Step-by-step reproduction instructions

Using the TT4 theme

  • In the Site editor, open the Font Library modal, and click on one of the "Theme Fonts" in the list of fonts.
  • Uncheck one of the variants, and click "Update"
  • Close the modal and open it again, returning the same font
  • The font you unchecked is no longer in the list of font variants
  • If the theme font only has one variant and you uncheck it, the font is no longer in the Theme Fonts list

Screenshots, screen recording, code snippet

Screen.Recording.2024-04-02.at.13.46.50.mov

Environment info

  • WP: 6.6-alpha-57778-src, Gutenberg: 18.0.0, TT4
  • Firefox
  • Desktop w/ macOS

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@creativecoder creativecoder added [Type] Bug An existing feature does not function as intended [Feature] Font Library labels Apr 2, 2024
@t-hamano
Copy link
Contributor

t-hamano commented Apr 3, 2024

I was able to reproduce it on WordPress 6.5 without the Gutenberg plugin enabled.

Also, I noticed the following:

  • Once I disable all variations of that theme font, all variations will be displayed again.
  • Does not occur with Google fonts
a286e0cfe47cfae3d90c5d17e1b44afe.mp4

@matiasbenedetto
Copy link
Contributor

This behavior is forced by the fact that we can't easily know which are the base fonts when a theme style variation is added to the global styles. When a theme style variation is added to the Global Styles, the 'base' theme fonts coming from the theme.json file are no longer relevant, but we can't use the style variation as 'base' because there's no indication of which the theme variant active is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Font Library [Type] Bug An existing feature does not function as intended
Projects
Status: 🗣️ In Discussion / Needs Decision
Development

No branches or pull requests

3 participants