Hacker News new | ask | show | jobs
by Messiah_ 4070 days ago
What is the advantage of using this over pngs?
3 comments

PNG is raster and so they do not scale on various sizes (various devices and their screen-sizes), not to mention of the retina display that one needs to take care.

SVGs and/or Icon fonts are vector and scalable.

One extremely useful benefit is that you can change the text-size, color, etc just as you would with CSS on these fonts.
They will scale well with high ppi screens.
To be honest, the same can be said for svg images without the need to load a css file (4KB minified) plus a font file (55-230KB).

Specially taking into account that most places will use only a few of these icons.

I was only explaining the advantage over png. Great point about the use-case though. The average site is probably not going to offer 95 payment options/operators; a specialized svg library might be more appropriate.
An icon font generator/subsetting tool can produce a font file that includes only the icons that are needed.