Linux – Arch: Java “ugly” font bug

arch linuxfontsjava

I know this is a pretty common bug, however none of the solutions I could find helped me.

Fonts are ugly in Java applications

Here are two examples (Processing & PyCharm):

ProcessingPyCharm
(Astonishingly "Events" looks just fine here)

As I mentioned above, there are many solutions out there, but none of them fixed the problem for me:

How can I fix the font rendering?

Some useful (maybe?) information:

$ uname -a
Linux scriptim 4.10.10-1-ARCH #1 SMP PREEMPT Wed Apr 12 18:50:28 CEST 2017 x86_64 GNU/Linux

$ java -version
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on, -Dswing.aatext=true
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

Best Answer

Add _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on' to your /etc/environment file.

If you are running java applications from console, add export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on' to your .bashrc (if you run bash shell) or .zshrc (if you run Z shell).

Log out then log in again.

Related Question