Compressing fonts for using in web
Can fonts be compressed someway before using as webfonts? I have a font file which is 150kB. Is it possible to 开发者_StackOverflow中文版compress it down.
And also if i call for both font .eot
and .ttf
will both be downloaded by browsers?
If you use the FontSquirrel @font-face kit generator - http://www.fontsquirrel.com/fontface/generator - and choose the expert setting, you can manipulate the settings to achieve a little better compression.
You can compress .woff
font files with https://github.com/hn/woff-compress. It uses zlib's Z_BEST_COMPRESSION flag or Zopfli to losslessly shrink files down to a minimum.
If you want to lossy reduce files even more, you can remove unneeded glyphs from the font as discussed in Way to reduce size of .ttf fonts?.
精彩评论