<Swing Dev> [14] RFR JDK-8229935:[TEST_BUG]: bug8132119.java inconsistently positions text

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Mon Nov 4 19:44:02 UTC 2019


Looks fine.

On 11/4/19 8:29 am, Prasanta Sadhukhan wrote:
> Hi All,
> 
> Please review a test fix for an  test issue seen primarily in linux.
> 
> The test draws "AOB" with and without underline underneath and then looks to try to calculate the midpoint of "O" and then expects to see the transition
> from top to bottom of bg->fg->bg->fg->bg as you get when you cross the path of the O twice. When there is underline, it expects 6 transition from top of O till it passes the underline in form of bg->fg->bg->fg->bg->fg->bg
> 
> as it apparently assumes that there is at least a pixel gap between lower curvature of O to underline. This may not be true for all fonts, so sometimes underline are stuck with the lower part of O and it fails.
> 
> Proposed fix is to calculate the transition from 10 pixel left from midpoint of "O" so that there is at least some pixels gap between curvature of O and underline.
> 
> Also, the text is drawn in aliased mode to avoid the antialias zigzag to be mistakenly construed as "transition".
> 
> Proposed fix pass in all platforms and the mach5 job link is present in JBS.
> 
> Bug:https://bugs.openjdk.java.net/browse/JDK-8229935
> 
> webrev: http://cr.openjdk.java.net/~psadhukhan/8229935/webrev.0/
> 
> Regards
> Prasanta


-- 
Best regards, Sergey.


More information about the swing-dev mailing list