IE8: Disable Cleartype

IE8: Disable cleartype?

From what I recall, Internet Explorer 7+ disables ClearType when a filter is set on an element

#target {
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=99)";
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=99);
}

Also, do consider that many users may find disabling ClearType to be annoying. Use sparingly!

Disable Cleartype (text anti-aliasing) in IE9

After a few days of searching, I found an MSDN Forums thread which pointed me to a solution here: http://www.softwareninjas.ca/dwrite-dll-wrapper

Follow the instructions on that page and you'll remove anti-aliasing from IE9 (at least the 32-bit version of IE which is the default IE, even on 64-bit Windows 7). I've tested it so far on a Win7 x64 laptop and it worked flawlessly.

Big thanks to Olivier Dagenais who built this. Here's a technical summary of how his solution works.

It's a two-step process. First, you need to disable ClearType in IE via a registry key. This is the same setting which was available in previous versions of IE, but it was removed from the IE UI because it stopped working in IE9.

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
"UseClearType"="no"

Second, now that ClearType is disabled, Windows will fall back to a non-cleartype anti-aliasing solution. Now that fallback anti-alising also needs to be disabled. Quoting from the thread above:

What is left is the font smoothing
(aka sub-pixel rendering), and that is
the "blurring effect" you still see
after turning cleartype off.

In case you were wondering, there is a
way to turn that off too.

The method i used to turn off the
sub-pixel wonder is to build a simple
wrapper for dwrite.dll which
intercepts and forwards calls to the
real dwrite.dll, disabling font
smoothing in the process.

You can download it from: http://www.softwareninjas.ca/dwrite-dll-wrapper

You can find the code at
https://softwareninjas.kilnhg.com/Repo/Open-Source/Group/DWrite-dll-Wrapper

This was a pretty cool hack. Probably somewhat brittle across windows and DirectX releases, but will do the trick for now until Microsoft gets their act together to fix the underlying "can't disable anti-aliasing" problem in IE itself.

It also works for apps which use the IE WebBrowser control (aka MSHTML), so you can control anti-aliasing on an app-by-app basis. It also works for the HTML Help viewer.

Note that the text quality in IE9 standards mode isn't ideal. Specifically, small fonts sometimes have letters sometimes run together without the usual one-pixel space between them. If you render the same page in compatibility mode (or your site uses a non-strict DTD or other non-standards-enforcing DTD), then it looks fine. So there's an additional step for some sites if they want the best aliased text rendering: just view a site in compatibility mode by pressing the compatibility button in IE's toolbar.

Can you re-enable ClearType on IE8 after using a filter?

There is no way to enable ClearType after using a filter.

Filters should be avoided when possible due the limitations that they cause.

IE8 and VS2008: How do I disable script debugging?

It's annoying, but you can do this per session:

  1. Start debugging your website, F5
  2. In the top menu, go to Debug;Windows;Processes
  3. In my Processes window, there are two processes, one for IExplore:script and one for WebDev.WebServer.EXE:Managed. Right-click the IExplore:script lineitem and select Detach Process.

UPDATE

The link that Nicholas provided explains that installing the Silverlight SDK and then enabling Silverlight debugging for your web project (a checkbox on the bottom of the "Web" tab in the property pages) will prevent the script debugger from attaching to the IE process. Basically, you can't debug both at the same time, and the Silverlight option takes precedence. The link also provides several registry tweaks to partially or fully disable script debugging.

I started using the Silverlight workaround technique after I posted this answer, so I was coming back to update it when I saw that the OP found the same solution. Since this answer was accepted and awarded a bounty but didn't really answer the question, I hope this update gives the answer a tiny bit more merit.

Filters, IE, body and fonts

That looks very much like a proprietary Microsoft filter. Unless you know that 99% of your website users use ie, don't use those filters. Of course, if you are using this in an ie-specific style-sheet, to complement another style-sheet for proper browsers, you can use that filter without ruining your market.

Either way, I would highly recommend not using an ie-specific filter (or anything ie-specific really). Instead you should recommend to your users subtly to change to a more compliant browser, with less security holes and privacy-concerning back doors.

What do I have to disable in order to prevent poor font rendering in IE8 using the jquery Isotope plugin?

See Isotope's author on font rendering issues here scrolling down to "Pitfalls and issues". I remember the issue being related to the CSS transitions and that providing a background colour seemed to solve the issue. Also this SO question may point you towards a solution; the issue there was also CSS transitions related, if I remember correctly.



Related Topics



Leave a reply



Submit