Live data from Hacker News

Web Designers should all be using this idea by now: Font Icons.

somerandomdude.com

41–50 of 78 posts

Re: Web Designers should all be using this idea by now: Font Icons.

#41
post #37

I don't see this as more than a gimmick (a nice one, sure). You end up with mute, non-semantic icon names (single characters) in your CSS, single-color icons only. Vector graphics are nice, but then you might as well go for SVG. The one valid use case for this is limiting the number of roundtrips & requests. But in the long term, there'll be SPDY (or some other similar protocol) for that. And SPDY fixes the problem f…

And you can just inline svg in base64 anyway...

Re: Web Designers should all be using this idea by now: Font Icons.

#42

One nice bonus is that they can get text-shadows and any other styling your normal text could.

Then again, you could also do that in images. Especially if you have some graphic effects like feather, gradient and drop shadows, the advantage of client-side rendering is not entirely clear. If anything, it makes the site heavier to render. (sure, you get scaling for "free" because it's vector, but in many cases you don't need to use the same icons in multiple sizes on the same device/page, so you could do that as well offline and simply fetch the right image...)

Re: Web Designers should all be using this idea by now: Font Icons.

#43
This is a sloppy abuse of typefaces. You can already base64 your icons in CSS, and you can already package them in sprites automatically with tools like Compass.

This creates more problems than it solves. IE9 will have SVG and SVG support gets better every day.

Re: Web Designers should all be using this idea by now: Font Icons.

#44

There is another disadvantage of this approach: many times, icons carry no semantic information at all, just being a design thing. Therefore they are most often (and most correctly) implemented as a background image on a certain HTML element which does carry semantic meaning, like a link or a button. This approach introduces icons within the semantic markup and/or content, unless they're added by some script, which k…

Not true. You can use :before and :after pseudo-elements.

Re: Web Designers should all be using this idea by now: Font Icons.

#45

I really don't see that this is a good idea. Icons are by definition graphical, they aren't textual. I can see the draw of having vector icons; but we have other technologies for that. I know people are probably going to tell me an "SVG sprite" isn't possible, but I still maintain that abusing fonts and text like this is a bad idea, even if it does bag you cool CSS3 animations.

I agree but, SVG sprites are possible. I'm not sure what you mean?

Interner Explorer 9 will support SVG. SVG support is getting better every day.

Re: Web Designers should all be using this idea by now: Font Icons.

#46

I have been using this method for nearly a year on various projects and theme designs. The font icon method is incredibly useful when you want to give user the flexibility to change up the color of the icons. Plus, as mentioned using CSS pseudo elements with content should not effect modern screen readers. One of the disadvantages mentioned in the article is the file size, but it can be drastically optimized. My favo…

Why don't you use SVG in your case?

Re: Web Designers should all be using this idea by now: Font Icons.

#47
post #20

To me this seems like an ugly hack to get around flaws in the HTTP protocol. There was an article on HN yesterday about SPDY ( http://www.chromium.org/spdy/spdy-whitepaper ), a transfer protocol that allows multiple concurrent requests over a single TCP connection. This seems like the proper solution to the primary issue (requesting several small files is slower than requesting one large one). Also, as the design goa…

It's also an ugly hack to get around the fact that making production graphics for every single icon in every single size/color you may need introduces some serious friction to the development process.

That's only a problem if you lack the proper workflow. If you design your icons in Illustrator using the pixel grid, you can export at any size while remaining pixel-perfect.

Re: Web Designers should all be using this idea by now: Font Icons.

#48
post #13

They missed one obvious disadvantage - it doesn't work where users force their browser to use a specific font. All I see are letters instead of icons. That said, would it not also make more sense to use codepoints within the "Miscellaneous Symbols And Pictographs" range where possible ( http://unicode.org/charts/PDF/U1F300.pdf ), where you'll find things like volume icons, padlocks, pins, etc. These are missing from…

You're describing a weird place where you want to display a semantic document (the html) using some non-semantic style rules (css, specifically :before and :after) and not others (@font-face) and then interpret the result as a whole semantically. If you want to browser-set font colors, you're going to have a hard time when they match CSS set background colors.

I don't force the font colour in my browser, but I do force the font face, as I have trouble reading sans serif type. (Although I could see why someone might want to force the colours in their global stylesheet for accessibility reasons.)

Personally, I'm not particularly fond of the use of :before, etc. either (they should be used for purely decorative purposes - the examples in the article seem to be using them to convey meaning), so what I'm suggesting doesn't really make much sense. :P

Re: Web Designers should all be using this idea by now: Font Icons.

#49
I like this idea, for simple icons. Standard Unicode code points for symbols could be used to even allow screen readers to read them!

Another alternative for pages with simple icons is to use the Data URI scheme:

  
This compresses very well with HTTP content encoding when the same icon is repeated in multiple places in the page: http://en.wikipedia.org/wiki/Data_URI_scheme
Post reply on HN