United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6751616 outline for underline in TextLayout with underline is off rasterized underline
6751616 : outline for underline in TextLayout with underline is off rasterized underline

Details
Type:
Bug
Submit Date:
2008-09-23
Status:
Resolved
Updated Date:
2010-04-02
Project Name:
JDK
Resolved Date:
2009-01-09
Component:
client-libs
OS:
generic
Sub-Component:
2d
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:
7

Related Reports
Backport:

Sub Tasks

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.
                                     
2008-10-07



Hardware and Software, Engineered to Work Together