Since Google Fonts services are blocked in China, Chinese users may experience a very slow loading speed as many WordPress themes use Google Fonts.
To address this issue, we can replace all reference urls to mirrors that are not blocked in China.
In WordPress 4.x, open /wp-includes/script-loader.php
, find the line:
$open_sans_font_url = "//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=$subsets";
Then open your theme’s file, (twenty-twelve for example), open /wp-content/themes/twentytwelve/functions.php
, find the line:
$font_url = add_query_arg( $query_args, "$protocol://fonts.googleapis.com/css" );
Or you can search for fonts.googleapis.com
across all files in WordPress directories.
Option 1:
Replace all fonts.googleapis.com
to fonts.useso.com
. But this services is hosted by Chinese company Qihoo 360, this may cause performance and reliability issues.
This site actually has shut down.
Option 2:
Host Google Fonts locally.
Just use this website to generate css code and download all font files, and host them on your server.