Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS: Is Helvetica the default 'sans-serif' font on Mac and Arial the default sans-serif font on Windows?

Tags:

html

css

I have a lot of CSS that does the following:

font-family: Helvetica, Arial, sans-serif;

It my understanding that Helvetica is the default sans-serif font on Mac and Arial is the default sans-serif font on Windows ... if that's the case, couldn't I just change the above code to be:

font-family: sans-serif;

Yes, no?

like image 503
Teddi Avatar asked Oct 27 '09 14:10

Teddi


People also ask

What is the default font of CSS?

Verdana is the default font used in W3. CSS. Verdana has a good letter spacing, and is easy to read.

Is Helvetica a default font on Mac?

Designed on a Mac, Helvetica Neue looks chic. But the Mac version of the font is proprietary to the Mac. It is installed at the system level in the “dfont” format.

What is the default serif font on Mac?

Times (also called Times Roman) is the traditional serif font. It is available on Macintosh and Unix computers, and is a core PostScript font. Times was designed for use as newspaper column text. It has a small size, compared to most other fonts.

Is Helvetica a default font on Windows?

Helvetica is not included as a default font on Windows computers. Many typefaces look like Helvetica that may already exist in your computer's font collection.


3 Answers

The default font really depends on the browser. For example, in Firefox on Mac, I have Lucida Grande as the default sans-serif font. I don't think I changed it, but I'm not entirely sure. You can't really depend on the defaults being specific fonts, as users can change them in the preferences. If you want a specific font, specify it.

like image 142
Samir Talwar Avatar answered Sep 18 '22 15:09

Samir Talwar


Helvetica on Windows XP looks horrible due to its poor rendering. Luckily, only a few people have Helvetica installed on Windows XP (because if they care about Helvetica, they’ll probably be using a Mac).

This is safer:

"Helvetica Neue", Arial, sans-serif;

That way, pretty much only Mac OS X will pickup Helvetica Neue (standard on OS X) and Windows can ignore it and move straight into Arial.

like image 41
Thomas Edwards Avatar answered Sep 21 '22 15:09

Thomas Edwards


With fonts, you want to be as specific as possible to prevent layout issues. Your page may look perfect on a machine with Arial as the default sans-serif font, but if someone has a very different font as their default, it can affect spacing of elements (if you use relative measures). Plus it makes any designer on the project angry when they see the wrong font, and you don't want that.

like image 26
Tom Avatar answered Sep 21 '22 15:09

Tom