RFR: 8202836 : [macosx] test java/awt/Graphics/TextAAHintsTest.java fails [v3]

Phil Race prr at openjdk.java.net
Tue Feb 8 20:59:14 UTC 2022


On Tue, 8 Feb 2022 20:43:47 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

> > The second line with “This text should be solid black” that's rendered with `VALUE_TEXT_ANTIALIAS_GASP` isn't black for me, it uses gray AA. However, it remains black for `BufferedImage` case.
> 
> It depends on the **uiScale**. The second "black" remains rendered without antialiasing applied at the scales of 100% and 125%; at the scales of 150% and above, it's rendered with grayscale antialiasing.
> 
> This should be clarified or dropped from the test. The spec for `VALUE_TEXT_ANTIALIAS_GASP` says that either behaviour is fine and it also depends on the specific font used.

Yes, the font has a table (GASP) which says what to do at a specific size. And the font only knows about PIXEL sizes. So it is the number of device pixels which affects this .. so point size you specify multiplied by (UI) scale gives you the size to use to ask the font.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7275



More information about the client-libs-dev mailing list