This post is mostly for myself to remember what changes to make in IntelliJ IDEA. The problem is that fonts are ugly and not antialized in stock-IDEA. In my case it affects IDEA 13 and 13.1 so far.
The problem is still not completely solved, the fonts are looking better, but still not as good as in Eclipse. Don’t ask me why, I just don’t know.
After googling for a good while I came up with the following additions that improve how fonts are rendered:
In idea64.vmoptions add the following lines:
-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dsun.java2d.xrender=true
At the very end of idea.sh exchange the following line
eval "$JDK/bin/java" $ALL_JVM_ARGS -Djb.restart.code=88 $MAIN_CLASS_NAME "$@"
eval "/usr/lib/jvm/jdk-7-oracle-x64/bin/java" $ALL_JVM_ARGS -Djb.restart.code=88 $MAIN_CLASS_NAME "$@"
This is to make sure that Oracles JDK is used as there seems to be a problem with OpenJDK and fonts in IDEA (even though this works in Eclipse). Make sure you use the path that is correct for your JDK.
While at it I also increased the default memory settings and my complete idea64.vmoptions looks like this now:
-server -Xms256m -Xmx2048m -XX:MaxPermSize=512m -XX:ReservedCodeCacheSize=256m -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -XX:+UseCodeCacheFlushing -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dsun.java2d.xrender=true