Unicode @font-face 文本适用于 FF,不适用于 Chrome 和 IE

发布于 2024-12-12 10:53:58 字数 642 浏览 3 评论 0原文

我在使用亚洲文本使用 @font-face 时遇到问题,它显示框而不是某些字符。它在 FF 中工作正常(下图),但在 IE 8 和 Chrome 中则不然(上图)。该页面是 UTF-8。这里可能发生了什么?我不确定这是字体、我的代码还是浏览器的问题。其他一些字体工作正常,所以我可以更改,但如果是字体问题或缺少字形,为什么它仍然可以在 Firefox 中工作?

在此处输入图像描述

CSS 基本上直接来自 FontSquirrel 生成器。

@font-face {   font-family: 'fontname';src: url('/fonts/fontname-webfont.eot');  
               src: url('/fonts/fontname-webfont.eot?#iefix') format('embedded-opentype'), 
               url('/fonts/fontname-webfont.woff') format('woff'); }
.fontname {font-family: 'fontname', Arial, sans-serif; }

任何建议表示赞赏,谢谢。

I'm having problems getting @font-face working using Asian text, it shows boxes instead of some of the characters. It works fine in FF though (bottom image), but not in IE 8 and Chrome (top image) . The page is UTF-8. What could be going on here ? I'm not sure if it's an issue with the font, my code or the browser. Some other fonts work OK, so I could change, but if it's a font problem or missing glyphs why would it still work in Firefox ?

enter image description here

The CSS is basically straight from the FontSquirrel generator.

@font-face {   font-family: 'fontname';src: url('/fonts/fontname-webfont.eot');  
               src: url('/fonts/fontname-webfont.eot?#iefix') format('embedded-opentype'), 
               url('/fonts/fontname-webfont.woff') format('woff'); }
.fontname {font-family: 'fontname', Arial, sans-serif; }

Any suggestions appreciated, thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

乖乖兔^ω^ 2024-12-19 10:53:58

看起来这只是该特定字体的编码问题。

Looks like this was just an encoding issue with that specific font.

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