JDK-6740419 : JavaFX needs control over text Grid Fitting in Java2D
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 6u10
  • Priority: P2
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic
  • CPU: generic
  • Submitted: 2008-08-22
  • Updated: 2013-06-26
  • Resolved: 2013-06-26
Font rendering in Java and therefore Java FX is very poor with fonts other than the commonly used ones that ship with the operating system. I have attached images comparing different version of Java to Flash and Native rendering on Windows and Mac. We have done a lot of work matching Windows rendering quality for the standard Windows fonts. Taken from wikipedia http://en.wikipedia.org/wiki/Font_rasterization
Windows since Windows 98 has included a combination of font-level hinting and antialiasing. Font smoothing is also available as an installation file, released in 1997 for Windows 95. Since Windows XP, it has also supported subpixel rendering. The Windows rasterizer is an example of one that prioritizes clarity; by forcing text into integral coordinate positions (and not even antialiasing certain fonts at certain sizes), it becomes easier to read on the screen, but may appear somewhat different when printed.

Mac OS X's Quartz is distinguished by the use of floating-point positioning; it does not force glyphs into exact pixel locations, instead using various antialiasing techniques, including subpixel rendering, to position characters and lines more accurately. The result is that the on-screen display looks extremely similar to printed output, but can occasionally be difficult to read at smaller point sizes. A simpler type of font antialiasing was introduced in Mac OS 8.5, in 1998. Apple's technique can be seen on Windows in Safari.

It can be seen that Windows font rendering is optimized for readability not for accurate representation of the font. So to start aiming for designers we need to be more true to the font. Modern font engines offer control over how much antialiasing there is and how heavy the font should look. If you look at the attached image file "csmstyles.png" you can see examples of this with the Saffron Engine.
One way to get this sort of font rendering quality is to replace the Java engine with one that is known to have the quality. I have done some research and come up with 3 options that could be investigated.

* Saffron from Mitsubishi
     examples: http://www.merl.com/people/perry/SaffronWebPage/index.html
     This is the engine Flash uses. It is also currently being evaluated by the SlimShady team.
* Font Fusion from Bitstream
     Bitsream Font Fusion is the result of merging Bitstream's TrueDoc and TypeSolution's T2K(Current JDK Engine) 
     as TypeSolutions is now owned by Bitstream.
* D-Type from D-Type Solutions
     examples: http://www.d-type.com/about/comparison.htm

In my opinion based on the provided examples Saffron is the best followed by D-Type then Font Fusion.

This is no longer needed by FX.