问题描述
我正在构建一个小内联网应用程序,并尝试,没有运气,使用我最近购买的 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语法基本上是:
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我得到:
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 to .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.
使用适当的您可以将其设置为允许安装嵌入。
对于64位版本,请检查@ user22600的。
Using the appropriate tool you can set it to installable embedding allowed.
For a 64-bit version, check @user22600's answer.
这篇关于在IE9中使Adobe字体与CSS3 @ font-face一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!