Hacker News new | ask | show | jobs
by joshuacc 5718 days ago
"Never use fonts and just hope a user might have it."

I would question that statement. Specifying fonts a user "might have" is the entire basis of normal CSS font selection.

There's absolutely nothing wrong with specifying a somewhat unusual first choice. That's what fallbacks are for! For instance:

font-family: "Adobe Myriad Pro", Myriad, Georgia, Times, Times New Roman, serif;

Just make sure that you order them from most desirable to least desirable and it will display the best installed font.

1 comments

You are certainly right about that. I should have added more context to what I was thinking when I wrote that.

I was thinking more along the lines of having some non standard font on your computer that would differ greatly from a common web-font, specifying that as the top choice in a font stack, and then designing your site using that font. Which I was thinking was essentially the goal of the OP.

I think your font stack example isn't quite as extreme as I was thinking in my head. Even still, your example has two sans-serif fonts that may/may not be on a users computer, with your fall back choices then being serifed fonts. Already, that font stack is setting your site up to present some very different designs to various visitors. That font stack would fare better if it was something like font-family: "Adobe Myriad Pro", Myriad, Lucida Sans Unicode, Lucida Grande, sans-serif;

If you are going to pick a non-standard font to use without font embedding, then your fallbacks should be web-safe fonts that are similar in design and in rendering size. Exotic Font Y at 16px can look much different from web-safe Font Z at 16px.

So, if a very small percentage of your users will have an exotic font installed that you want to use, and you aren't embedding that font for others to use, then you are setting yourself up for design/rendering problems for all of the people who have to use the fallback. It just ends up looking goofy and unprofessional, as well as being a bear to get to render nicely for both varying font styles in a "pixel perfect" design. Font stacks should be about trying to get the same experience across multiple platforms and browsers, not 30% get the best experience and 70% get a crummy degraded experience.

Ha! Sorry about the confusion. I meant to type Minion, not Myriad.

I definitely agree that you should be designing with the majority in mind. But if you set up good fallbacks then you can get 30% with fantastic type and 70% with quite decent type.

I don't tend to do "pixel perfect" design. I prefer designing in the browser, but can see how the traditional approach would make things difficult.

Right on :) I've been tasked lately with a lot of "this needs to look the same for everyone on every platform" pixel perfect sort of stuff, so I have had to deal with getting everything the same and haven't had a lot of leeway. If you have the opportunity to give that 30% fantastic typography, and the other 70% still has a great experience, I'm definitely cool with that.