Live data from Hacker News

Saving the Internet 2000TB a Day: Fixing Font Awesome’s Fonts

pixelambacht.nl

1–10 of 156 posts

Re: Saving the Internet 2000TB a Day: Fixing Font Awesome’s Fonts

#4
There are some really valid points in here and I dislike the idea of using the whole font when only a few icons are required.

But, isn't subsetting going to result in users now caching your subset instead of a cached copy of everything? I would think that does more harm than everyone grabbing a fully cached copy once from a cdn.

Re: Saving the Internet 2000TB a Day: Fixing Font Awesome’s Fonts

#6

There are some really valid points in here and I dislike the idea of using the whole font when only a few icons are required. But, isn't subsetting going to result in users now caching your subset instead of a cached copy of everything? I would think that does more harm than everyone grabbing a fully cached copy once from a cdn.

What an interesting thought. I wonder what the actual user base of a library would have to be before it would even itself out and then go over the threshold of where you would see a return. Certainly 74 million sites should do it if they were all using the same CDN but I have no idea how you would start to even try to calculate this.

Re: Saving the Internet 2000TB a Day: Fixing Font Awesome’s Fonts

#7

There are some really valid points in here and I dislike the idea of using the whole font when only a few icons are required. But, isn't subsetting going to result in users now caching your subset instead of a cached copy of everything? I would think that does more harm than everyone grabbing a fully cached copy once from a cdn.

The distribution of icons used is probably not uniform, so it's not like a worst case scenario of all misses all the time. Just the less popular ones.

Re: Saving the Internet 2000TB a Day: Fixing Font Awesome’s Fonts

#8

What's the argument against icon fonts? Using actual SVGs?

Yes 100% put your icons in an include file of svg defs.

There are a number of tools that will optimize svg files for size like svgo. Output straight from Illustrator, for example, has a lot room for improvement. I also usually end up hand-tweaking for things like removing the full style and doing that in my site's CSS.

What I think is really still needed are more options besides Illustrator for generating svg content. Yes, Inkscape is overall ok but is lacking in setup ease and genera speed.

There a number of programs that are so close to doing what is needed and then won't save or export an svg. Pixelmater, looking at you.

Re: Saving the Internet 2000TB a Day: Fixing Font Awesome’s Fonts

#9

What's the argument against icon fonts? Using actual SVGs?

- Font rendering is very inconsistent across platforms, so your icons can look pretty bad (e.g. on Windows)

- You're more likely to hit aligment/layout issues because you're using a tool designed for text to render pictures

- The character codes used are textual information but have no semantic meaning (this can be addressed by using ligatures or characters in the private unicode range)

- Adding more icons requires regenerating the font

- Using a subset of icons requires regenerating the font

- Font authoring is non-trivial and requires much more specialized tools and knowledge when compared to SVG

- You need to ship the font in various formats (TTF, OTF, WOFF, WOFF2)

- It's not easy to animate icons, or include colors or transparency

- By now SVG support is sufficiently widespread, so the original rationale for using font icons no longer applies

None of these, except maybe the rendering quality, are deal breakers. Workarounds and counterarguments do exist. And SVG does have some disadvantages too (e.g. parsing overhead, filesize, memory consumption)

I personally side with using SVGs currently. As technology progresses, I might definitely reassess my view.

Post reply on HN