[wp-trac] [WordPress Trac] #59876: Theme.json fontWeight issue with shared slug names and fontFace
WordPress Trac
noreply at wordpress.org
Mon Nov 13 10:38:49 UTC 2023
#59876: Theme.json fontWeight issue with shared slug names and fontFace
---------------------------+------------------------------
Reporter: dogwonder | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version: 6.4
Severity: minor | Resolution:
Keywords: needs-testing | Focuses:
---------------------------+------------------------------
Comment (by dogwonder):
I've done some further investigation on this and it appears when
theme.json is rendered into the <head> as <style id='wp-fonts-local'> it
strips out the shared slug names and only renders the last declared font
in theme.json fontFamilies[].
e.g.
<style id="wp-fonts-local">
@font-face {
font-family: colfax-web;
font-style: normal;
font-weight: 700;
font-display: fallback;
src: url('https://staging.one.org/wp-
content/themes/oneorg/dist/fonts/colfax-web/ColfaxWebBold.woff2')
format('woff2')
}
@font-face {
font-family: italian-plate;
font-style: normal;
font-weight: 700;
font-display: fallback;
src: url('https://staging.one.org/wp-
content/themes/oneorg/dist/fonts/italian-plate/ItalianPlate-
Demibold.woff2') format('woff2')
}
</style>
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59876#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list