自定义字体在IE8中不工作在Zope / Plone [英] Custom font doesn't work in IE8 in Zope/Plone

查看:127
本文介绍了自定义字体在IE8中不工作在Zope / Plone的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Zope / Plone4 CMS制作网站。

I'm making a Web Portal using Zope/Plone4 CMS.

好吧,我用 @ font-face 声明标题的排版。
代码和字体来自Font-squirrel。
我在本地机器上的网站(没有安装字体在我的电脑),一切工作正常。
但是在Plone中,IE8根本不渲染字体。只有IE8,当IE7和IE9完美呈现(?)

Well, I used @font-face to declare the typography for headings. The code and font are from Font-squirrel. I made the website in local machine (without install the font in my PC) and everything works fine. But in Plone, IE8 doesn't render the font at all. ONLY IE8, when IE7 and IE9 renders perfectly (?)

我使用Google字体进行测试。一切正常,所有浏览器。

I made a test using Google Fonts. Everything works fine, all browsers.

我认为这可能是错误来自读/写权限或某事,因为字体 在任何IE如果我被注销。
这解释了为什么Google字体正确显示(字体托管在Plone外部)。但不解释唯一的IE8问题...

I think it's possible that the error come from read/write permissions or something, because the font doesn't render at all in any IE if I was logged out. This explains why Google Fonts render correctly (font is hosted outside Plone). But doesn't explain the only-IE8 issue...

我在这里发布代码,好吧,我认为是无关的,但如果它有帮助...



I post the code here, well, I think is irrelevant, but if it helps...

     @font-face {
        font-family: 'TeXGyreAdventorRegular';
        src: url('../font/texgyreadventor-regular-webfont.eot');
        src: url('../font/texgyreadventor-regular-webfont.eot?#iefix') format('embedded-opentype'),
             url('../font/texgyreadventor-regular-webfont.woff') format('woff'),
             url('../font/texgyreadventor-regular-webfont.ttf') format('truetype'),
             url('../font/texgyreadventor-regular-webfont.svg#TeXGyreAdventorRegular') format('svg');
        font-weight: normal;
        font-style: normal;
     }

     h1 {font-family:'TeXGyreAdventorRegular'}

我不是Zope开发人员,没有编程技能,不知道我是否正在寻找一个解决方案。我的意思是,我认为CSS是正确的,问题来自其他方面。

I'm not Zope developer and don't have programming skills, Don't know if I'm looking for a solution in right way. I mean, I think CSS is correct and the problem comes from other side. But want to exploit all posibilities in my hand before definitely abandoned custom fonts from this site.

注意:Google Fonts可以正常工作,但是我测试的所有字体都渲染得非常糟糕在Windows中,网站必须非常accesible(和完美清晰)。我希望避免它。

Note: Google Fonts works right, but all the fonts I have tested render very awful in Windows, and the site must be very accesible (and perfect legible). I prefer to avoid it.

推荐答案

您必须添加.oet(嵌入式打开类型)文件。此格式由Microsoft在15年前创建。这是IE8及以下版本在使用@ font-face时唯一的格式。

You have to add an .oet (Embedded Open Type) file. This format was created by Microsoft over 15 years ago. It’s the only format that IE8 and below will recognize when using @font-face.

您可以使用免费的转换器ttf2oet http://code.google.com/p/ttf2eot/

You can make one easily by using the free converter ttf2oet http://code.google.com/p/ttf2eot/

这篇关于自定义字体在IE8中不工作在Zope / Plone的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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