在字体表面声明中仍然需要eot,ttf和svg吗? [英] Are eot, ttf, and svg still necessary in the font-face declaration?

查看:253
本文介绍了在字体表面声明中仍然需要eot,ttf和svg吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Up util现在,我使用了Paul Irish的 bulletproof font-face sytax

Up util now, I've used Paul Irish's bulletproof font-face sytax

但我只是想在上支持.woff和.woff2文件caniuse ,它表示woff在IE9 +中受支持。大多数关于这个话题的文章是从2009年左右,在写这篇文章的时候是一个完整的7年前。我们真的需要继续声明ttf,otf,eot和svg,当woff现在享有这么广泛的支持吗?

But I was just looking at support for .woff and .woff2 files on caniuse and it says woff is supported in IE9+. Most articles on this topic are from around 2009, which at the time of this writing was a full 7 years ago. Do we really need to keep declaring ttf, otf, eot, and svg when woff now enjoys such wide support?

推荐答案

简短答案:不。

EOT仅与IE8和以下(虽然作为琐事:一路下降到IE4。IE实际上开创了网络字体)和SVG字体作为技术被放弃了,因为一旦真正的网络字体开始变得可用,限制是疯了。自2016年您只需要WOFF 。和WOFF2如果你想利用新的更好的版本的WOFF的只是成为一个w3的建议(当时

EOT is only relevant for IE8 and below (although as trivia: all the way down to IE4. IE actually pioneered webfonts), and SVG fonts as technology were abandoned because the limitations were insane once real webfonts started to become available. As of 2016 you just need WOFF. And WOFF2 if you want to take advantage of the newer better version of WOFF that only just became a w3 recommendation (at the time of this answer).

另请注意,截至2016年1月12日,Microsoft停止了对IE8及以下版本的支持,在IE9有限的支持:他们现在将只支持每个仍然支持的操作系统的最新可用的浏览器,意味着IE9不再支持Windows XP,因为XP本身已不再受支持,但在技术上仍然被人怀疑地支持,直到Vista SP2和Server 2008 R2分别在2017年和2020年达到扩展支持的终点。当然,对于Windows Server 2008的webfont支持是无关紧要的,大多数企业仍然使用旧版本的Windows跳过Vista,无论是在Windows XP(自己的危险)或Windows 7(我们几乎可以期望成为Windows 10在2016年7月,其中第29个是最后日期的人可以从7 / 8.1升级,但不可以从8升到10免费)。

Also note that as of January 12th 2016, Microsoft ceased support for IE8 and below, with limited support for IE9: they will now only support the latest available browser for each still supported OS, meaning that IE9 is no longer supported for Windows XP, because XP is itself no longer supported, but is technically still—begrudingly—supported until Vista SP2 and Server 2008 R2 reach the end of extended support in 2017 and 2020, respectively. Of course, for Windows Server 2008 webfont support is irrelevant, and most businesses that still use an old version of Windows skipped Vista, being either on Windows XP (at their own peril) or Windows 7 (which we can pretty much expect to all become Windows 10 in July of 2016, the 29th of which is the last date people can upgrade from 7/8.1—but not 8—to 10 for free).

对于TTF / OTF,不要在网上使用。即使WOFF仅是围绕TTF / OTF文件(具有可选压缩)的薄包装,在解码WOFF时产生字节对字节相同的文件,TTF / OTF是通用的(支持OpenType的系统)字体等等被更多地审查,特别是通过IE的版本。使用WOFF作为文件类型使其显式这是一个 w eb( o 笔) f > ormat),一种松弛形式的审查意味着一些字体,如果TTF / OTF验证检查失败仍然可以作为webfonts正常工作(由于并非所有需要的普遍性OpenType数据对于字体只在Web上下文中工作)

As for TTF/OTF, don't use them online. Even though WOFF is just a thin wrapper around a TTF/OTF file (with optional compression), yielding a byte-for-byte identical file when the WOFF is decoded, TTF/OTF are universal (OpenType-supporting system) fonts, and so are scrutenized more, especially by versions of IE. Using WOFF, which as a filetype makes it explicit this is a web (open) font (format), a "laxed" form of scrutiny means that some fonts that would fail a TTF/OTF verification check may still work just fine as webfonts (due to the fact that not all required-for-universality OpenType data is necessary for a font to work in just a web context)

在混乱中:hurray为进步的进程,只需使用WOFF。

In conlusion: hurray for the march of progress, just use WOFF.

这篇关于在字体表面声明中仍然需要eot,ttf和svg吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆