Java – Ugly fonts in Java applications on Ubuntu

javalinuxnetbeanspycharmUbuntu

Help me, please. It's screen of my Netbeans:enter image description here
PyCharm: enter image description here
How can I fix it? I use Oracle Java 7.
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

PS: For comparison my Sublime Text:enter image description here

Best Answer

So... Seems my problem is solved.

Step 1, Install and configure Infinality for better font rendering in Linux

sudo add-apt-repository ppa:no1wantdthisname/ppa
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install fontconfig-infinality

Step 2., Install OpenJDK7 with font fixes in Ubuntu

sudo add-apt-repository ppa:no1wantdthisname/openjdk-fontfix
sudo apt-get update
sudo apt-get upgrade

NetBeans: screenshot with improved fonts

Step 3: Applies nice font style linux

sudo /etc/fonts/infinality/infctl.sh setstyle linux