Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Standardizing font-weight between OSX and Windows

I've read that OSX and Windows have two very different algorithms for rendering fonts. As such, it's a common issue that web fonts look "heavier" when viewing them in OSX than they do in Windows.

For example, this is the same font, on the same site, in the same browser, but on different operating systems:

enter image description here

Here's Arial exhibiting similar differences:

enter image description here

Is there any way of altering the rendering of fonts in either Windows or OSX so they look closer to each other? Or is there some other technique to deal with this difference?

like image 434
Chuck Le Butt Avatar asked May 02 '13 15:05

Chuck Le Butt


1 Answers

That font is a particularly bad example, I deal with a lot of fonts and have never seen one look like that. Keep in mind that people are used to seeing their fonts rendered a certain way on their own machines, and thus it is not your job to dictate how fonts should be rendered.

A few things to keep in mind are to only use weights you've included, for example, do not use font-weight: bold on a custom font-face if you haven't actually included the bold version of that font. "Browser bold" always looks messed up compared to the actual bold font.

Also, for some fonts, I find that I need to change the font-smoothing property for webkit browsers, as the default (subpixel-aliased) can look a little heavy. You can add this property to any element that uses the problematic font (even the body, if required).

-webkit-font-smoothing: antialiased;
like image 63
Christian Avatar answered Sep 21 '22 14:09

Christian