Monday, August 1, 2016

Subpixel Font Rendering with OpenJDK 8 on macOS

Here is an openJDK 8 build patched to support proper (and fairly fast) subpixel font rendering on OSX, based on the new subpixel rendering code available in openJDK 9. The patches implementing this are available from the webreview for the JDK bugs 8087201 and 8023794. The sources for these patches are available here: here and here.

In addition, I have patched with this minor patch which turns off checking if an AWT surface is translucent or not, since I use this JDK with netbeans. The current code causes rendering artifacts with transparent surfaces, but this is not really a big issue when running netbeans.

I am not experienced with packaging openJDK into an installer, so am only providing a zipped file of the resulting built JDK.

To use with netbeans, download the file, unzip into an appropriate location, and point netbeans to use it by editing


adding or modifying the netbeans_jdkhome property like 


or similar, depending on where you unpacked the zip file to. 

Edit: I've updated the JDK build to include a scroll fix for macOS sierra on retina screens. Download here.

Edit 2: Latest openjdk8 build from 2016-12-14 is now available for download here.


  1. Thanks for this! I was experiencing 1-2 second lag times on the recent nightlies with a top of the line MBP and no resource bottlenecks. This patched JDK has brought lag down to about a 0.25 seconds.

    1. Nice, that speedup must be due to the bug for the 8087201 issue. With this speedup I regularly use the integrated graphics over nvidia in my 15" mbp as it's just as fast and uses less battery.

  2. This comment has been removed by the author.

  3. Amazing... finally...
    Tested with NetBeans 8.1 in 10.9 (Mavericks) and 10.11 (El Capitain) (XQuartz needed).
    Many thanks.

  4. Recommend adjusting the font contrast slightly, adding this parameter to netbeans_default_options in /Applications/NetBeans/NetBeans\