Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8023794

[macosx] LCD Rendering hints seems not working without FRACTIONALMETRICS=ON

    Details

    • Subcomponent:
      2d
    • Resolved In Build:
      b70
    • OS:
      os_x

      Backports

        Description

        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

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  bae Andrew Brygin
                  Reporter:
                  yan Yuri Nesterenko (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  18 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: