On Mon, 28 Sep 2026 15:58:42 GMT, Phil Race <[email protected]> wrote:
>> 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. @prrace Should I update the test iterating "all" fonts and PL-ed on linux and macos or since you mentioned "No, it should work with DIALOG on Windows & Linux. You can revert that change." this present PR change is ok? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/32742#discussion_r4141880908
