波斯语@ font-face在Chrome中不起作用,还是Bug? [英] Persian @font-face doesn't work in Chrome, Bug or not?

查看:247
本文介绍了波斯语@ font-face在Chrome中不起作用,还是Bug?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不确定我是否会遇到Chrome中的错误或CSS出了毛病

Not sure if I'm heading a bug in Chrome or something is wrong with my CSS

以下是我在说什么的演示:演示链接

Here is a demonstration of what I'm talking about: demo link

问题是我在我的网站中使用了自定义的波斯语字体,名为BMitra(在公共领域它是完全免费的),并且所有主流浏览器(最新的FF和IE6 +)都呈现这种字体就很好,但是我的Chrome浏览器会跳过该字体并切换到系统默认的tahoma.

The problem is that I'm using a custom Farsi font in my website named as BMitra (it is absolutely free in public domain) and all major browsers (latest FF and IE6+) are rendering this font just fine but my Chrome skips this font and switches to system's default tahoma.

这是我的CSS:

@font-face {
    font-family: 'BMitra';
    font-weight: normal;
    src: url('fonts/regular/BMitra.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
         url('fonts/regular/BMitra.woff') format('woff'), /* Modern Browsers */
         url('fonts/regular/BMitra.ttf')  format('truetype'), /* Safari, Android, iOS */
         url('fonts/regular/BMitra.svg#svgBMitra') format('svg'); /* Legacy iOS */
    }

@font-face {
    font-family: 'BMitra';
    font-weight: bold;
    src: url('fonts/bold/BMitraBd.woff') format('woff'), /* Modern Browsers */
         url('fonts/bold/BMitraBd.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
         url('fonts/bold/BMitraBd.ttf')  format('truetype'), /* Safari, Android, iOS */
         url('fonts/bold/BMitraBd.svg#svgBMitra') format('svg'); /* Legacy iOS */
    }

那么,有什么想法吗?这是Webkit或其他工具中的错误吗?提前致谢.


注释:

So, any ideas? is this a bug in webkit or something else. thanks in advance.


Side-notes:

  • 原始字体为真型格式,我使用在线工具对其进行了转换.但我确信该字体不会损坏,因为所有其他格式都可以正常工作.
  • 我刚刚发现有人遇到了同样的问题(这里是链接),但解决方案并非如此都在工作!它也破坏了IE9的功能!
  • 我可以看到Chrome在Chrome的控制台中加载了字体,因此问题不在于网页加载时网页服务器或字体资源不可用.
  • The original font is in true-type format and I converted it using an online tool. but I'm sure that the font is not damaged because all other formats are working fine.
  • I've just figured out that someone had the same problem (here is the link) but the solution is not working at all! it also breaks functionality in IE9!
  • I can see that Chrome loads the fonts in Chrome's console so the problem is not with webserver or nonavailability of font resources at the time of page load.

推荐答案

这不是错误.您的字体不是标准字体,并且在Firefox 11中也无法正常工作(它显示了彼此分开的字符,这是不良字体的标志). 您可以在此处找到用于网络的新的波斯字体系列.这些字体与新版本的浏览器没有问题:

It's not a bug. Your font is not standard and also it's not working correctly in Firefox 11 as well (it shows the characters separated from each other which is the sign of the bad font). You can find the new series of Persian fonts for web here. These fonts have no issue with the new versions of the browsers: http://www.scict.ir/Portal

这篇关于波斯语@ font-face在Chrome中不起作用,还是Bug?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆