JDK-6595317 : D3D: some character combinations show color fringing (LCD AA)
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 6u5
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_vista
  • CPU: x86
  • Submitted: 2007-08-21
  • Updated: 2010-10-14
  • Resolved: 2008-03-04
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
6u10 b13Fixed
Related Reports
Relates :  
Description
Run SwingSet2 on Vista-Home Premium. Choose windows look and feel. Choose some of the demos such as FileChooser, ComboBox, List, etc. Notice the text rendered within the combobox, button, etc. You will see that some characters are antialiased predominantly in red color and looks odd. You can very well notice in the combobox demo - Look at the word 'Philip'. 

I reproduced this on Windows Vista Home Premium on ATI Radeon X1600 PCIE. The video card is installed with the latest driver (7.8) and AERO is enabled on it. Also the system where I reproduced this issue is having a LCD monitor. This was not reproducible on 6u3, 6u4 with D3D turned off, 6u3 with ddraw turned on. 

I have attached a few screenshots. Magnify them and look at the areas bound by red colored rectangles.
I noticed green colored test with RTF documents loaded onto the EditorPane, on the same machine. I have attached the screenshot of the same and the demo that reproduces it.

Comments
SUGGESTED FIX http://sa.sfbay.sun.com/projects/java2d_data/6u10/6595317.0
22-02-2008

EVALUATION After some investigaion a simple compromiss was found. We could check the glyphs as they are uploaded to the texture if they have any pixels in the edge columns. If the number of pixels in those columns is less than 1/3 of the glyph width we consider those columns empty and adjust the glyph bounds accordingly (or, rather, adjust the bounds this glyph will be touching when rendered). This proved to be enough to significantly improve quality without any performance impact. In fact, in some cases this approach is even faster (since we now consider both sides of the glyph).
21-02-2008

EVALUATION The cause of the excessive color fringing is the optimization that was added for improving rendering performance of LCD text - see D3DTextRenderer.cpp, #define INTERSECTS(gx1, gy1, gx2, gy2, bounds)) and D3DTR_UpdateCachedDestination() function. Unfortunately taking this optimization out really affects performance, so we're looking at alternatives.
23-08-2007