Font Library: WordPress 6.5 Required Tasks
What?
A list of tasks required to merge Font Library in WordPress core 6.5.
To do:
In progress:
- [x] https://github.com/WordPress/gutenberg/issues/58299
- [x] https://github.com/WordPress/gutenberg/pull/58590
- [x] https://github.com/WordPress/gutenberg/pull/58571
- [x] https://github.com/WordPress/gutenberg/pull/58530
Needs decision:
- [x] https://github.com/WordPress/gutenberg/issues/55280
Done:
- [x] https://github.com/WordPress/gutenberg/issues/55263
- [x] https://github.com/WordPress/gutenberg/issues/54706
- [x] https://github.com/WordPress/gutenberg/issues/55018
- [x] https://github.com/WordPress/gutenberg/issues/54528
- [x] https://github.com/WordPress/gutenberg/issues/54399
- [x] https://github.com/WordPress/gutenberg/issues/54697
- [x] https://github.com/WordPress/gutenberg/pull/57569
- [x] https://github.com/WordPress/gutenberg/issues/55063
- [x] https://github.com/WordPress/gutenberg/issues/54527
- [x] https://github.com/WordPress/gutenberg/issues/55019
- [x] https://github.com/WordPress/gutenberg/issues/55266
- [x] https://github.com/WordPress/gutenberg/issues/55275
- [x] https://github.com/WordPress/gutenberg/issues/54945
- [x] https://github.com/WordPress/gutenberg/issues/55049
- [x] https://github.com/WordPress/gutenberg/issues/51820
- [x] https://github.com/WordPress/gutenberg/issues/55278
- [x] https://github.com/WordPress/gutenberg/issues/58083
- [x] https://github.com/WordPress/gutenberg/issues/58065
- [x] https://github.com/WordPress/gutenberg/issues/58173
- [x] https://github.com/WordPress/gutenberg/issues/58278
Nice to have:
- https://github.com/WordPress/gutenberg/issues/54222
- https://github.com/WordPress/gutenberg/issues/54226
- https://github.com/WordPress/gutenberg/issues/51151
- https://github.com/WordPress/gutenberg/issues/54777
- https://github.com/WordPress/gutenberg/issues/54779
- https://github.com/WordPress/gutenberg/issues/54688
- https://github.com/WordPress/gutenberg/issues/54506
- https://github.com/WordPress/gutenberg/issues/54401
- https://github.com/WordPress/gutenberg/issues/54186
- https://github.com/WordPress/gutenberg/issues/56688
- https://github.com/WordPress/gutenberg/issues/53653
- https://github.com/WordPress/gutenberg/issues/54431
- https://github.com/WordPress/gutenberg/issues/54880
- https://github.com/WordPress/gutenberg/issues/57904
- https://github.com/WordPress/gutenberg/pull/58030
- https://github.com/WordPress/gutenberg/issues/58276
- https://github.com/WordPress/gutenberg/pull/54477
- https://github.com/WordPress/gutenberg/issues/58229
Trac ticket to merge in core:
https://core.trac.wordpress.org/ticket/59166
Hello there. I opened ticket 59911 on the track concerning inconsistency brought by PR #54615 between the declaration of font family presets in theme.json and the generated @font-face. Can we continue the discussion in #57207?
👋🏼 Hey hey! Are you all able to share biweekly updates on how this work is progressing? It would help me loads with sharing updates to the broader community and coordinating testing as needed.
👋🏼 Hey hey! Are you all able to share biweekly updates on how this work is progressing? It would help me loads with sharing updates to the broader community and coordinating testing as needed.
Yes, here's an update from the last few weeks:
Changes merged:
#57282 to consolidate the existing endpoints the Font Library added and fix potential data sanitization problems. This change is a small step forward in implementing the API refactor.
#57364 to eliminate code no longer required.
#57368 to improve copy text.
Most relevant changes in-process:
@matiasbenedetto are you able to provide weekly updates at this stage? We're less than a month away from beta 1 and it's going to be critical that we're aware of how this feature is progressing 🌟
@annezazu yes, this is the report about the last two weeks:
Changes discussed or merged:
We continue working heavily of the API rest refactor and the required frontend changes around that. https://github.com/WordPress/gutenberg/pull/57688
We discussed the requirement around a method for the extenders to turn off the library. We landed a solution consisting of adding a PHP filter: https://github.com/WordPress/gutenberg/issues/55275.
We discussed the need for a custom permission for managing fonts, and it seems like it has been discarded at least for now: https://github.com/WordPress/gutenberg/issues/55280
We discussed and landed a solution around configuring the storage location for font assets: https://github.com/WordPress/gutenberg/pull/57697
We added the ability to unregister font collections: https://github.com/WordPress/gutenberg/pull/54701
We updated the Google fonts collection generation and replaced the older TTF files by the lighter WOFF2 files. https://github.com/WordPress/google-fonts-to-wordpress-collection
Most relevant for the next days:
Work on the feature branch around the API refactor that will include the frontend changes too and try to merge it to trunk. https://github.com/WordPress/gutenberg/pull/57688
Quick update on the Font Library: the API refactor PR has been merged, ready for release with Gutenberg 17.6. We'll start on the backports for 6.5 soon.
Consider this as a 'Nice to Have' Font Library: Global Styles > Typography sidebar – group related font sources #58403
As Editor Tech Leads, @youknowriad and I have been looking at how we can best support contributors with landing this (blessed) feature for the WordPress 6.5 release.
I've spent some time looking at the code and how we could possibly seek to make the synchronisation to WP Core easier for folks to review. It's our feeling that it might be easier/more manageable to split the feature into its high level components and merge incrementally.
I've taken the liberty of pulling together the following. It is a suggestion only and we will defer to contributors on how best to proceed so feel free to pull it apart and propose alternatives.
Know that we are here to support you, so please reach out to and we're happy to jump in and assist as required.
Thanks for all the work on this feature 🙇
Proposal
The items are listed in order of proposed merge into WP Core.
Post Types registration and Low Level APIs
All Font Library post type registrations.
These are required to allow the public facing elements (REST API and Post Types) to function.
WP_Font_Library- APIs for registering and retrieving font collections.WP_Font_Collection- class representing an individual Font Collection.WP_Font_Utils- utilities for working with fonts.
REST API endpoints
The classes relating to REST need to be available before the Post Type registration is merge otherwise the rest_controller_class config will fail (example).
WP_REST_Font_Collections_Controller- endpoint for predefined lists (i.e. "collections") of font families.WP_REST_Font_Families_Controller- endpoint for parent "family" which typically (but not always) contains 1 or more font faces (i.e. the individual fonts).WP_REST_Font_Faces_Controller- endpoint for individual font faces within a family.
Public API methods
All remaining methods/functions from font-library.php.
Another update:
- We have made further smaller changes to the Font Library (both PHP and JS) over the past week, ready to be released with Gutenberg 17.6.
- We plan to open 2 PRs for Core:
- General PHP: Custom post type registration, Font Library, Font Collection classes and functions
- REST API controllers
- The preparation for those is happening now, and we hope to have a further update by the end of this week (Feb 2).
If you'd like to follow along, all the work is labeled with [Feature] Font Library.
Update
In order to raise the x2 Core PRs we need the following:
- [x] Align PHPUnit tests with Core coding standards:
- https://github.com/WordPress/gutenberg/pull/58502.
- https://github.com/WordPress/gutenberg/pull/58612
- [x] Move the code into the compat dir for WP 6.5
- [ ] Disable the Font Library UI in Core until the feature is fully merged and available - @creativecoder had a plan for this one.
- x2 PRs to update the actual code to align with Core standards (as per this comment:
- [x] https://github.com/WordPress/gutenberg/pull/58607
- [x] https://github.com/WordPress/gutenberg/pull/58619
- Ship two final pieces of functionality:
- [x] https://github.com/WordPress/gutenberg/pull/58590
- [x] https://github.com/WordPress/gutenberg/pull/58571
It would also be nice to have the following (but these are not blockers to raising the Core PRs):
- [x] https://github.com/WordPress/gutenberg/pull/58530
Two more to add to the above to prep for the Core PRs
- [x] https://github.com/WordPress/gutenberg/pull/58636
- [x] https://github.com/WordPress/gutenberg/pull/58654
Initial Font Library Core backport PR is open here https://github.com/WordPress/wordpress-develop/pull/6027
Some additional feedback on the code is being addressed in Gutenberg and will need to be brought into the Core PR(s).
Core PRs for the initial merge of this feature are:
The initial merge of this feature into WordPress Core for the 6.5 release is complete. Thank you to everyone who contributed.
@creativecoder @matiasbenedetto if you are able to ✅ off any PRs from the PHP Sync Issue and mark with Backported to WP Core label that would be appreciated.
Now that we are past the Beta 1 cut off point I'm removing this tracking issue from the 6.5 Project board. From now on the board should only contain individual bugs that we want to still fix before 6.5 gets released.
I'm going to close this issue, as the tasks listed above have now all been completed and the feature is due to be released with WP 6.5. Further issues can be tracked using the [Feature] Font Library label.