Gentoo Linux: Ugly fonts in NetBeans and how to fix them

I recently installed Gentoo GNU/Linux + KDE 5 on my dev machine. One thing that was bugging me was the crappy font rendering in NetBeans.

To relolve the problem, locate your netbeans.conf file. Usually under /etc in your NetBeans installation folder, and append to netbeans_default_options the follwing:

-J-Dswing.aatext=true -J-Dawt.useSystemAAFontSettings=lcd --laf Metal

This will enable font smoothing in SWING and use default system settings for font smoothing. The last entry –laf Metal sets the preferred UI theme for the IDE, it should be Swing based theme such as Metal or Numbus.

Happy coding 🙂

Force KDM fonts DPI – openSUSE

If the fonts on your login screen are too big, usually due to attaching external monitor, edit /etc/sysconfig/displaymanager, and append -dpi # to DISPLAYMANAGER_KDM_LOCALARGS.

For example:

DISPLAYMANAGER_KDM_LOCALARGS="-dpi 75"

You should restart KDM (rcxdm restart) after doing so.