Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html IE11 CSS3114:@font-face未通过OpenType嵌入权限检查_Html_Css_Fonts - Fatal编程技术网

Html IE11 CSS3114:@font-face未通过OpenType嵌入权限检查

Html IE11 CSS3114:@font-face未通过OpenType嵌入权限检查,html,css,fonts,Html,Css,Fonts,在IE11中,我的字体加载不正确。我想这就是我称呼他们的方式 @import url('https://fonts.googleapis.com/css?family=Roboto'); @font-face { font-family: Bebas; src: url("{% static 'publicnfx/fonts/BebasNeue Regular.tff' %}"),

在IE11中,我的字体加载不正确。我想这就是我称呼他们的方式

@import url('https://fonts.googleapis.com/css?family=Roboto');
            @font-face {
                font-family: Bebas;
                src: url("{% static 'publicnfx/fonts/BebasNeue Regular.tff' %}"),
                     url("{% static 'publicnfx/fonts/BebasNeue Regular.otf' %}");
            }
BebasNeue Regular.otf是未加载的字体。它适用于所有其他浏览器,如Firefox、Chrome、Edge,但不适用于IE11及以下浏览器

错误:

更新:

我在网上找到了此解决方案,但它不适用于我:

@import url('https://fonts.googleapis.com/css?family=Roboto');
            @font-face {
                font-family: Bebas;
                src: url("{% static 'publicnfx/fonts/BebasNeue Regular.tff' %}");
                src: url("{% static 'publicnfx/fonts/BebasNeue Regular.eot?#iefix' %}") format('eot'),
                     url("{% static 'publicnfx/fonts/BebasNeue Regular.otf' %}"),
                     url("{% static 'publicnfx/fonts/BebasNeue Regular.woff' %}") format('woff'),
                     url("{% static 'publicnfx/fonts/BebasNeue Regular.ttf' %}") format('truetype'),
                     url("{% static 'publicnfx/fonts/BebasNeue Regular.svg' %}") format('svg'),
            }

这很可能是因为我的字体文件夹中只有.ttf和.otf。

问题的原因是我没有为Internet Explorer使用正确的字体格式。

Internet Explorer在字体末尾使用字体格式
.eot
。在我的例子中,我使用的字体没有
.eot
文件格式,必须让人为我将
.ttf
重新格式化为
.eot

然后,我简单地使用新的文件格式向该字体添加了一个新url:

@import url('https://fonts.googleapis.com/css?family=Roboto');
    @font-face {
        font-family: Bebas;
        src: url("{% static 'publicnfx/fonts/BebasNeue Regular.tff' %}"),
             url("{% static 'publicnfx/fonts/bebas-neue-bold.eot' %}"),
             url("{% static 'publicnfx/fonts/BebasNeue Regular.otf' %}");
    }

可能是@04FS的复制品我已经在那里试过了所有的东西,但没有任何效果。寻找更新的解决方案。