Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Forcing anti-aliasing using css: Is this a myth?

Tags:

css

fonts

Recently a client has complained about the appearance of a system font in IE6. Basically th issue is that IE6 doesn't support font-smoothing/anti-aliasing (I know you can turn it on in an OS setting or something). But someone threw out this gem:

"You can force font anti-alias in css by using pt instead of px."

I did a quick POC in various browsers and saw no difference. I found one reference to it online, last post on this forum:

http://www.webmasterworld.com/css/3280638.htm

This sounds like the equivalent of a web developer urban myth, my feeling is it's BS. Has anyone ever encountered it?

like image 415
FriendOfFuture Avatar asked Apr 17 '09 19:04

FriendOfFuture


2 Answers

Oh yes you can:

-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-smoothing: antialiased; 

Source for Firefox, thanks Justin for the heads up.

like image 162
Ryan Brodie Avatar answered Sep 25 '22 21:09

Ryan Brodie


There's these exciting new properties in CSS3:

font-smooth:always; -webkit-font-smoothing: antialiased; 

Still not done much testing with them myself though, and they almost definitely won't be any good for IE. Could be useful for Chrome on Windows or maybe Firefox though. Last time I checked, they didn't antialias small stuff automatically like they do in OSX.

UPDATE

These are not supported in IE or Firefox. The font-smooth property is only available in iOS safari as far as I remember

like image 45
BaronVonKaneHoffen Avatar answered Sep 22 '22 21:09

BaronVonKaneHoffen