Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IE8: Disable cleartype?

Tags:

For IE7, it's possible to add

filter: none; 

to the body css to disable cleartype on fonts through CSS. I don't like the fuzzy look it gives, and it isn't really consistent across browsers. IE; Firefox and IE6 show it differently.

IE8 however, seems to ignore the css option, even when forcing the browser into IE7 compatibility mode using:

<meta http-equiv="X-UA-Compatible" content="IE=7" /> 


TL;DR: How do I disable clear-type fonts in IE8 through CSS?

like image 780
Daniel Sloof Avatar asked Jun 23 '09 09:06

Daniel Sloof


People also ask

What does ClearType edition mean?

ClearType is a software technology developed by Microsoft that improves the readability of text on existing LCDs (Liquid Crystal Displays), such as laptop screens, Pocket PC screens, and flat panel monitors.


2 Answers

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!

like image 130
rpetrich Avatar answered Sep 21 '22 07:09

rpetrich


You can't. ClearType is a user setting on the browser. Any CSS which would disable it for certain elements is most likely a bug, not a feature (I've noticed it gets disabled for some dynamically generated or animated elements) and shouldn't be relied upon.

Whatever your preference in this regard is is probably not the user's one who sees your site. So why bother? Whoever doesn't like ClearType probably has it disabled already.

Note: The reason why it works with filters is that filters are not rendered by the browser but something else (DirectX probably, considering the "DX" in there. I'd still consider that a side-effect, and not a feature).

Note 2: Fixed as of IE 9, as expected. This really is a battle you can only lose, as many have told you before except you wouldn't listen.

like image 32
Joey Avatar answered Sep 19 '22 07:09

Joey