On Thu, 17 Aug 2023 21:42:04 GMT, Alexey Ivanov <[email protected]> wrote:

>> test/jdk/java/awt/font/FontScaling/StretchedFontTest.java line 107:
>> 
>>> 105:         final Dimension size = getTextSize(font);
>>> 106:         final BufferedImage image =
>>> 107:                 new BufferedImage(size.width, size.height, 
>>> TYPE_3BYTE_BGR);
>> 
>> t might not be related but we can test the image with alpha as well, in that 
>> case I think the aa might be always disabled and/or some other code path 
>> will be executed.
>> 
>> The test for JDK-8204929 uses the "Locale.ENGLISH" and this one "Locale.US", 
>> does it matter which one is used to reproduce this bug?
>
>> It might not be related but we can test the image with alpha as well, in 
>> that case I think the aa might be always disabled and/or some other code 
>> path will be executed.
> 
> This test covers the disabled AA and greyscale AA.
> 
> Do you want to include both types of buffered images in the test? Do you want 
> to switch to `TYPE_4BYTE_ABGR`? Do you want to use a translucent colour for 
> rendering text?
> 
>> The test for JDK-8204929 uses the "Locale.ENGLISH" and this one "Locale.US", 
>> does it matter which one is used to reproduce this bug?
> 
> No, it doesn't matter here at all. Nothing would change if I didn't pass the 
> locale, except that localised font names would be printed if a failure occurs.
> 
> I'll update it to `Locale.ENGLISH` for consistency with 
> `GlyphRotationTest.java` from JDK-8204929.

I think opaque+transparent images should be fine, do not think the actual 
format bgr/rgb/argb_pre/etc matters.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15335#discussion_r1297783638

Reply via email to