JDK-4726365 : RFE: Java 2D to support LCD optimized anti-aliased text (sub-pixel resolution)
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 2.0.2,1.4.0,1.4.1,5.0
  • Priority: P5
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux,windows_xp
  • CPU: x86
  • Submitted: 2002-08-05
  • Updated: 2017-05-16
  • Resolved: 2005-05-31
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 betaFixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Description

Name: jk109818			Date: 08/05/2002


FULL PRODUCT VERSION :
java version "1.4.1-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-beta-b14)
Java HotSpot(TM) Client VM (build 1.4.1-beta-b14, mixed mode)

FULL OPERATING SYSTEM VERSION :
Microsoft Windows XP [Version 5.1.2600]

A DESCRIPTION OF THE PROBLEM :
The quality of Java2D text antialiasing leaves a lot to be
desired in comparison to OS naitve antialiasing, especially
ClearType on Windows.

Java2D uses gray scale antialiasing. At point sizes below a
certain threshold (around 14pt it seems) this just does not
look very good, with text appearing 'lumpy' and uneven.
Either the way antialiasing interacts with font hinting
needs to be improved, or there should be a settable
rendering hint so that text below a certain size is not
antialiased. In Windows standard text antialiasing, this
works well. Larger font sizes are antialiased, where the
most benefit is seen, and smaller font sizes are untouched,
making them legible.

Another problem is that Java2D antialiasing does not measure
up to subpixel addressable antialiasing like in ClearType or
Adobe CoolType (in Acrobat). ClearType/CoolType looks quite
good even at smaller point sizes (12,pt, 10pt), and is much
sharper on digital LCD screens, and in my experience,
aperture grill monitors.

Finally, none of the Swing look and feels takes advantage of
antialiasing, probably because of its poor quality and
performance. This makes the Windows look and feel suffer in
comparison to native Windows applications.

One fix would be for Java2D to support ClearType style
antialiasing itself. A downside to this approach is that the
Java2D renderer would likely not gain the advantage of
hardware acceleration provided by native API's like Quartz
Extreme on Mac OS X, or in the future GDI+. Antialiasing is
performance intensive, so supporting the native OS rendering
path would have certain benefits.

And once antialiasing is acceptable for smaller point sizes,
Swing should support it in the Windows Look and Feel,
obeying the operating system settings for rendering options.
For example, if the user selects standard antialiasing in
the Control Panel, Swing should use grayscale antialiasing
for larger font sizes. If the user has picked ClearType,
Swing should use ClearType-style antialiasing for all point
sizes.


REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER WORKAROUND :
Use older JDK's where rendering is down by the host OS. Use
.NET/GDI+ or other native OS api's.
(Review ID: 160298) 
======================================================================

Comments
EVALUATION The request of supporting sub-pixel addressing is one that has been discussed and considered desirable, but needs substantial work on the rasteriser which is not likely to make any release in the near future. The second issue of Swing's support for A-A text is not tied to the above and is already targeted for the tiger release by Swing. ###@###.### 2002-08-05 ============================ See also 5057760:RFE: Java2D font anti-aliasing should support TrueType's gasp table and Swing RFE's 4502804: FontSmoothing/AntiAlias not utilized by default despite OS setting 4871297: Win L&F: XP Look and Feel does not show ClearType anti-aliasing (Its probably worth noting that the previous comment from 2002 that Swing will add AA support in tiger was not in fact completed in tiger, except specifically for the GTK L&F). ###@###.### 2004-06-04 ============================ We are working on this for the mustang release. A very small amount of new API will be involved but we expect Swing's Windows L&F and GTK L&F's to pick it up automatically so apps using those won't need to do anything so long as their desktop is configured to use it too (ie Swing will honour the desktop setting). Apps will also be able to explicitly request it for text drawing on a Graphics2D by setting a simple RenderingHint. ###@###.### 2005-1-26 20:55:04 GMT whilst this is now fixed there are several follow-on RFE's. 6274808:Need new renderers that support 3 component masks (general LCD subpixel renderers) 6274813: RFE: Accelerate LCD glyphs via OpenGL pipeline 6274820: RFE: Accelerate LCD glyphs via D3D pipeline 6274830: RFE: API to discover/use the true LCD subpixel configuration of a display device. 6274842: RFE: Provide a means for a custom look and feel to use desktop font antialiasing settings. ###@###.### 2005-05-23 22:22:22 GMT
23-05-2005