Browse Source

Use font-display swap for font registration

Jeremy Yip 3 years ago
parent
commit
4d2dbb90c6
1 changed files with 2 additions and 2 deletions
  1. 2 2
      blockbase/functions.php

+ 2 - 2
blockbase/functions.php

@@ -211,14 +211,14 @@ function blockbase_register_google_fonts() {
 					'font-family'  => $font_family,
 					'font-family'  => $font_family,
 					'font-weight'  => '100 900',
 					'font-weight'  => '100 900',
 					'font-style'   => 'normal',
 					'font-style'   => 'normal',
-					'font-display' => 'fallback',
+					'font-display' => 'swap',
 					'provider'     => 'blockbase-google-fonts',
 					'provider'     => 'blockbase-google-fonts',
 				),
 				),
 				array(
 				array(
 					'font-family'  => $font_family,
 					'font-family'  => $font_family,
 					'font-weight'  => '100 900',
 					'font-weight'  => '100 900',
 					'font-style'   => 'italic',
 					'font-style'   => 'italic',
-					'font-display' => 'fallback',
+					'font-display' => 'swap',
 					'provider'     => 'blockbase-google-fonts',
 					'provider'     => 'blockbase-google-fonts',
 				),
 				),
 			)
 			)