On Tue, 22 Sep 2026 12:25:32 GMT, Prasanta Sadhukhan <[email protected]> wrote:
> Using Monospaced font, visual bounds > > ``` > final GlyphVector glyphs = derivedFont.createGlyphVector( > bg.getFontRenderContext(), STR); > final Rectangle2D bounds = glyphs.getVisualBounds(); > ``` > > and TEXT_ANTIALIASING , it passes in windows and linux but fails in osx in > compareImage > > ``` > java.lang.RuntimeException: Failed: wrong text location at i=108 j= 107 rgb1 > java.awt.Color[r=222,g=0,b=0] rgb2 java.awt.Color[r=254,g=0,b=0] > at > DrawRotatedStringUsingRotatedFont.compareImage(DrawRotatedStringUsingRotatedFont.java:104) > at > DrawRotatedStringUsingRotatedFont.main(DrawRotatedStringUsingRotatedFont.java:83) > ``` > > Even with antialiasing OFF macos fails with monospaced font It seems only > Dialog works with antialiasing in all platforms Dialog is not the answer. Nothing is magic about Dialog that will make it work. That's just pure luck. You need to look at why it fails and fix the reason for the failure. ------------- PR Comment: https://git.openjdk.org/jdk/pull/32742#issuecomment-5778901298
