You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is no longer valid for the Fonts API once the Font Library is merged.
Why?
As shared in Ongoing Roadmap update #41479 (comment), the Fonts API will no longer inject / add fonts into theme.json. Rather, it will become read-only of the theme.json merged data.
The WP_Fonts_Resolver::add_missing_fonts_to_theme_json() will be removed (see #51716).
Part of the Fonts API Roadmap #41479.
Description
Scenario:
A variation is programmatically registered when the font-family is defined in theme, but the variation is not defined in the theme.
When this scenario happens, the variation is not added by
gutenberg_add_registered_fonts_to_theme_json()
. It should be.This is because the diff comparisons are at the font-family level. Only those font-families that differ from the theme's font-families get added.
It is conceivable that a plugin could register the same font family but with one or more different variations than the theme.
Step-by-step reproduction instructions
wp-content/mu-plugins
.Notice the data does not include the DM Sans Medium font variation data. It does include DM Sans 400 and 700, but not the 500 variations.
Screenshots, screen recording, code snippet
Environment info
No response
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
The text was updated successfully, but these errors were encountered: