@font-face 未通过 OpenType 嵌入权限检查。权限必须是可安装的
@font-face failed OpenType embedding permission check. Permission must be Installable
This exception occurs in here. 可以在IE11中重现。到目前为止,我还没有找到问题的原因。知道为什么会这样吗?
CSS3114: @font-face failed OpenType embedding permission check.
Permission must be Installable. File:
53d9eae5-63b4-48d7-a5b8-3419455028bb.ttf
网站 运行 在 Azure Websites 平台上,使用 ASP.NET MVC 5。
通过添加
修复
<staticContent>
<mimeMap fileExtension=".woff" mimeType="application/octet-stream" />
</staticContent>
低于
<system.webServer>
在 web.config.
编辑:
为了防止后续版本出现任何问题,我建议这样做:
<staticContent>
<remove fileExtension=".woff" />
<mimeMap fileExtension=".woff" mimeType="application/octet-stream" />
</staticContent>
IE 不支持 .ttf 只能使用 .eot 字体文件
@font-face {
font-family: 'Font-Name';
src: url('../fonts/Font-Name.eot?#iefix') format('embedded-opentype');
src: url('../fonts/Font-Name.ttf') format('truetype');
}
sibaspage 的回答为我指明了正确的方向。但我仍然在 IE11 中看到错误消息。对我来说,它使用以下语法工作:
@font-face {
font-family: 'Font-Name';
src: url('../fonts/Font-Name.eot?#iefix') format('embedded-opentype'),
url('../fonts/Font-Name.ttf') format('truetype');
}
@font-face {
font-family: 'Gotham-Medium';
src: url('fonts/Gotham-Medium.eot');
src: local('☺'), url('fonts/Gotham-Medium.woff') format('woff'), url('fonts/Gotham-Medium.ttf') format('truetype'), url('fonts/Gotham-Medium.svg') format('svg');
font-weight: normal;
font-style: normal;
}
通知src:local('☺'),
另一个解决方案是更改 字体嵌入能力 属性 文件。右键单击并查看 详细信息 选项卡:
如果这个属性没有出现,可以用this service来添加。它仅适用于 .ttf
个字体文件。但我想还有一些其他服务可以更改其他字体文件扩展名。
对于文档或未来的访问者:在我的例子中,我正在用 IE11 和 .otf 字体试验这个问题,如果这是你的案例阅读此 Can I use case。基本上它说的是 IE11 不支持某些 .ttf 和 .otf 字体。
我找到的最佳解决方案是 将 .otf 字体转换为 .woff 并在 Jakub Holovsky 的回复中添加代码并稍加改动。
<staticContent>
<remove fileExtension=".woff" />
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
</staticContent>
我遇到了同样的问题并找到了这篇文章:https://creativemarket.com/blog/the-missing-guide-to-font-formats。
您可以将相关字体添加到 font-face.
This exception occurs in here. 可以在IE11中重现。到目前为止,我还没有找到问题的原因。知道为什么会这样吗?
CSS3114: @font-face failed OpenType embedding permission check. Permission must be Installable. File: 53d9eae5-63b4-48d7-a5b8-3419455028bb.ttf
网站 运行 在 Azure Websites 平台上,使用 ASP.NET MVC 5。
通过添加
修复<staticContent>
<mimeMap fileExtension=".woff" mimeType="application/octet-stream" />
</staticContent>
低于
<system.webServer>
在 web.config.
编辑:
为了防止后续版本出现任何问题,我建议这样做:
<staticContent>
<remove fileExtension=".woff" />
<mimeMap fileExtension=".woff" mimeType="application/octet-stream" />
</staticContent>
IE 不支持 .ttf 只能使用 .eot 字体文件
@font-face {
font-family: 'Font-Name';
src: url('../fonts/Font-Name.eot?#iefix') format('embedded-opentype');
src: url('../fonts/Font-Name.ttf') format('truetype');
}
sibaspage 的回答为我指明了正确的方向。但我仍然在 IE11 中看到错误消息。对我来说,它使用以下语法工作:
@font-face {
font-family: 'Font-Name';
src: url('../fonts/Font-Name.eot?#iefix') format('embedded-opentype'),
url('../fonts/Font-Name.ttf') format('truetype');
}
@font-face {
font-family: 'Gotham-Medium';
src: url('fonts/Gotham-Medium.eot');
src: local('☺'), url('fonts/Gotham-Medium.woff') format('woff'), url('fonts/Gotham-Medium.ttf') format('truetype'), url('fonts/Gotham-Medium.svg') format('svg');
font-weight: normal;
font-style: normal;
}
通知src:local('☺'),
另一个解决方案是更改 字体嵌入能力 属性 文件。右键单击并查看 详细信息 选项卡:
如果这个属性没有出现,可以用this service来添加。它仅适用于 .ttf
个字体文件。但我想还有一些其他服务可以更改其他字体文件扩展名。
对于文档或未来的访问者:在我的例子中,我正在用 IE11 和 .otf 字体试验这个问题,如果这是你的案例阅读此 Can I use case。基本上它说的是 IE11 不支持某些 .ttf 和 .otf 字体。
我找到的最佳解决方案是 将 .otf 字体转换为 .woff 并在 Jakub Holovsky 的回复中添加代码并稍加改动。
<staticContent>
<remove fileExtension=".woff" />
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
</staticContent>
我遇到了同样的问题并找到了这篇文章:https://creativemarket.com/blog/the-missing-guide-to-font-formats。 您可以将相关字体添加到 font-face.