Skip to content

Local font asset files not loading in post Editor when metaboxes are enabled (i.e. Editor is not iframed) #51209

@ndiego

Description

@ndiego

Description

#51178 fixed a bug in 15.9 that prevented fonts included in themes to be loaded in the Editor, both post and Site Editor. This was due to a change in #50875.

While #51178 fixed the issue when the Editor is iframed, if a plugin registers metaboxes, the Editor is no longer iframed. As a result, the fonts are no longer loaded.

cc @hellofromtonya @ellatrix

Step-by-step reproduction instructions

  1. Using TT3, switch to the Block out style variation, which uses a custom heading font making it easy to see the difference.
  2. Install and activate Yoast, or another plugin that registers a metabox in the post Editor.
  3. Create a new page/post and add a few headings. See that the custom IBM Plex Mono font is not actually getting applied.
  4. Deactivate Yoast and see that the font is now applied.

Screenshots, screen recording, code snippet

With Yoast Active Without Yoast Active
with metaboxes without metaboxes

Environment info

  • WordPress 6.2
  • Gutenberg 15.9.1

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

Metadata

Metadata

Labels

[Feature] TypographyFont and typography-related issues and PRs[Type] BugAn existing feature does not function as intended[Type] RegressionRelated to a regression in the latest release

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions