You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add scaffold for usage of the Fonts API introduced in 6.5 #102
WordPress 6.0 will likely include the new Webfonts API which will make it much easier to register and load custom fonts. This should be incorporated into the scaffold.
@dainemawerWordPress/gutenberg#37140 is the PR where the Webfonts API got introduced into Gutenberg. The same core is now in 6.0 and we need to determine what the best practices are we want to advise for its usage.
I'm happy to work on the setup to build some scaffolding but I would look to you for guidance on what we should do from the performance perspective to set up our defaults correctly.
First and foremost I think it would be great to get some insight from you whether the way the fonts get loaded by this API out of the box meets all the criteria you have for properly loading fonts. If that is the case I can move this forward.
If there are issues I'd love to see us work with core to improve these issues and also see if we can come up with workarounds in the meantime
@fabiankaegy sounds great to me! Could we setup a branch with the inherent functionality to start with so I can take a look? I can probably make further suggestions from that point. Lacking a bit of time to dive into the setup myself, but if you can get the foundation up and running which I can clone down I think we can make short work of this! Exciting times!
There will be a post on make.wordpress.org soon going into depth on the various reasons.
It also currently isn't in the Betas. So I'm not confident we will get this with 6.0 anymore. Its good to get ahead of things anyways and test it now because it actually allows us to participate more in shaping it if you find any issues with the current implementations.
It looks like we will get a stripped-down version that only allows registration via theme.json. The actual underlying PHP API will not be available for anyone except for core because it is not jet stable enough.
I had tried to get a draft PR going with Beta 2 and the Gutenberg plugin but failed. Will try again now with Beta 3 which should include the theme.json parts of the Webfont API
changed the title [-]Add scaffold for usage of the Fonts API introduced in 6.0[/-][+]Add scaffold for usage of the Fonts API introduced in 6.5[/+]on Feb 20, 2024
@fabiankaegy just wanted to check in on the status of this API and if we should continue looking into it. If it is released publicly now, we should consider releasing it via https://github.com/10up/wp-framework so that we can update/enhance it as and when we need to.
Activity
dainemawer commentedon Apr 19, 2022
@fabiankaegy apologies for only getting back to you on this so late. How can we make this happen? Super exciting!
fabiankaegy commentedon Apr 19, 2022
@dainemawer WordPress/gutenberg#37140 is the PR where the Webfonts API got introduced into Gutenberg. The same core is now in 6.0 and we need to determine what the best practices are we want to advise for its usage.
I'm happy to work on the setup to build some scaffolding but I would look to you for guidance on what we should do from the performance perspective to set up our defaults correctly.
First and foremost I think it would be great to get some insight from you whether the way the fonts get loaded by this API out of the box meets all the criteria you have for properly loading fonts. If that is the case I can move this forward.
If there are issues I'd love to see us work with core to improve these issues and also see if we can come up with workarounds in the meantime
dainemawer commentedon Apr 20, 2022
@fabiankaegy sounds great to me! Could we setup a branch with the inherent functionality to start with so I can take a look? I can probably make further suggestions from that point. Lacking a bit of time to dive into the setup myself, but if you can get the foundation up and running which I can clone down I think we can make short work of this! Exciting times!
fabiankaegy commentedon Apr 20, 2022
@dainemawer I will set up something for you 👍. However, I just want to flag that there are some conversations currently that the API may be postponed again. See here: https://wordpress.slack.com/archives/C035NHLFUSY/p1650386056181749
There will be a post on make.wordpress.org soon going into depth on the various reasons.
It also currently isn't in the Betas. So I'm not confident we will get this with 6.0 anymore. Its good to get ahead of things anyways and test it now because it actually allows us to participate more in shaping it if you find any issues with the current implementations.
dainemawer commentedon Apr 21, 2022
@fabiankaegy makes a ton of sense. Lets get ahead of the curve and we can pivot as necessary?
fabiankaegy commentedon Apr 27, 2022
Just for context this here is the latest overview of the Webfont API in core: https://make.wordpress.org/core/2022/04/22/status-of-webfonts-api-for-wordpress-6-0-inclusion/
It looks like we will get a stripped-down version that only allows registration via
theme.json. The actual underlying PHP API will not be available for anyone except for core because it is not jet stable enough.I had tried to get a draft PR going with Beta 2 and the Gutenberg plugin but failed. Will try again now with Beta 3 which should include the
theme.jsonparts of the Webfont API[-]Add scaffold for usage of the Fonts API introduced in 6.0[/-][+]Add scaffold for usage of the Fonts API introduced in 6.5[/+]darylldoyle commentedon Mar 17, 2025
@fabiankaegy just wanted to check in on the status of this API and if we should continue looking into it. If it is released publicly now, we should consider releasing it via https://github.com/10up/wp-framework so that we can update/enhance it as and when we need to.
fabiankaegy commentedon Mar 18, 2025
Yeah this is never going to ship =D Theme.json handles this... So we can close this here