Duplicate :
|
|
Relates :
|
|
Relates :
|
Run the attached AntialiasDemo.java on Mac. By default, antialias hints set to OFF in this demo. Note that desktop settings is ON, not some LCD, regardless of monitor, be it a generic old Sony or iMac. It's easy to see that fonts have grayscale antialiasing in Swing component by default. Change the value in Demo to LCD_HRGB and play with size of the "The sky is blue": apparently hint is still ON, and hinting gray. Now, add somewhere to line 524 in demo a line g2Image.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON); compile and run again. All of a sudden LCD_HRGB start working, and letters in the sample have visible color tint. Now, is it a bug? Shouldn't LCD hints be default on Mac for Swing? It's not a regression, I believe, not between 7 and 8 releases. 2D_Font/SwingAntialiasLCDTextTest
|