HACKER Q&A
📣 linkdd

Why would you prefer icon libraries over UTF-8 special characters?


I've used in many projects libraries like Font-Awesome, Ionicons, ...

But recently, I've found everything I need in UTF-8.

And the result is a huge reduction of the size of my asset bundle for my web applications.

Then, I must ask the question, why are those libraries so wide spread ?


  👤 uberman Accepted Answer ✓
How would you know for sure that a given font supports the given utf-8 character?

I know you could technically "look it up" but to get "reasonable" coverage I believe you would really need to stick with system/standard fonts.

As an example:

System fonts on major platforms typically support thousands of glyphs (but each is free to specify how) and while the intersections are bound to be almost complete, there are also differences.

This pales in comparison to most custom fonts such as those offered by Google and Adobe. Google's Roboto offers only about 300 glyphs and those are almost exclusively traditional "characters" not emoji or symbols.

With an "icon library" you know what you are getting and typically in a format that is standard across platforms.


👤 shervinafshar
Not an answer, but may be add "Ask HN" to the title?