【发布时间】:2015-06-01 11:19:15
【问题描述】:
我想为我的网站使用一种字体,我进行了整体研究并发现了多种字体格式,现在我想知道标准格式是什么? 或者标准格式是什么?
.TTF (True Type Font)
.EOT (Embedded OpenType)
.OTF (open type font)
.SVG (Scalable Vector Graphics)
.WOFF (Web Open Font Format)
到目前为止,我已经使用了所有这些格式,如下所示:
@font-face {
font-family: 'Font';
src: url('Font.eot'); /* IE9 Compat Modes */
src: url('Font.eot?#') format('eot'), /* IE6–8 */
url('Font.ttf') format('truetype'), /* Saf3—5, Chrome4+, FF3.5, Opera 10+ */
url('Font.woff') format('woff'), /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
url('Font.otf') format('opentype'),
url('Font.svg') format('svg');
}
但是在这种情况下,网站太重了(所有格式的大小都差不多1MB),那么我应该怎么做才能更优化呢?
【问题讨论】:
-
您可以将 .ttf 用于所有其他浏览器,将 .eot 用于 Internet 浏览
-
Web 编程并不是要考虑和实施所有可以找到的替代方案。专注于你的目标:支持相关的浏览器。像 IE6-9 这样的东西当然可以忽略。使用 one 格式,woff 或 ttf 就是这样。不符合这些的浏览器不值得支持。
-
@priya786 你说的是 .ttf 和 .eot 吗?
-
是的,我只是希望你只使用这两种格式
-
@arkascha 有帮助..!!谢谢。