firefox - 为什么 Firefox 中的网络字体不能在不同的域上工作?

标签 firefox fonts css font-face

我正在试验 fancy new OpenType font capability在 Firefox 3.5 中,我遇到了一个问题。我试图将字体嵌入到与使用它的页面不同的域中,但没有成功。我认为这可能是一个错误,但根据我在 MDC 引用页面上阅读的内容,我注意到了这条注释:

In Gecko, web fonts are subject to the same domain restriction (font files must be on the same domain as the page using them), unless HTTP access controls are used to relax this restriction.

看起来他们是故意这样设计浏览器的。出于好奇,他们为什么要这样做?嵌入字体有任何安全风险吗?还是为了合法的商标或版权问题?还是别的?

最佳答案

如果你想绕过它,你可以尝试将它添加到你的 .htaccess 中:

Header set Access-Control-Allow-Origin *

要回答您的问题,这可能与以下事实有关,即 Firefox 3.5 版支持 cross-origin sharing standard .

关于firefox - 为什么 Firefox 中的网络字体不能在不同的域上工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2541834/

相关文章:

javascript - 在 Javascript 处理后产生截然不同的 HTML 的示例网站

javascript - document.execCommand 在 FireFox 中出现奇怪的结果

css - Python-Sphinx:设置文本正文字体

HTML5 相对单位

html - 需要制作3列3行的<div>

javascript - 如何使用 angularjs 隐藏 HTML 页面中的 &lt;scripts> 和 <link> 标签?

html - 显示 :table-cell breaks child element width in Firefox

javascript - jquery-ui 检索在按钮集中选择的(复选框)-firefox 问题

python - matplotlib:我可以使用辅助字体来丢失字形吗?

ios - Xcode 中的自定义字体不起作用