Java Sub Pixel Solution Cleartype


Intended use:To override what text anti-aliasing settings are identified as being "desktop settings".
Introduced: 1.6
Default value:true.
How to use:Set on the command line or in a webstart jnlp file as one of the specified values below to control rendering hints used by Swing text.

Strictly this flag doesn't control Java 2D but is documented here because the values all directly map to Java 2D text antialiasing rendering hints values.

What the flag really does is override what the JRE reads from the user's desktop settings as the user's desktop antialiased text preferences. Swing instructs Java 2D to render Swing text to match that preference, so by overriding it you can control Swing text. This applies to standard Swing components (like JTextArea, JButton) in the Metal L&F (aka Java L&F) and native (Windows, GTK) Swing L&Fs. It should also apply to any custom component or L&F which picks up the same property.

For information on the desktop setting this overrides see AWT Desktop Properties

There aren't many reasons for you to specify this property but a couple are

The desktop setting you want isn't supported on your desktop (eg you want LCD text on Windows 2000)
JRE doesn't recognise your desktop setting (eg KDE)
You are automating testing under each of these conditions
System Property Value | java.awt.RenderingHint value
"off"|"false"|"default" : VALUE_TEXT_ANTIALIAS_DEFAULT