ios - 没有出现在 iphone 和 firefox 上的 webfont

标签 ios css firefox svg webfonts

你好(抱歉我是法语,英语不好)

问题是使用的字体在 firefox 和 iOS 中都没有显示。

代码如下:

@font-face {
    font-family: 'ProximaNova-Regular';
    src: url('webfonts/2ACFD6_0_0.eot');
    src: url('webfonts/2ACFD6_0_0.eot?#iefix') format('embedded-opentype'),
    url('webfonts/2ACFD6_0_0.woff') format('woff'),
    url('webfonts/2ACFD6_0_0.ttf') format('truetype'),
    url('webfonts/2ACFD6_0_0.svg#wf') format('svg');
}

对于正文元素:

font: normal 1.25em/1.2 ProximaNova-Regular;

我为 iOS 尝试了几种方法:

AddType image/svg-xml svg
AddType image/svg-xml svgz

对于火狐:

<FilesMatch "\.(ttf|otf|eot|woff)$">
  <IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
  </IfModule>
</FilesMatch>

我还检查了 .svg 文件,字体标签上有 id wf。

谢谢

最佳答案

网络字体也不会出现在 Chrome 或 IE 上。原因很简单,引用的字体资源不存在,即http://www.anthonyblochet.fr/css/webfonts/2ACFD6_0_0.woff这样的网址导致 404 Not Found 响应。

关于ios - 没有出现在 iphone 和 firefox 上的 webfont,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23455713/

相关文章:

ios - 如何在 iOS 中通过 Twitter API 获取用户电子邮件地址?

ios - 调用文本字段委托(delegate)之前需要的键盘高度

javascript - 使用 current_user 设置 CSS 类

html - 为什么此 CSS 代码在 Firefox 和 Chrome 上工作时在 IE 10 中不起作用

html - Firefox 在呈现大型 html 表格(20,000 多行)时崩溃

ios - 为编程 UINavigationController 制作文件?

iphone - 具有自动布局的 UIView,获取他的大小

css - 使用 em 作为宽度和高度的测量单位进行 flex 设计

html - Flexbox 内容在 Firefox 中溢出

jquery - CSS 的 Firefox 兼容性问题