Twitter bootstrap 3 如何优化字形图标字体?

Twitter bootstrap 3 如何优化字形图标字体?,twitter-bootstrap-3,sass,fonts,glyphicons,Twitter Bootstrap 3,Sass,Fonts,Glyphicons,我想为Google PageSpeed Insights工具优化Glyphicons字体的加载。我需要应用下面的CSS代码: font-display: swap 以下是我的字体的位置: https://www.example.com/themes/custom/bootstrap_subtheme_front_office_old/bootstrap/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2 我在我的子主题的styl

我想为Google PageSpeed Insights工具优化Glyphicons字体的加载。我需要应用下面的CSS代码:

font-display: swap
以下是我的字体的位置:

https://www.example.com/themes/custom/bootstrap_subtheme_front_office_old/bootstrap/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2
我在我的子主题的
style.scss
文件中添加了以下代码,并编译了主题,但谷歌仍然说我应该应用
font-display:swap

@font-face {
  font-family: 'Glyphicons Halflings';
  src: url('../bootstrap/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2') format('woff2');
  font-display: swap;
}

很难说问题中给出的信息。找零看起来没问题。新编译的CSS是否部署到生产环境中?@Andersonola是的,它是在生产环境中编译和部署的,但不考虑字体。我的印象是引导正在另一个文件中使用。