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

*2016-10-12*

> Improve NetBeans font rendering on Gentoo Linux by enabling Swing antialiasing and configuring the look and feel in netbeans.conf.

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

To resolve the problem, locate `netbeans.conf`, usually in the `etc` directory of your NetBeans installation. Append the following options to the `netbeans_default_options` value, inside its existing quotation marks:

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

These options enable font smoothing for Swing components, with `lcd` selecting subpixel antialiasing. The final option, `--laf Metal`, selects the Metal look and feel for the IDE. You can also use another Swing look and feel, such as Nimbus.

Save the file and restart NetBeans to apply the changes.

