Koodoz Design

a blog about all things goudagood! Koodoz Design is a creative design studio based in Richmond, Melbourne. We help businesses unleash their full potential through visual communication and clever design.

Subscribe for a free feed! Mmmm…

@Font-Face Smoothing in IE

written by Marc Katsambis

16 Aug 2010

Fridge Magnets Spelling "Punch Me In The Face"

Oh Internet Explorer, how you hate us so….

Even when we’re trying to do something good you create another headache. We did a post about the great @font-face property back in May having an issue with Firefox and we thought we were clear of the woods with IE, but of course, it’s never that simple…

Thanks to this fantastic article by Michael Strand at AllCreatives.net, we found the most comprehensive solution to this problem, and also to Tweek on Flickr for the awesome picture of the fridge magnets.

Keeping web design tidy

When we implemented @font-face for the Koodoz site we were really pleased with the results, we managed to drop the aging sIFR image replacement technique and therefore dramatically reduce the amount of flash elements being loaded on our site and in turn drop a whole bunch of server requests, as well as slimming our site down by a few precious kilobytes. Nice and (as they say in Cardiff) tidy!

Knit picking with aesthetics always pays off in the end

What we didn’t notice straight away was that Internet Explorer has a problem with rendering the new fonts. While developing the Cardigan Store e-Commerce website for one of our recent Melbourne based clients, Knit Picker, we implemented @font-face early to incorporate the stylish and contemporary headings from our original website designs. It looked great in Safari, Firefox, Opera and Chrome, but soon enough it was time for some good old fashioned, character building IE bugs, and we noticed that our lovely elegant fonts now looked incredibly jagged, broken and well… crap. Take a look:

Embedded Font Smoothing Comparison on a PC and Mac

So after a little research we found that the problem lies with an Internet Explorer feature called ClearType, which is ironically put there to make fonts appear clearer to read on Windows systems. The issue with this is that IE is therefore trying to render our nice looking headings in a way that strips it of all its nice aliasing and smooth edges — not great look for our website design. This actually does some good for body text on Windows machines but it’s completely counter-productive for headings and places where we want our font to display as-is.

The fix

Luckily there is a solution! It lies with IE’s filter properties, which, when applied to an element will disable ClearType. However, we can’t just apply any old filter, IE8 actually needs a filter that works with the text in order to do this. Here’s an example:

h1 {
	font-family: 'Nice-Embedded-Font', Arial, Sans-Serif;
	filter: progid:DXImageTransform.Microsoft.
AlphaImageLoader(src=hIEfix.png,sizingMethod=crop); zoom: 1; }

The second property, zoom: 1; isn’t needed for IE8, but must be used for IE7 because of its hasLayout feature. What this basically means is that IE7 won’t apply a filter which is not flagged as having ‘layout’ applied to it. So by adding this property we can force IE7 to do so, and in turn recognise our filter property.

Smooth. Real smooth

The result isn’t 100% perfect, but then again, nothing ever is with IE. Lets take another look at the Cardigan Store headings:

Comparison of IE7 Embedded Font Smoothing Before and After the Fix

Ahhh, that’s much better. As you can see the difference isn’t drastic, but the fonts are a little smoother and less rigged, especially on the ‘Account Login’ title, which is far closer the original website design and much more closely knitted (excuse the pun) into the overall branding of the company and website.

This entry is filed under Klog. You can follow any responses to this entry through the RSS 2.0 feed.

You can leave a response, or trackback from your own site.


4 Responses to “@Font-Face Smoothing in IE”

  1. Julia: 19 August 2010

    Thank you!

    I also needed to make my @font-face paths relative (e.g. /wp-content/themes/livingin/css/james_fajardo-webfont.woff).

  2. Marc: 19 August 2010

    You’re welcome Julia :) James Fajardo is an old favourite of mine. NIce choice!

  3. Doug Avery: 18 September 2010

    I wanted to note that I love the results of this hack, but it can cause big issues in IE7 and IE8. We had a site where using it 3 times on a page was causing a 10 second rendering time increase in IE7/8…not so good. The increase is actually tricky to notice locally, because IE’s security settings disable the behavior in some cases. To test if your site is experiencing slowdown because of this hack, go to:

    Tools > Internet Options > Security > Custom Level > ActiveX Controls

    and enable the “Binary and Script behaviors”. Make sure the site you’re viewing is in the “zone” you’ve edited, you might need to add it to the Trusted area and make the change there.

  4. Andreas: 29 April 2011

    This is working fine with the standard zoom. But, if you use ctrl+mousewheel, you have the same problem.


Show your love: speak now…

Back to top!