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

Google Fonts: all font faces are printed, even when not in use #34163

Closed
jeherve opened this issue Nov 16, 2023 · 0 comments · Fixed by #34157
Closed

Google Fonts: all font faces are printed, even when not in use #34163

jeherve opened this issue Nov 16, 2023 · 0 comments · Fixed by #34157
Assignees
Labels
[Feature] Google Fonts [Focus] Performance [Platform] Atomic [Platform] Simple [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] High [Status] Priority Review Triggered The guild in charge of triage has been notified of this issue in Slack Triaged [Type] Bug When a feature is broken and / or not performing as intended

Comments

@jeherve
Copy link
Member

jeherve commented Nov 16, 2023

Impacted plugin

Jetpack

Quick summary

Core prints all registered fonts in theme.json. Since Jetpack's Google Fonts feature registers quite a few fonts, that makes for a lot of additional fonts loaded on each site where the feature is active, even if the fonts are not in use on the site.

Steps to reproduce

  1. Start with a brand new site running the latest version of WordPress (6.4).
  2. Install the latest version of the Gutenberg plugin.
  3. Install the Jetpack plugin and connect it to WordPress.com.
  4. Go to Jetpack > Settings > Modules, and activate the “Google Fonts (Beta)” module
  5. Go to Appearance > Site Editor > Styles > Typography > Text > Font
  6. See additional Google Fonts provided by the module.
  7. Load any page on the frontend.
  8. Open your browser's dev tools
  9. Search for wp-fonts-local under the “Elements” tab

A clear and concise description of what you expected to happen.

Only active fonts should be loaded on the frontend.

What actually happened

You will see the full list of fonts loaded there.

Impact

All

Available workarounds?

Yes, easy to implement

Platform (Simple and/or Atomic)

Simple, Atomic, Self-hosted

Logs or notes

This was reported here:

@jeherve jeherve added [Type] Bug When a feature is broken and / or not performing as intended [Focus] Performance [Pri] High [Feature] Google Fonts Triaged labels Nov 16, 2023
@github-actions github-actions bot added [Status] Priority Review Triggered The guild in charge of triage has been notified of this issue in Slack [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Platform] Atomic [Platform] Simple labels Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Google Fonts [Focus] Performance [Platform] Atomic [Platform] Simple [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] High [Status] Priority Review Triggered The guild in charge of triage has been notified of this issue in Slack Triaged [Type] Bug When a feature is broken and / or not performing as intended
Development

Successfully merging a pull request may close this issue.

2 participants