Paul Irish建议加载字体的“防弹”方式是首先渲染EOT
,然后是WOFF
、TTF
,最后是SVG
。
@font-face {
font-family: 'Tagesschrift';
src: url('tagesschrift.eot'); /* IE 5-8 */
src: local('☺'), /* sneakily trick IE */
url('tagesschrift.woff') format('woff'), /* FF 3.6, Chrome 5, IE9 */
url('tagesschrift.ttf') format('truetype'), /* Opera, Safari */
url('tagesschrift.svg#font') format('svg'); /* iOS */
}
来源:http://www.html5rocks.com/en/tutorials/webfonts/quick/
然而,他没有解释为什么这是正确的顺序(我认为是性能)。有人可以详细说明吗?此外,质量差异是什么?例如,SVG
在 Chrome 中似乎产生更好的缩放/抗锯齿效果。