-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom fonts are not loaded correctly in block themes #1075
Comments
I'm seeing these locally: > wp site list --network_id=2
Deprecated: Function wp_fonts is <strong>deprecated</strong> since version Gutenberg 16.3 with no alternative available. in wp-includes/functions.php on line 5463
Deprecated: Function WP_Fonts::__construct is <strong>deprecated</strong> since version Gutenberg 16.3.0 with no alternative available. in wp-includes/functions.php on line 5463
Deprecated: Function WP_Fonts::register_provider is <strong>deprecated</strong> since version Gutenberg 16.3.0 with no alternative available. in wp--includes/functions.php on line 5463 WordPress/gutenberg#52485 seems to be the cause, but I haven't looked closely. |
Sorry to bother this channel, but do you know if there is an estimated date when this issue can be fixed? I have to publish the WordCamp website next week, and I'm going to have to switch to Twenty Twenty-One and redesign again. |
I have received reports of this problem from both WordCamp Kansai 2024 and WordCamp Asia 2024. |
WordCamp Taiwan 2023 had the same issue, but the event has already ended so it's not urgent. |
@candy02058912 Apologies for not getting this fixed in time. :( I'm looking at this right now and will update this ticket appropriately. |
For the time being, as @dd32 has suggested, we'll manually add fonts until we can define the fonts folder. If you want to use a Google Font, open an issue with the fonts you want to be added. An example ticket should look like: Can you add the following fonts for use on https://us.wordcamp/2023? Fonts:
|
Looks like a PR to make the font upload settings filterable will be available in GB 17.6: WordPress/gutenberg#57697 |
Worth noting that the pre-filterable implementation of the fonts didn't properly support Multisite (which WordCamp is) so it could've been a good thing that it didn't work out of the box.. |
Can you add the following font for use on https://buffalo.wordcamp.org/2024/? (if we can use a github hosted font): (if it has to be a google font): |
In the meantime, If you only need to use it in Custom/Remote CSS, you can use the Custom Fonts section to add it; https://buffalo.wordcamp.org/2024/wp-admin/themes.php?page=wc-fonts-options It won't be available in the Editor though. |
Thanks! Got it working. Appreciate it. |
In #868, I added code to register google fonts loaded in the "Appearance > Fonts" setting into the editor using the Fonts API. Something must have changed from gutenberg 16.6 to 16.7, because they aren't loaded correctly anymore. The Fonts API was experimental to begin with, and it has seen activity in this cycle, so it likely just needs to be updated to use the current API.
To reproduce
View us.wordcamp.org/2023/.
Or to reproduce yourself:
Expected behavior
The fonts that were added in Appearance > Fonts should be in this list, so that they can be used in the editor.
Screenshots
The text was updated successfully, but these errors were encountered: