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. Built from https://develop.svn.wordpress.org/trunk@45485 git-svn-id: http://core.svn.wordpress.org/trunk@45296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0e1c520a46
commit
b8920e6502
|
@ -165,8 +165,9 @@ function twentytwelve_get_font_url() {
|
|||
}
|
||||
|
||||
$query_args = array(
|
||||
'family' => 'Open+Sans:400italic,700italic,400,700',
|
||||
'subset' => $subsets,
|
||||
'family' => urlencode( 'Open+Sans:400italic,700italic,400,700' ),
|
||||
'subset' => urlencode( $subsets ),
|
||||
'display' => urlencode( 'fallback' ),
|
||||
);
|
||||
$font_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue