<Swing Dev> RFR: 8199529 : javax/swing/text/Utilities/8142966/SwingFontMetricsTest.java fails on windows
Philip Race
philip.race at oracle.com
Tue May 19 05:02:01 UTC 2020
On 5/18/20, 9:53 PM, Sergey Bylokhov wrote:
> 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?
>
I mean that the test assumes that the component and graphics hints are
the same.
Swing is *supposed* to honour the desktop hint for the default L&F and
that is what
we are (now) checking.
-phil.
>>
>> 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.
>
>
More information about the swing-dev
mailing list