<Swing Dev> RFR: 8199529 : javax/swing/text/Utilities/8142966/SwingFontMetricsTest.java fails on windows
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Fri May 22 12:26:14 UTC 2020
On 5/20/20 9:40 am, Philip Race wrote:
> I don't see any problem in "Swing itself". Where do you see a bug ?
I have rechecked implementation of both usages and agreed, both already take care
about AA hint, even Motif L&F.
+1.
>
> -phil.
>
> On 5/20/20, 8:33 AM, Sergey Bylokhov wrote:
>> On 5/20/20 7:40 am, Philip Race wrote:
>>>> If it is assumed that the component and graphics hints should be the
>>>> same, isn't it is a bug that they are different?
>>>
>>> You aren't understanding and probably haven't read the bug evaluation.
>>> See the latest comment there from Monday, in short, Swing sets the AA hint
>>> on the graphics right before drawing the text and unsets it again right afterwards.
>>
>> I read it, but still think that this bug is another variation of 8142966, metrics returned
>> by both methods should be in sync, it means the JComponent.getFontMetrics should use the
>> same "default" AA hint, or the g.getFontMetrics() should use proper AA property
>> based on "awt.font.desktophints" and/or clientproperty.
>>
>> I think the proper way to fix it is to change the Swing itself:
>> - if the L&F support "awt.font.desktophints" then Swing should proper initialize the graphics of the JComponent
>> - if the L&F ignore/unsupport "awt.font.desktophints" then JComponent.getFontMetrics() should ignore AA
>>
--
Best regards, Sergey.
More information about the swing-dev
mailing list