Failed to decode downloaded font错误

出现这个问题,首先可以在css中修正一下字体文件的声明。

@font-face {
  font-family: 'SomeFont';
  src: url('font.eot');
  src: url('font.eot?#iefix') format('embedded-opentype'),
       url('font.woff2') format('woff2'),
       url('font.woff') format('woff'),
       url('font.ttf')  format('truetype'),
       url('font.svg#svgFontName') format('svg');
}

如果还不行,多半是字体库的信息不全或者已损坏,重新下载一下字体库引入就好了。

如果您觉得本文对您有用,欢迎捐赠或留言~
微信支付
支付宝

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注