Webkit Font Smoothing

With the latest versions of Google Chrome and Safari 5, we can now move away from the -webkit-text-stroke hack I had previously endorsed, and move to a much better solution.

Font Smoothing Example

As pointed out by Tim Van Damme, the Webkit nightly builds had added -webkit-font-smoothing which actually let us set the type of font smoothing we want instead of hacking the browser into the right setting. And now with Safari 5, this CSS attribute is available in a released version.

I’ve updated the resource on thinning text in Webkit to use this new technique, and have already updated this site’s CSS.

9 Comments

  • Webstandard-Blog

    Wow what a significant difference between default and antialiased smoothing! I think I have to download the new Safari-Version, to check that new feature.

  • pol moneys

    cool, thanks for sharing!

  • Daquan Wright

    Yep, check out http://www.cssbasics.com. Text looks horrid in FF for me, but Safari automatically smooths it out. Didn’t actually know what was happening when I first noticed this.

  • cna training

    Great site. A lot of useful information here. I’m sending it to some friends!

  • Christoph Zillgens

    I’d only recommend this for light text on dark background, like on your site. It seems that Safari 5 has improved the default font rendering for dark text on light backgrounds. I blogged about that here: http://christophzillgens.com/en/articles/-webkit-font-smoothing-reloaded

  • Vikash

    Thanks for the information..will help me as I was in a similar fix!!

  • brian

    hey all — this looks awesome in safari/chrome. but is there any known fix to get a similar effect going in firefox/gecko? specifically on the mac? in windows i know that cleartype will fix most jagged fonts, but system settings are out of our hands.

  • Alexander Støver

    Mmm, delicious new tricks. Keep writing them up!

  • Alex

    Nice, thanks for the information …

Have Your Say

Comments use textile. We won’t share your email or use it for bad. We promise. Anonymous comments may be deleted.

Remember, be polite and constructive.