4 ms·
Fonts are not the gold standard. They have some advantages (mostly convenience of bundling) and some disadvantages (reliability/compatibility, and functionality
by chrismorgan 6y ago
Fonts are not the gold standard. They have some advantages (mostly convenience of bundling) and some disadvantages (reliability/compatibility, and functionality). One of the disadvantages is that they’re much more likely to simply not load—fonts are supposed to be optional, and most browsers have a “don’t use the fonts the web page specifies, use my own set of fonts” setting. And the other huge disadvantage is that you’re mostly limited to monochrome icons (styleable multi-coloured text support in the one file is somewhere between non-existent and patchy, can’t remember exactly where). Overall, I’d consider one of the inline SVG variants to be the gold standard in terms of functionality and compatibility, though optimal developer ergonomics require some sort of build tool.
- brundolf 6y agoBy "gold standard" I meant "default practice", at least in the web world. The web's most popular icon set - FontAwesome - even has "font" right in the name.
- chrismorgan 6y agoTrue, there are a couple of different senses in which “gold standard” has come to be used. I was treating it as “the benchmark by which all else is compared”. But even so, I’d strongly disagree with any claim that a default practice exists for icons on the web. Images PNG, images SVG, background images PNG, background images SVG, inline SVG of a couple of varieties, icon fonts: all of these are extremely widely used, and none is in any way “standard” (let alone a reference paragon). Funny you should mention FontAwesome. I don’t know what direction they’re taking it in, but I look at how they’ve deployed the icons on their site, and… I’m seeing a lot of inline SVG.