How to use a data uri with @font-face in Firefox

こ雲淡風輕ζ 提交于 2019-11-30 22:13:31

In the end, the problem was that I used a woff font generator that produced an incorrect font. Safari and IE were able to read it, but Firefox and the latest version of Chrome rejected it since it contained some errors. By using a more recent woff font generator, I was able to make it work across all browser.

The correct woff font generator

http://people.mozilla.org/~jkew/woff/

For more detail, check that bugs report :

https://bugzilla.mozilla.org/show_bug.cgi?id=735556

I'd like to thank Jonathan Kew of Mozilla for providing the answer.

To cut down on HTTP requests, I subset and Base64 embedded a couple webfonts into my CSS (Font Squirrel @font-face generator, advanced settings, and for icon fonts I used icomoon.io).

Thinking I was really clever I served them from a static subdomain...No go in Firefox.

Turns out it was a restrictive cross-domain resource setting that is apparently unique to Firefox. When I uploaded the HTML5 Boilerplate 'standard' .htaccess file, it specifically permits it and it took care of the problem.

Hope it helps future readers, it stumped me for a while...sorry if my terms lack precision, I'm still pretty new at this (it is well explained in the H5BP .htaccess comments and docs).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!