On Mon, 28 Sep 2026 07:12:45 GMT, Prasanta Sadhukhan <[email protected]> 
wrote:

>> No, it should work with DIALOG on Windows & Linux. You can revert that 
>> change.
>> We aren't trying to stabilise with a known font. That idea has been debunked 
>> as being the problem.
>> Ideally we should make this test try EVERY font on the system and it should 
>> pass with all of them.
>
> But, with DIALOG font instead of MONOSPACED, everything else remaining same, 
> it passes in Windows, Linux and even macos (already mentioned here 
> https://github.com/openjdk/jdk/pull/32742#issuecomment-5633538857) so there 
> will be no need of PL-ing the test then..
> 
> I tried testing by iterating with all available fonts but it fails in Windows
> 
> Testing font=**Arial Black** aa=false, 
> graphicsTransform=AffineTransform[[-0.707106781186548, -0.707106781186548, 
> 0.0], [0.707106781186548, -0.707106781186548, 0.0]], 
> fontTransform=AffineTransform[[1.0, -0.0, 0.0], [0.0, 1.0, 0.0]]
> Exception in thread "main" java.lang.RuntimeException: Failed: wrong colors 
> at i=0 j= 221 rgb1 java.awt.Color[r=0,g=0,b=0] rgb2 
> java.awt.Color[r=0,g=0,b=0]
>         at 
> DrawRotatedStringUsingRotatedFont.checkColors(DrawRotatedStringUsingRotatedFont.java:135)
> 
> 
> and in Linux ubuntu 24.04
> 
> Testing font=**C059 Bold Italic** aa=false, 
> graphicsTransform=AffineTransform[[-0.707106781186548, -0.707106781186548, 
> 0.0], [0.707106781186548, -0.707106781186548, 0.0]], 
> fontTransform=AffineTransform[[1.0, -0.0, 0.0], [0.0, 1.0, 0.0]]
> Exception in thread "main" java.lang.RuntimeException: Failed: wrong colors 
> at i=0 j= 221 rgb1 java.awt.Color[r=0,g=0,b=0] rgb2 
> java.awt.Color[r=0,g=0,b=0]
>       at 
> DrawRotatedStringUsingRotatedFont.checkColors(DrawRotatedStringUsingRotatedFont.java:135)

> But, with DIALOG font instead of MONOSPACED, everything else remaining same, 
> it passes in Windows, Linux and even macos (already mentioned here [#32742 
> (comment)](https://github.com/openjdk/jdk/pull/32742#issuecomment-5633538857))
>  so there will be no need of PL-ing the test then..

That's luck. There's a clear product bug. It should be PL'd.

> 
> I tried testing by iterating with all available fonts but it fails in Windows
> 
> ```
> Testing font=**Arial Black** aa=false, 
> graphicsTransform=AffineTransform[[-0.707106781186548, -0.707106781186548, 
> 0.0], [0.707106781186548, -0.707106781186548, 0.0]], 
> fontTransform=AffineTransform[[1.0, -0.0, 0.0], [0.0, 1.0, 0.0]]
> Exception in thread "main" java.lang.RuntimeException: Failed: wrong colors 
> at i=0 j= 221 rgb1 java.awt.Color[r=0,g=0,b=0] rgb2 
> java.awt.Color[r=0,g=0,b=0]
>         at 
> DrawRotatedStringUsingRotatedFont.checkColors(DrawRotatedStringUsingRotatedFont.java:135)
> ```
> 
> and in Linux ubuntu 24.04
> 
> ```
> Testing font=**C059 Bold Italic** aa=false, 
> graphicsTransform=AffineTransform[[-0.707106781186548, -0.707106781186548, 
> 0.0], [0.707106781186548, -0.707106781186548, 0.0]], 
> fontTransform=AffineTransform[[1.0, -0.0, 0.0], [0.0, 1.0, 0.0]]
> Exception in thread "main" java.lang.RuntimeException: Failed: wrong colors 
> at i=0 j= 221 rgb1 java.awt.Color[r=0,g=0,b=0] rgb2 
> java.awt.Color[r=0,g=0,b=0]
>       at 
> DrawRotatedStringUsingRotatedFont.checkColors(DrawRotatedStringUsingRotatedFont.java:135)
> ```

I suspect that getPixelBounds will make it pass. As I said off-line, the union 
of that and the visual bounds *ought* to cover rounding and pixelization. If it 
doesn't there's another product bug to look at.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32742#discussion_r4124311045

Reply via email to