Opened 8 months ago
Last modified 8 months ago
#60957 new defect (bug)
Install fonts in Font Library in WP 6.5 not working on multisite using Twenty Twenty-four
Reported by: | hartsook | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.5 |
Component: | Editor | Keywords: | |
Focuses: | multisite | Cc: |
Description (last modified by )
Fonts install in the e.g. "uploads/sites/8/fonts" directory on the proper "site" in multisite. The new font shows up in the Font Library in Styles Typography, but is not rendered either in the Style Book or the front end.
Here is the theme.json
for the installed font:
"fontFace": [ { "fontFamily": "\"Alegreya Sans SC\"", "fontStyle": "normal", "fontWeight": "500", "src": "http://eosfse.movingmoment.com/wp-content/uploads/sites/8/fonts/mtGm4-RGJqfMvt7P8FUr0Q1j-Hf1DrpG0iFrMYJ_K-4.woff2" }, { "fontFamily": "\"Alegreya Sans SC\"", "fontStyle": "italic", "fontWeight": "500", "src": "http://eosfse.movingmoment.com/wp-content/uploads/sites/8/fonts/mtGk4-RGJqfMvt7P8FUr0Q1j-Hf1BkxdBidhMKB6O-51OA.woff2" } ], "fontFamily": "\"Alegreya Sans SC\", sans-serif", "name": "Alegreya Sans SC", "slug": "alegreya-sans-sc" } ],
Attachments (1)
Change History (8)
#2
@
8 months ago
Hi @hartsook and thanks for the ticket.
I'm unable to reproduce this bug, adding the font via the font library on a sub site displays as expected (see screen shot). The steps I took are:
- Install fresh Multisite installation
- Create sub site
- Install Alegreya Sans SC font via site editor
- Set the new font for all elements (Headings, text, captions, etc) in the style editor
- Save site & open front end, fonts appeared as expected
- Repeat set up for sub-site, fonts appeared as expected
Fonts added via the font library are configured via the global styles, it's not required to add the font library fonts in theme.json. For theme fonts, you can include the file in the theme and reference them with file values.
While looking at the JSON you provided, I also noticed an apparent typo: there are two closing square brackets but only one is opened.
#3
@
8 months ago
@hartsook I've posted a reply but it appears trac had a glitch sending out the notifications.
https://core.trac.wordpress.org/ticket/60957#comment:2
#4
@
8 months ago
- Description modified (diff)
I get mixed content errors in the browser console. The site enforces HTTPS, but the font refers to the unsecured (sub)domain.
#5
@
8 months ago
I am also unable to reproduce this on a fresh Multisite installation.
I'm not sure the theme.json is relevant if the font is installed with the Font Library and the font is applied to the blocks in the Site Editor. Font family changes that are made in the Site Editor are saved in the database and are used instead of theme.json.
Perhaps there are steps to reproduce it that are missing?
After installing the font using the Font library, did you export the theme to get the updated copy of theme.json?
Or did you manually add it to theme.json? For what purpose?
BTW, the html/css thinks it's getting the Alegreya Sans SC, but that's not the font that's being displayed:
h2 {
}