wordpress google 字体子集不显示字符

wordpress google fonts subset not showing characters

我正在尝试嵌入此 google 字体并添加子集 latin-ext。网站正在加载字体,但它仍然显示子集中的特殊字符。 这是在我的 functions.php:

wp_enqueue_style('google_fonts', 'https://fonts.googleapis.com/css?
family=Luckiest+Guy&subset=latin,latin-ext');

我不确定我写的字体字符串是否正确。

style.css

试试这个

@import url(https://fonts.googleapis.com/css? family=Luckiest+Guy&subset=latin,latin-ext);

不需要使用wp_enque_style()

希望您使用的是子主题,这样下次更新主题时就不会覆盖它。