JDK-6751616 : outline for underline in TextLayout with underline is off rasterized underline
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 6
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2008-09-23
  • Updated: 2010-04-02
  • Resolved: 2009-01-09
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 JDK 7
6u12Fixed 7 b43Fixed
Description
TextLayout outline is a bit off rasterized text. I understand a few 
pixels difference is to be expected. However if text is underlined the 
outline for underline is way off the rasterized underline.
RT-524 [Mouse enter event is not triggered when mouse is moved on the underline of the text] http://openjfx.java.sun.com/jira/browse/RT-524
depends on this bug.

Comments
EVALUATION The bug is that the underline offset is not being added to the position. Note that rendering may still show an edge of the bounding box to be off by a pixel from the filled underline which may lie at a subpixel position. RenderingHints.VALUE_STROKE_PURE can be used to render with subpixel accuracy if visual appearance is the requirement. But code that is hit testing against pixel boundaries may also need to compensate in its calculations However the outlines and images of text won't exactly match anyway because of hinting effects.
07-10-2008