[wp-trac] [WordPress Trac] #55985: [Twenty Twelve to Twenty Seventeen]: bundle Google Fonts in each theme
WordPress Trac
noreply at wordpress.org
Sat Feb 4 17:30:30 UTC 2023
#55985: [Twenty Twelve to Twenty Seventeen]: bundle Google Fonts in each theme
--------------------------------------------------+----------------------
Reporter: luminuu | Owner: (none)
Type: enhancement | Status: new
Priority: high | Milestone: 6.2
Component: Bundled Theme | Version:
Severity: major | Resolution:
Keywords: has-patch dev-feedback needs-testing | Focuses: privacy
--------------------------------------------------+----------------------
Comment (by sabernhardt):
Testing PR 2920 with `wp_dequeue_style` in some
[https://github.com/sabernhardt/child-themes-55985 child themes], the
front end and block editor properly removed the Open Sans stylesheet from
the queue. (The dequeue function itself did not affect Classic Editor.)
[https://github.com/sabernhardt/child-themes-55985/blob/main/child-
themes/twentytwelvedequeue/functions.php#L9 Edge case]: I managed to break
the Classic Editor by trying to remove the font with the `mce_css` filter,
though my code already could fail with the current theme if the language
turns off the font.
I do not consider that a blocker against using the dependencies method;
however, I am still convinced that enqueuing only one stylesheet with the
existing handle should be faster with multiple fonts and have lower
potential for breaking sites.
Internet Explorer is one old browser that does not select font files based
on characters in the `unicode-range`. Fontsource gives WOFF files with
''all'' character sets in each variant's file to reduce the number of
files. I will create six pull requests today with these fonts and updated
WOFF2 files, plus other changes.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55985#comment:75>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list