Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you enable anti aliasing in arbitrary Java apps?

Many Java Apps don't use anti-aliased fonts by default, despite the capability of Swing to provide them. How can you coerce an arbitrary java application to use AA fonts? (both for applications I'm running, and applications I'm developing)

like image 433
rcreswick Avatar asked Oct 07 '08 19:10

rcreswick


1 Answers

If you have access to the source, you can do this in the main method:

  // enable anti-aliased text:   System.setProperty("awt.useSystemAAFontSettings","on"); 

or, (and if you do not have access to the source, or if this is easier) you can simply pass the system properties above into the jvm by adding these options to the command line:

-Dawt.useSystemAAFontSettings=on 
like image 155
rcreswick Avatar answered Oct 01 '22 14:10

rcreswick