Webfont 的兼容性问题[持续更新]
2015-04-03 11:12
204 查看
低版安卓手机的 webview 显示不了,另外黑莓手机显示出来是这样:
生成工具:
离线字体生成工具:webfont
在线字体生成平台:icomoon.io, iconfont.cn均有问题
其他一些生成平台的反馈:
解决办法:
1. IE不加载字体,开发工具报错(Webfonts are not loading in IE9)
If you are serving from Apache, you can add this to you .htaccess file to allow your site access to the fonts:
Or even better, since the above code will allow anyone to leach:
Just swap out your calling domains for the placeholder ones above.
2. Chrome v33 (How to Fix Google Chrome Web Fonts Issue)
生成工具:
离线字体生成工具:webfont
在线字体生成平台:icomoon.io, iconfont.cn均有问题
其他一些生成平台的反馈:
解决办法:
1. IE不加载字体,开发工具报错(Webfonts are not loading in IE9)
同源策略 Same Origin Restriction
Internet Explorer 9 has strict requirements for where the font resides in relation to the website. It requires that all font assets be served from the exact same domain as the calling website.If you are serving from Apache, you can add this to you .htaccess file to allow your site access to the fonts:
<FilesMatch "\.(ttf|otf|woff)$"> <IfModule mod_headers.c> Header set Access-Control-Allow-Origin "*" </IfModule> </FilesMatch>
Or even better, since the above code will allow anyone to leach:
<FilesMatch "\.(eot|otf|woff|ttf)$"> SetEnvIf Origin » "^http(s)?://(.+\.)?(domain1\.org|domain\.com)$" origin_is=$0 Header set Access-Control-Allow-Origin %{origin_is}e env=origin_is </FilesMatch>
Just swap out your calling domains for the placeholder ones above.
MIME Types
If you are serving fonts from Microsoft IIS, you may need to add WOFF to your list of MIME types if IE9 is trying to load them. There is no defined MIME type yet for WOFF, but "font/x-woff" is confirmed to work.2. Chrome v33 (How to Fix Google Chrome Web Fonts Issue)
相关文章推荐
- Android系统兼容性问题(持续更新)
- win10_x64更新错误解决: 安装一些更新时出现问题,但我们稍后会重试。如果持续出现这些问题,并且你想要搜索Web或联系支持人员以获取相关信息,以下信息可能会对你有帮助:
- JS兼容性问题总结(持续更新中)
- ie兼容性问题(持续更新)
- IE下常见兼容性问题记录汇总(04-持续更新)
- Vue+Webpack常见问题(持续更新)
- web应用下的安全问题以及tomcat/nginx对应解决方法(持续更新、亲测可解决问题)
- Java web 开发小问题总结(持续更新中)
- IE兼容性问题汇总【持续更新中】
- WEB前端面试问题汇总(持续更新整…
- 安卓WebView问题总汇(持续更新)
- 兼容性问题解决方案汇总(持续更新,欢迎收藏!)
- 常见的css兼容性问题---持续更新!!
- CSS总结及兼容性问题【笔记】【持续更新】
- Android Stock Browser Web App开发当中遇到的问题(持续更新)
- java web开发中遇到的问题及解决方案(个人学习日志,持续更新)
- ArcGIS Web Adaptor配置过程常见问题(持续更新)
- ORACLE学习中出现的问题(持续更新中)
- java2word 使用中问题集锦(持续更新中。。。)
- JSP版eWebEditor远程文件获取 持续等待问题解决方案