News for hackers. Stuff that matters.
Re:The Era of Symbol Fonts by potatolicious on Tuesday March 12, 2013 @10:19AM (#5361938)
I've been away from the frontlines of webdev for a few years now - is there a reason why we're not all using SVGs yet?

Symbol fonts (even though I use them myself in native mobile apps) seem like a bridge hack, not a sustainable, long-term thing.

It seems incredibly silly to model images as characters when we already have the concept of images built into HTML. I'd very happily ditch symbol fonts as soon as iOS supports SVGs...

Re:The Era of Symbol Fonts by masklinn on Tuesday March 12, 2013 @11:12AM (#5362300)
Individual SVG files take more bandwidth and requests than a single "iconic font" (SVG fragments are pretty much unsupported), and fonts can be hinted (though I've seen pretty little hinting for now) in order to alter the detail level as the font size increases.

Pretty much the only drawback of iconic font is that they're uniform-color (or bicolor if you play with the background)

Re:The Era of Symbol Fonts by skore on Tuesday March 12, 2013 @12:23PM (#5362827)
If you load them as an external file, yes. If you embed them, or use something like canvas - no.
Re:The Era of Symbol Fonts by masklinn on Tuesday March 12, 2013 @12:43PM (#5362974)
If you embed them you save on external requests and you blow up the host file's size instead, and hinder cacheability.
Re:The Era of Symbol Fonts by Chris_Newton on Tuesday March 12, 2013 @12:58PM (#5363088)
is there a reason why we're not all using SVGs yet?

In a word: hinting. For the same reasons that fonts designed for screen use are hinted, so it can be useful to hint icons that will be displayed at small sizes, and of course using a font format allows that but unfortunately SVG doesn’t.

Other practical reasons can include the ability to apply things like CSS shadow effects consistently to both the icon and any label text next to it, and backward compatibility with older IE versions that don’t fully support SVG.

Of course there are downsides as well. The use of tiny icons as UI elements tends to create more usability problems than it solves unless the icons are immediately recognisable, yet being restricted to the completely monochrome, flat appearance supported by font formats severely limits how distinctive you can make each icon. You also can’t swap out a highly detailed icon for a simplified version of the same idea at smaller sizes/lower resolutions. The article touches on these points, but SVG only really helps with the first one anyway.

So personally I’m a bit of a sceptic about the whole icon fonts idea, but it does have some technical advantages over using SVG icons in the limited niche where the icon font technique applies.

Re:The Era of Symbol Fonts by robin_reala on Tuesday March 12, 2013 @10:22AM (#5361956)
IE7 and 8 don’t support SVG - that’s the main reason.
Re:The Era of Symbol Fonts by ygra on Tuesday March 12, 2013 @10:44AM (#5362109)
They have VML, which suffices for simple icons, though.
Re:The Era of Symbol Fonts by ohwp on Tuesday March 12, 2013 @11:02AM (#5362236)
iOS does support SVG but I think it depends on the browser and how you embed it.

Maybe this page will help: http://www.schepers.cc/svg/blendups/embedding.html

Re:The Era of Symbol Fonts by potatolicious on Tuesday March 12, 2013 @11:07AM (#5362262)
I meant more specifically native apps - Apple's built-in image classes do not support SVGs out of the box as a valid file type.
Re:The Era of Symbol Fonts by ohwp on Tuesday March 12, 2013 @11:10AM (#5362287)
Neither does Android. But for both Android and iOS there are libs that can convert SVG into usable objects. For example: https://github.com/SVGKit/SVGKit
Re:The Era of Symbol Fonts by davej on Tuesday March 12, 2013 @11:03AM (#5362242)
Also, font symbols generally have a much smaller file size than SVGs.
Re:The Era of Symbol Fonts by ohwp on Tuesday March 12, 2013 @11:07AM (#5362260)
Are you sure? Compressing (deflate) image/svg+xml will make the file very small.
Re:The Era of Symbol Fonts by davej on Tuesday March 12, 2013 @12:03PM (#5362670)
Yes, even with compression. A GZIP'd SVG will be 2x or 3x the filesize (sometimes even more) of a GZIP'd TTF.
Re:The Era of Symbol Fonts by rjh29 on Tuesday March 12, 2013 @10:27AM (#5361993)
If you copy and paste the clock (or if a non-JS supporting screen reader or search engine encounters it), you get a time such as 12:04:37. That's pretty cool, and I'd be interested to know if SVG can do something similar.
Re:The Era of Symbol Fonts by potatolicious on Tuesday March 12, 2013 @10:32AM (#5362036)
That seems to be an incredibly fringe use case to justify the "wrong" implementation (i.e., modeling images as text when your protocol already has affordances for images).
Re:The Era of Symbol Fonts by cbr on Tuesday March 12, 2013 @10:43AM (#5362103)
With images you can use alt-text to support screen readers and search engines. I would be surprised if someone tried to copy-paste a clock, and if they did I think they would be expecting to get the picture and not a text representation of the time.