@font-face ttf 不显示(条形码)
我正在使用下面的代码。字体 hand
和 volk
可以正确加载,但第三个字体 (cepnet
) 却不能。
@font-face {
font-family:"hand";
src:url("hand.ttf") format("TrueType");
}
@font-face {
font-family:"volk";
src:url("volk.ttf") format("TrueType");
}
@font-face {
font-family: "cepnet";
src:url("ECTSymbol.ttf") format("TrueType");
}
为什么不加载?
这些字体来自不同的来源,所以我不确定是否有任何类型的版权或文件格式,只知道第三种是条形码字符字体。这可能是一个原因吗?
所有文件都位于同一目录中并且拼写正确。
*编辑:*在 Windows 系统上使用 Firefox 9.x。 html 如下:
<span style='font-family: cepnet, Sans-Serif; color: #f60;'>/046240608\</span><br />
<span style='font-family: hand, Sans-Serif; color: #f06;'>/046240608\</span><br />
<span style='font-family: volk, Sans-Serif; color: #6f0;'>/046240608\ Hello</span><br />
并使用 ;
更新:我还使用字体查看器在 Windows 上测试了字体,并且字符(条形码)显示正确。另外,在 Windows Office 应用程序上,字体是正确的。这似乎是一个浏览器问题,因为我在此网站上对其进行了测试,结果不是条形码。
I'm using the code below. The fonts hand
and volk
load properly but the third (cepnet
) doesn't.
@font-face {
font-family:"hand";
src:url("hand.ttf") format("TrueType");
}
@font-face {
font-family:"volk";
src:url("volk.ttf") format("TrueType");
}
@font-face {
font-family: "cepnet";
src:url("ECTSymbol.ttf") format("TrueType");
}
Why doesn't it load?
These fonts are from different sources, so I'm not sure if there's any type of copyright or file format, only that the third one is barcode-character font. Could that be a reason?
All files are in the same directory and spelled correctly.
*EDIT:*Using Firefox 9.x on Windows system. The html is the following:
<span style='font-family: cepnet, Sans-Serif; color: #f60;'>/046240608\</span><br />
<span style='font-family: hand, Sans-Serif; color: #f06;'>/046240608\</span><br />
<span style='font-family: volk, Sans-Serif; color: #6f0;'>/046240608\ Hello</span><br />
And using <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01//EN' http://www.w3.org/TR/html4/strict.dtd'>
UPDATE: Also I've tested the font on windows using the font viewer and the characters (bar-codes) appear correctly. Alson on windows office app the font is correct. It seems to be a browser issue since i've tested it on this site and the result was not the bar-codes.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我假设您是此页面中的字体:ECTSymbol.TTF< /a>
大部分字体都是空白,只有
/1234567890:
和其他一些值会显示。I assume you're the font from this page: ECTSymbol.TTF
Most of that font is empty spaces, only
/1234567890:
and a few other values will show up.