diff --git a/docs/reference-guides/theme-json-reference/theme-json-living.md b/docs/reference-guides/theme-json-reference/theme-json-living.md index 24a5845381bfda..627fee6071816f 100644 --- a/docs/reference-guides/theme-json-reference/theme-json-living.md +++ b/docs/reference-guides/theme-json-reference/theme-json-living.md @@ -188,7 +188,7 @@ Settings related to typography. | textTransform | boolean | true | | | dropCap | boolean | true | | | fontSizes | array | | fluid, name, size, slug | -| fontFamilies | array | | fontFace, fontFamily, name, slug | +| fontFamilies | array | | fontFace, fontFamily, name, preview, slug | --- diff --git a/lib/class-wp-theme-json-gutenberg.php b/lib/class-wp-theme-json-gutenberg.php index 9311001f2edd14..43a3772a1c3af0 100644 --- a/lib/class-wp-theme-json-gutenberg.php +++ b/lib/class-wp-theme-json-gutenberg.php @@ -431,6 +431,7 @@ class WP_Theme_JSON_Gutenberg { 'fontFamily' => null, 'name' => null, 'slug' => null, + 'preview' => null, 'fontFace' => array( array( 'ascentOverride' => null, @@ -446,6 +447,7 @@ class WP_Theme_JSON_Gutenberg { 'sizeAdjust' => null, 'src' => null, 'unicodeRange' => null, + 'preview' => null, ), ), ), diff --git a/schemas/json/theme.json b/schemas/json/theme.json index 782e59794a5d18..10695f493c40dd 100644 --- a/schemas/json/theme.json +++ b/schemas/json/theme.json @@ -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", @@ -713,6 +717,10 @@ "unicodeRange": { "description": "CSS unicode-range value.", "type": "string" + }, + "preview": { + "description": "URL to a preview image of the font face.", + "type": "string" } }, "required": [ "fontFamily", "src" ],