JDK-6685312 : Unscaled advances for LCD Text in 6u10 beta
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 6u10
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2008-04-07
  • Updated: 2010-10-01
  • Resolved: 2008-04-12
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.
6u10 b22Fixed 7Fixed
Related Reports
Relates :  
Relates :  
If a simple scale is applied to the graphics when using LCD text on JDK 6u10 on windows,
then the text appears scaled, but the advances are not, so that the text is
incorrectly positioned.

WORK AROUND Since this is a bug only in LCD text mode, and presently scenario doesn't provide a way to use LCD text, this manifests only in Swing components picking that up as a desktop setting. So setting desktop font smoothing to "Standard" will cure it.

EVALUATION When directly querying the advances this is further manifested as the advance being unscaled twice. ie since after the image is retrieved the user space advance was stored along with it, when later querying it, its assumed to be still device space and is again transformed back into user space.

EVALUATION This is caused by the fix for 6656651 to use the native rasteriser. One element of the logic is to still use T2K for advances, and store those in the glyph image. That is supposed to be in device space (ie scaled), but to retrieve the value an internal API is called which has already transformed the advance back into user space. The fix is simple: instruct the API not to perform that transform in just this case.