本文介绍了为什么Base64嵌入字体不能在IE11中工作,如果“字体下载”财产被禁用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以在面值上,这是有道理的 - 如果IE禁用字体下载,它不应该下载,罚款,我接受。 >然后 - 使用base64字体怎么样?这些都直接嵌入在CSS中/不要引用一个物理文件,因此不需要下载字体,对不对?

起初我以为也许IE11没有像/支持base64,但我可以验证它在那里工作,当我只使用base64字体选项。



我无法找到任何规格,或者在字体下载:禁用的广度上有很多信息。我看到一些类似的帖子,但没有答案,并没有问同样的问题。

任何人有更好的解释呢?




  1. >

    安全性

    数据URL中的数据解释与给定媒体类型的任何实现具有相同的安全性
    注意事项。
    应用程序不应该解释
    数据URL的内容,该数据URL标记有一个媒体类型,该媒体类型已被
    禁止用于应用程序的配置。


来源:


So at face value, this makes sense -- if IE disables "font download," it shouldn't download, fine, I accept that.

HOWEVER -- what about using base64 fonts? These are embedded directly in CSS / do not reference a physical file, therefore no font should need to be downloaded, right?

At first I thought that maybe IE11 didn't like/support base64, but I can verify that it does work there when I use only a base64 font option.

I wasn't able to find any specs on this, or much info on the breadth of what "font download: disable" really means. I did see some similar posts but with no answers, and not asking the same question.

Anyone have a better explanation for this?

解决方案

Per a memo on the base64 spec:

  1. Security

    Interpretation of the data within a "data" URL has the same securityconsiderations as any implementation of the given media type. Anapplication should not interpret the contents of a data URL which ismarked with a media type that has been disallowed for processing bythe application's configuration.

Sources: http://www.ietf.org/rfc/rfc2397.txthttp://sosweetcreative.com/2613/font-face-and-base64-data-uri

这篇关于为什么Base64嵌入字体不能在IE11中工作,如果“字体下载”财产被禁用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 15:10