Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ugly fonts in Java applications on Ubuntu

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

like image 338
Dmitry Avatar asked Jul 07 '13 07:07

Dmitry


People also ask

How do I make my font look better in Linux?

Inside the “Fonts” system settings area, look for “Use anti-aliasing” and set it to “Enabled.” Then, click the “Configure” button. From here the user can edit the way the font hinting and anti-aliasing is displayed on the system.

What fonts are available in Java?

Logical fonts are the five font families defined by the Java platform which must be supported by any Java runtime environment: Serif, SansSerif, Monospaced, Dialog, and DialogInput. These logical fonts are not actual font libraries.


2 Answers

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 
like image 191
Dmitry Avatar answered Oct 02 '22 17:10

Dmitry


Try adding

export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=gasp' 

to your ~/.bashrc

A more detailed discussion can be found here.

like image 33
MarcB Avatar answered Oct 02 '22 16:10

MarcB