3 ms·
I'm not sure if the downvotes are because I like making fonts out of icon sets, (really: useful practice!) or because I went against SVG. Look, SVG is fine for
by noduerme 5y ago
I'm not sure if the downvotes are because I like making fonts out of icon sets, (really: useful practice!) or because I went against SVG.
Look, SVG is fine for moving shape files around if something won't handle EPS. But it's an all-purpose vector definition that is by design not optimized to any purpose. It's shitty for replacing fonts, backgrounds, or animations that could be done in more compact domain specific formats. As someone who came up doing animation in Flash, just... don't even bring up SVG. I'm a lot happier to animate all my beziers and points in code in something like PixiJS than lean into a bloated format designed for... what is SVG for? Uploading t-shirts to cafepress or something?
- bryanrasmussen 5y agodon't know about the downvotes, maybe it's the use of the slang. I guess I like SVG fine enough, but probably that is because I am unfamiliar with working intensively with other formats. on edit: when saying maybe it's the use of the slang it's just to indicate my general feeling that HN downvotes are an insoluble mystery, even someone as wonderful as I gets downvoted at times, and is that fair? The answer is no, it sure isn't.
- noduerme 5y agoHah. Well I know, you're never supposed to ask on this board. Sometimes I just get taken by surprise though... like, there are really people with strongly positive views about SVG out there? Now I'm curious who they are and why they like it.
- addaon 5y agoWhat's the story for accessibility in font-based icon sets? Do you bind the glyphs to long self-descriptive ligatures or something?
- noduerme 5y agoNo, generally we just have a few dozen at most per font, so we put them in the latin alphabet where they'll be relatively easy to find, and then keep a corresponding SCSS file where each is mapped to a single character of content by a descriptive name, similar to how FontAwesome does it.
- addaon 5y agoWhat does a screen reader do with that? Not familiar with SCSS.
- noduerme 5y agoThat's a reasonable question. I don't know. As a ::before content some readers might issue a verbal hiccup, but they're generally never used in inline text; they're isolated in a div tag of their own as graphical elements, the way an SVG graphic would be. I'm struggling to think of a case where they'd ever need to be read out loud, but if there was you could add aria tags. It's usually used inside a header or float that isn't meant to be printed or read aloud.