我已经开始在我的 meteor 项目中使用 twbs:boostrap 包的字形图标。自从我开始使用它们以来,我一直在控制台中收到以下警告:
Failed to decode downloaded font: http://localhost:3000/fonts/glyphicons-halflings-regular.woff2
OTS parsing error: invalid version tag
Failed to decode downloaded font: http://localhost:3000/fonts/glyphicons-halflings-regular.woff
OTS parsing error: invalid version tag
Failed to decode downloaded font: http://localhost:3000/fonts/glyphicons-halflings-regular.ttf
OTS parsing error: invalid version tag
造成这种情况的原因是什么以及如何抑制这些警告或解决问题?字形工作得很好,只是一直看到警告很痛苦。
最佳答案
这意味着您用来导入字形的包中有一个错误,并且没有正确声明字体文件的位置,或者没有将字体文件正确添加到包本身。
检查软件包维护者问题跟踪器,同时将字形下载到您的 public
目录并在您自己的 CSS 文件中声明它们。
关于Meteor:无法解码下载的字体和 OTS 解析错误 - 版本标记无效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34233088/