News for hackers. Stuff that matters.
Re:Prac­ti­cal Ty­pog­ra­phy by ggreer on Sunday November 18, 2018 @04:22PM (#18482610)
I agree that icon fonts are a hack, but the web is made of countless hacks. This specific one seems benign. Users won't notice or care whether you use icon fonts or images. Icon fonts are approximately the size of the equivalent images, they work alright across platforms, and they're pretty easy to use and deploy.
Re:Prac­ti­cal Ty­pog­ra­phy by danShumway on Sunday November 18, 2018 @10:51PM (#18484118)
It's not benign -- icon fonts are bad for accessibility because screen readers will read out the actual glyph unless you use pseudo-elements or extra markup. Additionally, many users on limited connections will turn off web fonts, and then your icons will break.

It's a hack that was necessary at one point, but has been largely displaced, like table layouts or image-based drop-shadows. SVG is just better nowadays[0]. You can even use the same pseudo-element tricks to insert them purely in CSS, which is yet another accessibility win.

[0]: https://css-tricks.com/icon-fonts-vs-svg/

Re:Prac­ti­cal Ty­pog­ra­phy by RandomInteger4 on Sunday November 18, 2018 @05:12PM (#18482772)
Maybe I'm mistaken, but f I recall correctly, I think the issue with icons as font was accessibility, rather the average user with full sensory capabilities.
Re:Prac­ti­cal Ty­pog­ra­phy by ggreer on Sunday November 18, 2018 @05:17PM (#18482792)
Similar to icon images, you'd use aria-label, aria-hidden, and title attributes.
Re:Prac­ti­cal Ty­pog­ra­phy by anoncake on Tuesday November 20, 2018 @11:57AM (#18495312)
At least in Firefox, the user can enforce their font preferences and ignore the fonts specified by the web page. Icon fonts break that.