[wp-trac] [WordPress Trac] #46370: Fonts API: a proposal for creating an API to register and enqueue web fonts
WordPress Trac
noreply at wordpress.org
Wed Jun 7 18:36:35 UTC 2023
#46370: Fonts API: a proposal for creating an API to register and enqueue web fonts
--------------------------------+-----------------------------------
Reporter: jonoaldersonwp | Owner: hellofromTonya
Type: feature request | Status: assigned
Priority: normal | Milestone: 6.3
Component: General | Version:
Severity: normal | Resolution:
Keywords: needs-testing-info | Focuses: performance, privacy
--------------------------------+-----------------------------------
Comment (by hellofromTonya):
@domainsupport You've discovered a missing integration with Theme JSON
data layer. Let me explain.
`wp_deregister_font_family()` currently deregisters the font-family with
the Fonts API, meaning that font's `@font-face` CSS will not be generated
or printed. All of the theme defined fonts (defined with a theme's
`theme.json` file) are automatically processed by Theme JSON Resolver.
Those fonts are part of the Theme JSON data layer, meaning they exist
outside of the Fonts API.
There's currently no integration between the Fonts API and the Theme JSON
/ Theme JSON Resolver to remove theme defined fonts from its data layer.
Can you open an [https://github.com/WordPress/gutenberg/issues issue in
Gutenberg] please? Thank you!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46370#comment:140>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list