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 openjdk8-subpixel.zip file, unzip into an appropriate location, and point netbeans to use it by editing

/Applications/NetBeans/NetBeans\ 8.1.app/Contents/Resources/NetBeans/etc/netbeans.conf

adding or modifying the netbeans_jdkhome property like 

netbeans_jdkhome="/Users/tor/java/scratch/openjdk8/jdk/"

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.