-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Font Library: Add font collection JSON schema #57736
Conversation
Just a question - What is the font collection JSON schema used for? The README mentions the following:
In the future, does this mean that users will be able to define JSON for font collections in a JSON file separate from theme.json? |
This JSON schema is used as any other schema defining a JSON structure. It's a useful tool and reference for extenders creating font collections.
Extenders can create and register font collections. A Font Collection is a list of fonts available to the user to be installed. Example: Google fonts is registered as a font collection. Extenders can register one or more collections to provide the users with more font options ready to be installed. |
Size Change: +2.51 kB (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some small code cleanup comments, other than that LGTM.
Co-authored-by: Jeff Ong <jonger4@gmail.com>
Co-authored-by: Jeff Ong <jonger4@gmail.com>
Co-authored-by: Jeff Ong <jonger4@gmail.com>
Co-authored-by: Jeff Ong <jonger4@gmail.com>
What?
gen-theme-reference.js
ability to resolve a definition by name.Why?
As a reference for the data JSON files for font collections.
How?
Creating a new schema and reusing part of the existent theme.json schema
Testing instructions
Create a file and reference the
font-collection.json
schema like this:If you use an editor like VS Code, you should have autocomplete and error detection working.
Disclaimer: Instead of this long URL, after merging into trunk, we will be able to use:
https://schemas.wp.org/trunk/font-collection.json
Full
font-collection.json
example:Closes: #55266