WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/31/2019 10:09:39 AM (4 months ago)
Author:
flixos90
Message:

Bundled Theme: Load Google fonts with display=fallback parameter for better UX in case the font cannot be loaded.

Providing this query parameter ensures the stylesheet contains the font-display: fallback rule. This changeset also updates the Open Sans font used by core accordingly.

Props westonruter.
Fixes #47282.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyseventeen/functions.php

    r45218 r45485  
    295295
    296296        $query_args = array(
    297             'family' => urlencode( implode( '|', $font_families ) ),
    298             'subset' => urlencode( 'latin,latin-ext' ),
     297            'family'  => urlencode( implode( '|', $font_families ) ),
     298            'subset'  => urlencode( 'latin,latin-ext' ),
     299            'display' => urlencode( 'fallback' ),
    299300        );
    300301
Note: See TracChangeset for help on using the changeset viewer.