Skip to content

Add scaffold for usage of the Fonts API introduced in 6.5 #102

Closed

Description

@fabiankaegy

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.

Activity

  1. added this to the WordPress 6.0 milestone on Apr 7, 2022
  2. dainemawer commented on Apr 19, 2022

    @dainemawer
    Contributor

    @fabiankaegy apologies for only getting back to you on this so late. How can we make this happen? Super exciting!

  3. fabiankaegy commented on Apr 19, 2022

    @fabiankaegy
    MemberAuthor

    @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

  4. dainemawer commented on Apr 20, 2022

    @dainemawer
    Contributor

    @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!

  5. fabiankaegy commented on Apr 20, 2022

    @fabiankaegy
    MemberAuthor

    @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.

  6. dainemawer commented on Apr 21, 2022

    @dainemawer
    Contributor

    @fabiankaegy makes a ton of sense. Lets get ahead of the curve and we can pivot as necessary?

  7. fabiankaegy commented on Apr 27, 2022

    @fabiankaegy
    MemberAuthor

    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.json parts of the Webfont API

  8. 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
  9. darylldoyle commented on Mar 17, 2025

    @darylldoyle
    Collaborator

    @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.

  10. fabiankaegy commented on Mar 18, 2025

    @fabiankaegy
    MemberAuthor

    Yeah this is never going to ship =D Theme.json handles this... So we can close this here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions