分页: 1 / 1

是不应该使用iconfont

发表于 : 2014-02-15 15:11
eexpress
http://ianfeather.co.uk/ten-reasons-we- ... nt-to-svg/

github就使用一堆octicon,taobao使用iconfont。这些元素兼容不好。

svg的多好。调色,动画。

Re: 是不应该使用iconfont

发表于 : 2014-02-15 15:14
枫叶饭团
svg的话,那不就成一个一个文件了?

Re: 是不应该使用iconfont

发表于 : 2014-02-15 15:22
eexpress
应该是CSS3的规范吧。svg足够小,嵌入html了。远程字体,不也要嵌入嘛。当然,如果是IE<7,是不行的。

Re: 是不应该使用iconfont

发表于 : 2014-02-15 15:23
luojie-dune
svg 耽误性能。

Re: 是不应该使用iconfont

发表于 : 2014-02-15 15:26
eexpress
你分析下icon font不耽误性能。lol

Re: 是不应该使用iconfont

发表于 : 2014-02-15 15:28
luojie-dune
svg 相对而言是请求多,在怎么说也比 font icon 体积大吧。。。

Re: 是不应该使用iconfont

发表于 : 2014-02-15 16:58
eexpress
不太可能。相同的要求下,svg可能更小,别忘记他们都是矢量,而且如果用过fontforge,就知道画字符的局限性很大,按照填空的方法来判断显示与否的。而且写入html时候,兼容更容易。

Use an Icon Font if:
Your graphic is very simple
You only need one color
You need to modify some of the attributes via CSS

Use an SVG image if:
You need full color capabilities
You don’t need IE8 support (there are some workarounds to this)
Your image is fairly simple – especially if you are setting it as the background image

Re: 是不应该使用iconfont

发表于 : 2015-02-11 15:36
yellowxz
你说的是错误的。相同要求字体小很多,即使是压缩后的svgz。我用过FontForge,字体不是你想的那样填空,那是icon的画法。而是用曲线来勾勒字的轮廓。最常用的是贝塞尔曲线。实际应用中用FontForge做一次简化能够在原先的基础上将字体再压缩接近一半。
eexpress 写了:不太可能。相同的要求下,svg可能更小,别忘记他们都是矢量,而且如果用过fontforge,就知道画字符的局限性很大,按照填空的方法来判断显示与否的。而且写入html时候,兼容更容易。

Use an Icon Font if:
Your graphic is very simple
You only need one color
You need to modify some of the attributes via CSS

Use an SVG image if:
You need full color capabilities
You don’t need IE8 support (there are some workarounds to this)
Your image is fairly simple – especially if you are setting it as the background image