<Swing Dev> [14] RFR JDK-8229935:[TEST_BUG]: bug8132119.java inconsistently positions text
Prasanta Sadhukhan
prasanta.sadhukhan at oracle.com
Mon Nov 4 16:29:15 UTC 2019
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
More information about the swing-dev
mailing list