Fonts: set in css or let them default?
Generally, I set the font-family on my websites. Unless there is a good reason to do otherwise, I set them to standard sans-serif fonts, Arial and Helvetica, which are the defaults on most browsers on PC and Mac.
There is a reasonable argument that it should be up to the person viewing the page to decide on what font they prefer (assuming the site design doesn't actually require a specific font). In that case, not setting the font-family lets the browser use what was set as the default on their PC/Mac.
Thoughts on whether website designers should specify the font?
Typography is up to the designer, not the user. Having clear and legible type is a no-brainer, though, so it follows we want the user to have the fonts we choose on their computer, else the fallback font takes effect, assuming we have one set in our style sheet.
The danger of not declaring a font-family is that the user might have some strange fonts set as default, and your whole site will look pretty strange in Wingdings or Symbol. Unless I'm mistaken, the default font is Times New Roman, or just Times, not Arial or Helvetica. Regardless what it is, we are best to provide our own choice of font faces, starting from the one most preferred, down to the lowest common denominator, serif, sans-serif, or monospace.
Size is also important, and this is where the user setting is critical. We should not mess about with the font-size set by the user. I have friend with very limited vision, and she has her fonts set way up there in the 6-8 em size. For me to force a smaller font size on her would be an insult, and would lose me a visitor/user, in a banker's second.
The way to 'accept' the user settings is to declare, font-size: 100%, in the body element. This makes the size relative to their settings. Now you can scale it back to say 70 or 80 per-cent without fear. If the user wants it bigger, or smaller, they can adjust it in their browser.
The other thing to watch for is color. This is something you do want to take charge of since the user's own color settings could throw your pages right off. Start with a basic white background and black text in the body element, then dial in the colors your want within the content (as in set the bg and fg in the wrapper div, or content container.
Thanks for the response. I have always done pretty much as you suggest, but just recently got in a debate with a former co-worker on the issue.
Originally Posted by weegillis
If you're the designer, YOU choose the font. You just need to keep in mind that whatever font you choose is readable and looks good on the overall website
The rest has already been mentioned above
Tags for this Thread