Ugly fonts in Netbeans - How can i make it use the system font?

Javier Villanueva

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:

enter image description here

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?

nem75

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.

  1. sudo apt-get install fontforge
  2. Launch Fontforge
  3. Open your font of choice
  4. Ctrl+A or edit -> Select -> Select all to select all characters
  5. Hints ⇒ Clear instructions
  6. Ctrl+Shift+F or element -> font info to open the font info
  7. Rename font (e.g. to original name + '_nohints')
  8. Save edited font in the .fonts directory in your home, through file -> generate fonts, making sure to use a format that Ubuntu reads (see next step)
  9. Clear font cache fc-cache -rv - following its output to make sure your new font file was picked up (e.g. .sfd doesn't but .ttf does).
  10. Run Netbeans and use the font you created as editor font

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.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Ugly fonts in Netbeans - How can i make it use the system font?

From Dev

How can I make a list-style-image scale with the list's font size, when we can't use glyph fonts?

From Dev

How can I fix the ugly fonts in java applications?

From Dev

How do I make DTCoreText use the System Font?

From Dev

How do I make DTCoreText use the System Font?

From Dev

How can i use malayalam ASCII fonts?

From Dev

How can I use this font?

From Dev

How can I install custom fonts using Bower? (not Font Awesome)

From Dev

How can I embed fonts with @font-face in Rails 4?

From Dev

How can I display Font Awesome fonts in Character Map?

From Dev

How can I make a payara netbeans integration

From Dev

How can I change the system font?

From Dev

How can i make exception handler to avoid of hanging my system when the font is not supported?

From Dev

How can I make fonts work correctly with ssh -X?

From Dev

How can I make fonts look like they do in Windows?

From Dev

how can i make Dejavu to support CJK fonts

From Dev

How can I refactor a set of ugly if statements?

From Dev

Are there any custom font-awesome generators that I can use for the latest fonts?

From Dev

How can I use google web fonts with phantomjs

From Dev

How can I "install" fonts to use in Visual Studio Code?

From Dev

How can I "install" fonts to use in Visual Studio Code?

From Dev

How can I use google web fonts with phantomjs

From Dev

Can I make ReText use a different font type for displaying code?

From Dev

Can I make Jupyter QtConsole use specific font?

From Dev

How can I make a static class in Netbeans IDE

From Dev

How can I make a static class in Netbeans IDE

From Dev

How can I make JDK 7 the default JDK in NetBeans?

From Dev

How can I find web-fonts with full range of font-weights?

From Dev

How can I setup font aliasing in operating system level

Related Related

  1. 1

    Ugly fonts in Netbeans - How can i make it use the system font?

  2. 2

    How can I make a list-style-image scale with the list's font size, when we can't use glyph fonts?

  3. 3

    How can I fix the ugly fonts in java applications?

  4. 4

    How do I make DTCoreText use the System Font?

  5. 5

    How do I make DTCoreText use the System Font?

  6. 6

    How can i use malayalam ASCII fonts?

  7. 7

    How can I use this font?

  8. 8

    How can I install custom fonts using Bower? (not Font Awesome)

  9. 9

    How can I embed fonts with @font-face in Rails 4?

  10. 10

    How can I display Font Awesome fonts in Character Map?

  11. 11

    How can I make a payara netbeans integration

  12. 12

    How can I change the system font?

  13. 13

    How can i make exception handler to avoid of hanging my system when the font is not supported?

  14. 14

    How can I make fonts work correctly with ssh -X?

  15. 15

    How can I make fonts look like they do in Windows?

  16. 16

    how can i make Dejavu to support CJK fonts

  17. 17

    How can I refactor a set of ugly if statements?

  18. 18

    Are there any custom font-awesome generators that I can use for the latest fonts?

  19. 19

    How can I use google web fonts with phantomjs

  20. 20

    How can I "install" fonts to use in Visual Studio Code?

  21. 21

    How can I "install" fonts to use in Visual Studio Code?

  22. 22

    How can I use google web fonts with phantomjs

  23. 23

    Can I make ReText use a different font type for displaying code?

  24. 24

    Can I make Jupyter QtConsole use specific font?

  25. 25

    How can I make a static class in Netbeans IDE

  26. 26

    How can I make a static class in Netbeans IDE

  27. 27

    How can I make JDK 7 the default JDK in NetBeans?

  28. 28

    How can I find web-fonts with full range of font-weights?

  29. 29

    How can I setup font aliasing in operating system level

HotTag

Archive