From 9dac2542aa2c65deaa6623071bb45fa7fc6fb296 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 2 Feb 2021 18:37:04 +0000 Subject: [PATCH] Block Editor: Drop Noto Serif in favor of system fonts. This aims to improve privacy and performance of the editor. Follow-up to [37361]. Props Joen, hellofromTonya, garrett-eclipse, aristath, noisysocks, hedgefield, pento, sabernhardt, joyously, yannkozon. Fixes #46169. Built from https://develop.svn.wordpress.org/trunk@50155 git-svn-id: http://core.svn.wordpress.org/trunk@49834 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-form-blocks.php | 3 +-- wp-includes/script-loader.php | 9 +++------ wp-includes/version.php | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/wp-admin/edit-form-blocks.php b/wp-admin/edit-form-blocks.php index 2c46e4d504..48a9ebd3dd 100644 --- a/wp-admin/edit-form-blocks.php +++ b/wp-admin/edit-form-blocks.php @@ -193,8 +193,7 @@ $styles = array( ), ); -/* translators: Use this to specify the CSS font family for the default font. */ -$locale_font_family = esc_html_x( 'Noto Serif', 'CSS Font Family for Editor Font' ); +$locale_font_family = '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif'; $styles[] = array( 'css' => "body { font-family: '$locale_font_family' }", ); diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index 3a9ac203de..ce4c99e2ea 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -1474,7 +1474,7 @@ function wp_default_styles( $styles ) { $styles->add( 'colors-fresh', false, array( 'wp-admin', 'buttons' ) ); // Old handle. $styles->add( 'open-sans', $open_sans_font_url ); // No longer used in core as of 4.6. - // Packages styles. + // Noto Serif is no longer used by core, but may be relied upon by themes and plugins. $fonts_url = ''; /* @@ -1486,7 +1486,7 @@ function wp_default_styles( $styles ) { if ( 'off' !== $font_family ) { $fonts_url = 'https://fonts.googleapis.com/css?family=' . urlencode( $font_family ); } - $styles->add( 'wp-editor-font', $fonts_url ); + $styles->add( 'wp-editor-font', $fonts_url ); // No longer used in core as of 5.7. $styles->add( 'wp-block-library-theme', "/wp-includes/css/dist/block-library/theme$suffix.css" ); @@ -1503,10 +1503,7 @@ function wp_default_styles( $styles ) { ); $package_styles = array( - 'block-editor' => array( - 'wp-components', - 'wp-editor-font', - ), + 'block-editor' => array( 'wp-components' ), 'block-library' => array(), 'block-directory' => array(), 'components' => array(), diff --git a/wp-includes/version.php b/wp-includes/version.php index e7766f5335..df03a80296 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.7-alpha-50154'; +$wp_version = '5.7-alpha-50155'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.