使 Adobe 字体与 IE9 中的 CSS3 @font-face 一起使用 [英] Make Adobe fonts work with CSS3 @font-face in IE9
问题描述
我正在构建一个小型 Intranet 应用程序并尝试使用我最近购买的 Adobe 字体,但没有成功.据我所知,在我们的案例中,这并不违反许可证.
I'm in the process of building a small intranet application and try, with no luck, to use Adobe font I purchased lately. As I was informed, in our case it's not a license violation.
我将 .ttf/.otf 版本的字体转换为 .woff、.eot 和 .svg,以便针对所有主要浏览器. 我使用的 @font-face 语法基本上是防弹的一个来自 Font Spring:
I converted the .ttf/.otf versions of font to .woff, .eot and .svg, so to target all major browsers. The @font-face syntax I used is basically the bulletproof one from Font Spring:
@font-face {
font-family: 'MyFontFamily';
src: url('myfont-webfont.eot');
src: url('myfont-webfont.eot?#iehack') format('eot'),
url('myfont-webfont.woff') format('woff'),
url('myfont-webfont.ttf') format('truetype'),
url('myfont-webfont.svg#svgFontName') format('svg');
}
我修改了 HTTP 标头(添加了 Access-Control-Allow-Origin = "*")以允许跨域引用.在 FF 和 Chrome 中它运行良好,但在 IE9 中我得到:
I modified the HTTP headers (added Access-Control-Allow-Origin = "*") to allow cross-domain references. In FF and Chrome it works perfectly, but in IE9 I get:
CSS3111: @font-face encountered unknown error.
myfont-webfont.woff
CSS3114: @font-face failed OpenType embedding permission check. Permission must be Installable.
myfont-webfont.ttf
我注意到在将字体从 .ttf/.otf 转换为 .woff 时,我也得到了一个 .afm 文件,但我不知道它是否重要...
I noticed that when converting font from .ttf/.otf to .woff I also get an .afm file, but I don't have a clue whether it's important or not...
任何想法如何解决?
- 我在 IIS 7.5
推荐答案
我只能解释如何修复CSS3114"错误.
您必须更改 TTF 文件的嵌入级别.
I can only explain you how to fix the "CSS3114" error.
You have to change the embedding level of your TTF file.
使用适当的工具,您可以将其设置为允许安装嵌入em>.
对于 64 位版本,请查看 @user22600 的答案.
Using the appropriate tool you can set it to installable embedding allowed.
For a 64-bit version, check @user22600's answer.
这篇关于使 Adobe 字体与 IE9 中的 CSS3 @font-face 一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!