<Swing Dev> RFR: 8199529 : javax/swing/text/Utilities/8142966/SwingFontMetricsTest.java fails on windows
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Tue May 19 04:53:26 UTC 2020
On 5/17/20 8:27 pm, Philip Race wrote:
> bug: https://bugs.openjdk.java.net/browse/JDK-8199529
> webrev : http://cr.openjdk.java.net/~prr/8199529/
>
> The problem is that the test assumes LCD AA is set on the graphics when in
> fact Swing sets that hint just before rendering test and reverts it afterwards.
In what place it assumes that? I mean the test just compares that
Component.getFontMetrics(font) and g.getFontMetrics(font) for the same component return
the same metrics.
If the component (not-)use AA then shouldn't both methods take care about that?
>
> Since all the built-in L&Fs are supposed to get the AA hint from the desktop,
> updating the AA hint on the graphics to match that is required to match what
> Swing is supposed to have set on the component.
>
> Test passes on all platforms - before and after the fix, however it now will
> report a failure only when there is one .. rather than the false positive we had.
>
> -phil.
--
Best regards, Sergey.
More information about the swing-dev
mailing list