3 ms·
Ask HN: 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 ?
- shervinafshar 7y agoNot an answer, but may be add "Ask HN" to the title?
- linkdd 7y agodone :)
- uberman 7y agoHow 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.
- linkdd 7y agoI can see how it would be easier to just use an icon library, and I will definitely consider that on each project. Yet, if I use only one or two icons from a library that weights near 10MB (Font Awesome Free is 8MB), when those icons are available as UTF-8 glyphs, is it still unreasonable ?
- uberman 7y agoI certainly don't think it is unreasonable at all. If you have a font that is widely available or if you like the icons implemented by the typical system fonts I see no reason not to use them.