这是我的 CSS:
@font-face {
font-family: 'geometria_lightlight';
src: url('Geometria-Light-webfont.eot');
src: url('Geometria-Light-webfont.eot?#iefix') format('embedded-opentype'),
url('Geometria-Light-webfont.woff2') format('woff2'),
url('Geometria-Light-webfont.woff') format('woff'),
url('Geometria-Light-webfont.ttf') format('truetype'),
url('Geometria-Light-webfont.svg#geometria_lightlight') format('svg');
font-weight: lighter;
font-style: normal;
}
#logo{
font-family: 'geometria_lightlight';
font-size: 60px;
}
这是我在 Chrome 中收到的消息: 无法解码下载的字体:http://localhost:3000/Geometria-Light-webfont.woff2 localhost/:1 OTS 解析错误:版本标签无效 localhost/:1 无法解码下载的字体:http://localhost:3000/Geometria-Light-webfont.woff
我通过 Font Squirrel 下载的每一种字体都会收到此消息。
最佳答案
将您的字体放在文件夹 public/fonts
中。
然后做这样的事情:
@font-face {
font-family: 'BebasNeueRegular';
src: url('/fonts/BebasNeue-Regular.ttf') format('truetype');
}
关于css - 无法在 Meteor 中解码下载的字体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32767727/