@font-face ttf 不显示(条形码)

发布于 2024-12-24 03:58:44 字数 1095 浏览 3 评论 0原文

我正在使用下面的代码。字体 handvolk 可以正确加载,但第三个字体 (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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

自此以后,行同陌路 2024-12-31 03:58:44

我假设您是此页面中的字体: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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文