Make WordPress Core

Changeset 50155


Ignore:
Timestamp:
02/02/2021 06:35:27 PM (4 years ago)
Author:
SergeyBiryukov
Message:

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.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-form-blocks.php

    r50070 r50155  
    194194);
    195195
    196 /* translators: Use this to specify the CSS font family for the default font. */
    197 $locale_font_family = esc_html_x( 'Noto Serif', 'CSS Font Family for Editor Font' );
     196$locale_font_family = '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif';
    198197$styles[]           = array(
    199198    'css' => "body { font-family: '$locale_font_family' }",
  • trunk/src/wp-includes/script-loader.php

    r50152 r50155  
    14751475    $styles->add( 'open-sans', $open_sans_font_url ); // No longer used in core as of 4.6.
    14761476
    1477     // Packages styles.
     1477    // Noto Serif is no longer used by core, but may be relied upon by themes and plugins.
    14781478    $fonts_url = '';
    14791479
     
    14871487        $fonts_url = 'https://fonts.googleapis.com/css?family=' . urlencode( $font_family );
    14881488    }
    1489     $styles->add( 'wp-editor-font', $fonts_url );
     1489    $styles->add( 'wp-editor-font', $fonts_url ); // No longer used in core as of 5.7.
    14901490
    14911491    $styles->add( 'wp-block-library-theme', "/wp-includes/css/dist/block-library/theme$suffix.css" );
     
    15041504
    15051505    $package_styles = array(
    1506         'block-editor'         => array(
    1507             'wp-components',
    1508             'wp-editor-font',
    1509         ),
     1506        'block-editor'         => array( 'wp-components' ),
    15101507        'block-library'        => array(),
    15111508        'block-directory'      => array(),
Note: See TracChangeset for help on using the changeset viewer.