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

Subpixel text antialiasing does not work with fractional metrics

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P4
    • None
    • 7
    • client-libs
    • 2d
    • x86
    • linux_ubuntu

    Description

      FULL PRODUCT VERSION :
      OpenJDK 1.6.0_20

      ADDITIONAL OS VERSION INFORMATION :
      Ubuntu 32 bit, Kubuntu 32 bit

      A DESCRIPTION OF THE PROBLEM :
      If fractional metrics are enabled the subpixel text antialiasing draws illegal color lines. For HRGB for example, it draws vertical shadows in incorrect coordinates.
      See this screenshot:
      http://magicplot.com/openjdk-aa-bug.png

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      You can use this little text app to see this bug:
      http://magicplot.com/MPTextTest.jar
      http://magicplot.com/MagicPlotTextTest.java
      Select one of LCD_ antialiasing modes.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Text antialiasing must work like when fractional metrics are off.
      ACTUAL -
      Incorrect colored lines are drawn. The text is damaged in fact.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
        To set appropriate text rendering options use these methods before invocation gr.drawString(...):

      Graphics2D gr = ...
      gr.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB);
      gr.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Do not use fractional metrics if possible. If fractional metrics are required simple 'gray' antialiasing can be used (TEXT_ANTIALIASING_ON redering hint).

      Attachments

        Activity

          People

            prr Philip Race
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: