@font-face failed OpenType embedding permission ch

2019-01-21 21:44发布

This exception occurs in here. You can reproduce it in IE11. So far I have not found the cause of the issue. Any ideas why this is being caused?

enter image description here

CSS3114: @font-face failed OpenType embedding permission check. Permission must be Installable. File: 53d9eae5-63b4-48d7-a5b8-3419455028bb.ttf

The web site is running on Azure Websites platform and is using ASP.NET MVC 5.

5条回答
做个烂人
2楼-- · 2019-01-21 22:26

sibaspage answer pointed me into the right direction. But I still see the error message in IE11. For me it worked using the following syntax:

@font-face {
   font-family: 'Font-Name';
   src: url('../fonts/Font-Name.eot?#iefix') format('embedded-opentype'),
        url('../fonts/Font-Name.ttf')  format('truetype');
}
查看更多
家丑人穷心不美
3楼-- · 2019-01-21 22:29

Another solution can be change the Font embeddability property file. Right click and see Details tab:

enter image description here

If this property does not appear, you can use this service to add it. It only works for .ttf font files. But I guess there are some other services to change other font file extensions.

查看更多
爷的心禁止访问
4楼-- · 2019-01-21 22:37
@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;
}

Notice src: local('☺'),

查看更多
走好不送
5楼-- · 2019-01-21 22:40

Fixed by adding

<staticContent>
  <mimeMap fileExtension=".woff" mimeType="application/octet-stream" />
</staticContent>

under

 <system.webServer>

in web.config.

Edit:

to prevent any problems with consequent releases I recommend doing this:

<staticContent>
      <remove fileExtension=".woff" />
      <mimeMap fileExtension=".woff" mimeType="application/octet-stream" />
</staticContent>
查看更多
甜甜的少女心
6楼-- · 2019-01-21 22:44

IE not supports .ttf just use .eot font files

@font-face {
  font-family: 'Font-Name';
  src: url('../fonts/Font-Name.eot?#iefix') format('embedded-opentype');
  src: url('../fonts/Font-Name.ttf')  format('truetype');

}

查看更多
登录 后发表回答