Thursday, July 2, 2015

Subpixel font rendering with Netbeans on OSX

If you've been waiting to get subpixel font rendering with Netbeans on OSX, here a solution for you.

You will need to use current nightly Netbeans development branch (as of June 19th, 2015), and you will need to download, patch and build OpenJDK 9. Now, the latest build b70 support subpixel rendering, but not with translucent surfaces, which netbeans uses a lot of. When you're done, you will be able to get proper weighted fonts as shown above, with smooth scrolling even on a macbook pro with integrated Intel Iris Pro graphics hardware.

Here are the steps you need to take;

1. Download, patch and build OpenJDK 9

You can follow instruction here on how to do it, but I've outlined it below:

2. While compiling, listen to Mozart to prepare for the enlightenment. 

When the build is complete, the jdk home will be in the build/macosx-x86_64-normal-server-release/jdk/ folder. Now edit a file under your netbeans nightly folder, in my case 

vi /Applications/NetBeans/NetBeans\ Dev\ 

Add this line at the end of the file (modified for the exact location where you built openJDK).


Now you can start netbeans normally.