I'm having problems getting the Netbeans font to look nice, this has been a problem ever since I tried Ubuntu ~8. For some reason fonts look like they're not getting subpixel smoothing in Netbeans only, for the rest of the applications they look perfect.
Look at how ugly the screenshot is:
It's not just the code area but every font in the application looks this way. I was looking around and apparently adding the following line to the .bashrc
file should fix the issue but in my case it didn't:
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=lcd'
It think it might only affect Java based applications, but I haven't been able to test another Java app to check the fonts out.
Does anyone know what can I do to fix this? How can I make Netbeans use the system font?
As has been stated in the comments, this is a problem with Java Swing apps on Linux. Swing does use Gnome's font smoothing settings (deactivated, greyscale or subpixel) - it disregards the hinting settings though. It always uses full hinting, and if you're running Ubuntu with little or no font hinting (as most people do since little hinting is the default setting) this will make the font appear significantly different than in other applications. SWT applications like Eclipse are fine, but if you like Netbeans this isn't gonna help you.
Caveat: For the following workaround I'm only talking about the editor font, because in an IDE that's what's important to me. You could also apply it to the menu fonts etc, but that might be a little over the top.
The only usable solution I found here : use Fontforge to edit your editor font of choice and remove all hinting information from the font itself, then save it as a new font and use that in Netbeans.
sudo apt-get install fontforge
edit -> Select -> Select all
to select all characterselement -> font info
to open the font info.fonts
directory in your home, through file -> generate fonts
, making sure to use a format that Ubuntu reads (see next step)fc-cache -rv
- following its output to make sure your new font file was picked up (e.g. .sfd
doesn't but .ttf
does).No, not perfect and yes, a bit of a hassle, but still a world of difference. Hope that helps.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments