是不应该使用iconfont

上网、浏览、聊天、下载等
回复
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

是不应该使用iconfont

#1

帖子 eexpress » 2014-02-15 15:11

http://ianfeather.co.uk/ten-reasons-we- ... nt-to-svg/

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

svg的多好。调色,动画。
● 鸣学
头像
枫叶饭团
帖子: 14683
注册时间: 2010-06-16 1:05
系统: Mac OS X
来自: Tencent
联系:

Re: 是不应该使用iconfont

#2

帖子 枫叶饭团 » 2014-02-15 15:14

svg的话,那不就成一个一个文件了?
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

Re: 是不应该使用iconfont

#3

帖子 eexpress » 2014-02-15 15:22

应该是CSS3的规范吧。svg足够小,嵌入html了。远程字体,不也要嵌入嘛。当然,如果是IE<7,是不行的。
● 鸣学
头像
luojie-dune
帖子: 22033
注册时间: 2007-07-30 18:28
系统: Linux
来自: 空气中

Re: 是不应该使用iconfont

#4

帖子 luojie-dune » 2014-02-15 15:23

svg 耽误性能。
『这个世界都是我的 ,我爱你们』

ENTP ⥂ INTP ⥄ INFP ⇦ INTJ

在此发布的文章使用 Creative Commons Attribution-ShareAlike 4.0 协议
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

Re: 是不应该使用iconfont

#5

帖子 eexpress » 2014-02-15 15:26

你分析下icon font不耽误性能。lol
● 鸣学
头像
luojie-dune
帖子: 22033
注册时间: 2007-07-30 18:28
系统: Linux
来自: 空气中

Re: 是不应该使用iconfont

#6

帖子 luojie-dune » 2014-02-15 15:28

svg 相对而言是请求多,在怎么说也比 font icon 体积大吧。。。
『这个世界都是我的 ,我爱你们』

ENTP ⥂ INTP ⥄ INFP ⇦ INTJ

在此发布的文章使用 Creative Commons Attribution-ShareAlike 4.0 协议
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

Re: 是不应该使用iconfont

#7

帖子 eexpress » 2014-02-15 16:58

不太可能。相同的要求下,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
● 鸣学
yellowxz
帖子: 1
注册时间: 2015-02-11 15:30
系统: Mac

Re: 是不应该使用iconfont

#8

帖子 yellowxz » 2015-02-11 15:36

你说的是错误的。相同要求字体小很多,即使是压缩后的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
回复