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

Fonts defined in theme.json are loaded in frontend, but not in editor (and admin area) #52252

Closed
xoex opened this issue Jul 3, 2023 · 5 comments

Comments

@xoex
Copy link

xoex commented Jul 3, 2023

Description

I defined a weighted font (.woff) in theme.json and it loads and works in frontend.
Previously it worked in admin area too, for example in block editor.
I also defined a css so admin navigation menu used this font too.

But in recent gutenberg updates (I don't know exact version but it should be recent like 16) suddenly it doesn't add font styles when in admin area.
I debugged and WP_Fonts_Provider::print_styles() never run in admin.

Step-by-step reproduction instructions

  1. define fonts in theme.json
  2. doesn't show up in editor

Screenshots, screen recording, code snippet

No response

Environment info

Astra theme

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

@annezazu
Copy link
Contributor

annezazu commented Jul 3, 2023

Seems like this relates to the following: #51770 (comment) @ndiego thoughts?

@ndiego
Copy link
Member

ndiego commented Jul 3, 2023

@xoex can you share some more details about your setup? Which version of Gutenberg and/or WordPress are you running? Also are there any metaboxes present in the post Editor? Thanks, this will help us diagnose the issue further.

@xoex
Copy link
Author

xoex commented Jul 4, 2023

@xoex can you share some more details about your setup? Which version of Gutenberg and/or WordPress are you running? Also are there any metaboxes present in the post Editor? Thanks, this will help us diagnose the issue further.

Gutenberg 16.1.1
Wordpress 6.2.2

Seems like this relates to the following: #51770 (comment) @ndiego thoughts?

Yes it's exactly related to this problem, I had cusotm fields enabled and fonts didn't loaded. I disabled custom fields and when no metaboxes exists, fonts became visible in editor.
But fonts are not still loaded in admin area (not editor)

@annezazu
Copy link
Contributor

annezazu commented Jul 4, 2023

Thanks for confirming. I'm going to close this out as a result and let's defer to the main issue referenced above to track this! It's an important issue to solve for 6.3.

@annezazu annezazu closed this as completed Jul 4, 2023
@hellofromtonya
Copy link
Contributor

hellofromtonya commented Jul 5, 2023

The issue is reported in #51209.

The new Font Face PR referenced in comments above is unrelated as it has not been merged or shipped yet.

Let's move the discussion, investigation, and resolution to #51209.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants