主题自加载google的开源字体,支持中文。google官方https://fonts.google.com/earlyaccess选择自己需要的字体,然后替换\wp-content\themes\Divi\functions.php约640~666行,目前google还是蛮多漂亮字体,国内访问速度也理想。
'ms_MY' => array(
'language_name' => 'Malay',
'google_font_url' => '//fonts.googleapis.com/earlyaccess/notosansmalayalam.css',
'font_family' => "'Noto Sans Malayalam', serif",
),
'zh_CN' => array(
'language_name' => 'Chinese', //这是中文
'google_font_url' => '//fonts.googleapis.com/earlyaccess/cwtexfangsong.css', //替换css地址
'font_family' => "'cwTeXFangSong', serif",
),
'zh_CN' => array(
'language_name' => 'Chinese',
'google_font_url' => '//fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@100;300;400;500;700;900&display=swap',
'font_family' => "'Noto Sans SC', sans-serif",
),
正文完