压缩在web中使用的字体 [英] Compressing fonts for using in web

查看:188
本文介绍了压缩在web中使用的字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

字体在用作网络字体之前可以压缩吗?我有一个字体文件是150kB。

Can fonts be compressed someway before using as webfonts? I have a font file which is 150kB. Is it possible to compress it down.

如果我同时调用 .eot .ttf 会同时被浏览器下载吗?

And also if i call for both font .eot and .ttf will both be downloaded by browsers?

推荐答案

http://www.fontspring.com/blog - 撰写这篇文章的人(Ethan)设置fontsquirrel是一个优秀的发电机。我推荐阅读他的帖子上的问题,并使用他的最终语法。

My fav resource for font stuff is http://www.fontspring.com/blog - the guy who writes this (Ethan) set up fontsquirrel which is an excellent generator. I recommend reading his posts on the issues and using his finalized syntax.

通常我不会有一个压缩的字体文件超过60kbs(woff和EOT压缩有时下降到大约20!)。浏览器的工作方式是从最后的@ font-face src向上加载,但会忽略某些类型。一旦他们找到一个字体文件,他们会明白它将加载 - 所以使用fontspring / fontsquirrel默认语法是一个很好的选择!

Normally I won't have a compressed font file of over 60kbs (woff and EOT compressed sometimes go down to around 20!). The way the browsers work is that they load from the last @font-face src upwards but will ignore certain types. Once they find a font file they understand it will load - so using fontspring/fontsquirrel default syntax is a really good option!

此外,如果你有任何问题,

Additionally if you have any issues with his syntax Ethan is very good at responding with advice!

参考下载: http://www.fontspring.com/blog/further-hardening-of-the-bulletproof-syntax#comment_333

这篇关于压缩在web中使用的字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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