From 1862c6274367c0c334f5a3362408537b5877121a Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Fri, 20 Nov 2020 16:16:40 +0000 Subject: [PATCH] Global Styles: enabled font appearence in global context (#27150) --- lib/class-wp-theme-json.php | 4 ++-- phpunit/class-wp-theme-json-test.php | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/class-wp-theme-json.php b/lib/class-wp-theme-json.php index 971c38c9b9fb7c..2b622a0e3d2df5 100644 --- a/lib/class-wp-theme-json.php +++ b/lib/class-wp-theme-json.php @@ -48,7 +48,7 @@ class WP_Theme_JSON { */ const GLOBAL_ARGS = array( 'supports' => array( - '__experimentalFontAppearance' => false, + '__experimentalFontAppearance' => true, '__experimentalFontFamily' => true, '__experimentalSelector' => self::GLOBAL_SELECTOR, '__experimentalTextDecoration' => true, @@ -882,7 +882,7 @@ function ( $element ) { } /** - * Returs the stylesheet that results of processing + * Returns the stylesheet that results of processing * the theme.json structure this object represents. * * @return string Stylesheet. diff --git a/phpunit/class-wp-theme-json-test.php b/phpunit/class-wp-theme-json-test.php index 74bc99def43801..8682d0618ae546 100644 --- a/phpunit/class-wp-theme-json-test.php +++ b/phpunit/class-wp-theme-json-test.php @@ -39,6 +39,8 @@ function test_contexts_not_valid_are_skipped() { 'color', 'fontFamily', 'fontSize', + 'fontStyle', + 'fontWeight', 'lineHeight', 'textDecoration', 'textTransform', @@ -92,6 +94,8 @@ function test_properties_not_valid_are_skipped() { 'color', 'fontFamily', 'fontSize', + 'fontStyle', + 'fontWeight', 'lineHeight', 'textDecoration', 'textTransform', @@ -126,6 +130,8 @@ function test_metadata_is_attached() { 'color', 'fontFamily', 'fontSize', + 'fontStyle', + 'fontWeight', 'lineHeight', 'textDecoration', 'textTransform', @@ -387,6 +393,8 @@ public function test_merge_incoming_data() { 'color', 'fontFamily', 'fontSize', + 'fontStyle', + 'fontWeight', 'lineHeight', 'textDecoration', 'textTransform',