Skip to content

Uploaded Fonts Are Not Reflected in Editor Canvas Immediately #58765

@okmttdhr

Description

@okmttdhr

Description

After uploading and activating new fonts through the Font Library modal in Gutenberg, changes are not immediately reflected in the editor's canvas. Specifically, when a new font is applied to a block, the canvas continues to display the default font until the browser tab is refreshed. It might be related to #58764.

Expected Behavior:
After a font is uploaded, activated, and applied to an element in Gutenberg, the canvas should immediately reflect this change without requiring a page refresh.

Actual Behavior:
The canvas does not update to show the newly applied font until after the browser tab where Gutenberg is open is refreshed.

Step-by-step reproduction instructions

  1. Download the "Super Enjoy" font from https://www.dafont.com/super-enjoy.font.
  2. Upload and activate the font in the Font Library modal.
  3. Apply the newly activated font to a heading block in the Gutenberg editor.
  4. Observe that the canvas does not update to show the new font; it continues to display the text in the default font.
  5. Refresh the browser tab.
  6. After refreshing, observe that the canvas now correctly displays the heading in the "Super Enjoy" font.

Screenshots, screen recording, code snippet

Screen.Recording.2024-02-07.at.15.44.17.mov

Environment info

Gutenberg > 17.6

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

Yes

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

No

Metadata

Metadata

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions