Skip to content

Instantly share code, notes, and snippets.

@stol
Created August 26, 2010 16:39
Show Gist options
  • Save stol/551731 to your computer and use it in GitHub Desktop.
Save stol/551731 to your computer and use it in GitHub Desktop.
#####
##### Easily enable clearType on windows.
#####
*** WHAT IT DOES ***
It asks the user to install an activex control, signed by microsoft.
This activex control allows cleartype options to be set using javascript.
The user only has to click on the installation banner in the upperside of the explorer window. Really better than having to go to the preferences panel :)
**** HOW TO ***
In your <head>, add :
<!--[if IE]>
<OBJECT id="CTAdjust" codeBase="http://download.microsoft.com/download/7/3/8/7384c441-3721-41ee-ae15-b678888f00dd/clearadj.CAB#version=1,0,0,1" classid="CLSID:43E3F87D-DE7F-4087-BD4F-0DC854981158" VIEWASTEXT></OBJECT>
<![endif]-->
In your javascript, add :
if( typeof(CTAdjust) != "undefined"){
CTAdjust.SmoothType = 2;
CTAdjust.Orientation = 1;
}
*** Voila ! ***
- Alexis "Stol" F.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment