Make WordPress Core

Opened 11 months ago

Closed 11 months ago

Last modified 9 months ago

#59863 closed defect (bug) (reported-upstream)

Hundreds of fonts loaded via wp-fonts-local on front-end and dashboard

Reported by: rghedin's profile rghedin Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.4
Component: General Keywords: close
Focuses: Cc:

Description

After upgrading to 6.4 (issue remains in 6.4.1), my site started loading tons (+600) fonts on both front-end and admin dashboard.

They are loaded on <head>, via an inline style tag with wp-fonts-local class, summoning fonts with @font-face.

I switched themes and the issue remains regardless.

Was able to avoid loading all these fonts with this code in functions.php:

remove_action( 'wp_head', 'wp_print_font_faces', 50 );

It's possible to witness it right now in my staging site: https://staging-02d9-rghedin.wpcomstaging.com

Change History (6)

#1 @rajinsharwar
11 months ago

Thanks for your ticket @rghedin. This was introduced in: https://core.trac.wordpress.org/ticket/59165

As per the ticket, "Once called, it gets the fonts from Theme_JSON merged data layer, which includes theme defined fonts and user activated fonts (once the Font Library #59166 is introduced into Core)."

Maybe @hellofromTonya can add more context here, but seemingly it's an intentional behavior.

#2 @jorbin
11 months ago

  • Keywords reporter-feedback added

Welcome to trac @rghedin.

When I checked this with twentytwentyfour, it loads 4 fonts, not hundreds. Looking through the code of the font loader, this is based off global settings which are largely a result of the theme.json.

You mention having tried this on multiple themes, can you link the theme.json for each of these? Do you have any plugins that would be modifying it?

#3 @rghedin
11 months ago

Sure, @jorbin

Here's from TT4: https://staging-02d9-rghedin.wpcomstaging.com/wp-content/themes/twentytwentyfour/theme.json

Here's from my custom theme (per theme.json, it shouldn't load any font whatsoever): https://staging-02d9-rghedin.wpcomstaging.com/wp-content/themes/dez/theme.json

I'm afraid this may be an issue specific of wordpress.com, though.

#5 in reply to: ↑ 4 @jeherve
11 months ago

  • Keywords close added; reporter-feedback removed
  • Resolution set to reported-upstream
  • Status changed from new to closed

Replying to skithund:

Looking at the font list, it might be Jetpack.

It does indeed come from the Jetpack plugin.

I've opened an issue in the Jetpack bug repository here. The team is working on a fix here.

This ticket can consequently be closed.

#6 @swissspidy
9 months ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.