Skip to main content

Java 6, Mac OS and Substance

Posted by kirillcool on June 7, 2007 at 6:37 PM PDT

The topic of Apple being late to release the final JDK 6.0 for Mac is being discussed on the web in the past few months (see here, here,
here and
here for a small sample). One question that is always asked in return is what exactly is missing in the latest dev build (b88) that Apple has provided?

Dean Iverson has been kind enough to work with me to provide a AHIG-compliant implementation of Mac-specific font policy (based on the excellent initial work done by Karsten in Looks). After a few iterations, we made sure that the font family (Lucida Grande) and the font sizes match the AHIG guidelines (except the list and tree fonts which are still one point larger than they should be). And so, the latest development drop of version 4.0 of Substance (code-named Key Largo) should provide platform-consistent fonts for Mac as well.

However, one thing was still missing - proper support for desktop antialias settings. There are two new features in JDK 6.0 for the AA settings (more on this in Chet's blog), the new Toolkit property to query the desktop settings, and the VM flag to override the desktop settings. Unfortunately, it appears that the latest dev build of Apple VM supports neither (and ignores the 5.0-specific undocumented swing.aatext VM flag).

And so, the latest Substance 4.0dev drop provides a temporary workaround until Apple makes the final JDK 6.0 release that supports the features mentioned above. When you're running under Mac and JVM version is 6.0, all components will have anti-aliased texts. Here is a screenshot to illustrate this. On the left hand side, the Aqua look and feel, in the middle, the previous Substance version (note that it's not antialiased) and on the right the latest Substance version. A sidenote - the AA quality in Aqua is visibly better than in Substance (which delegates to the basic implementation). This is most probably due to the fact that i can only set VALUE_TEXT_ANTIALIAS_ON value, since i don't know the actual one (which should be returned from the new Toolkit property).

Once again, thanks to Dean Iverson for taking the time to work with me on these two issues.

Related Topics >>