Skip to content
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 family and font face preview keys to schema #56793

Merged
merged 4 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/class-wp-theme-json-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ class WP_Theme_JSON_Gutenberg {
'fontFamily' => null,
'name' => null,
'slug' => null,
'preview' => null,
'fontFace' => array(
array(
'ascentOverride' => null,
Expand All @@ -446,6 +447,7 @@ class WP_Theme_JSON_Gutenberg {
'sizeAdjust' => null,
'src' => null,
'unicodeRange' => null,
'preview' => null,
),
),
),
Expand Down
8 changes: 8 additions & 0 deletions schemas/json/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,10 @@
"description": "CSS font-family value.",
"type": "string"
},
"preview": {
"description": "URL to a preview image of the font family.",
"type": "string"
},
"fontFace": {
"description": "Array of font-face declarations.",
"type": "array",
Expand Down Expand Up @@ -713,6 +717,10 @@
"unicodeRange": {
"description": "CSS unicode-range value.",
"type": "string"
},
"preview": {
"description": "URL to a preview image of the font family.",
matiasbenedetto marked this conversation as resolved.
Show resolved Hide resolved
"type": "string"
}
},
"required": [ "fontFamily", "src" ],
Expand Down
Loading