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

RFE: Support desktop font smoothing settings in all L&F's that extend BasicLookAndFeel

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P5 P5
    • None
    • 6
    • client-libs

      FULL PRODUCT VERSION :
      java version "1.6.0"
      Java(TM) SE Runtime Environment (build 1.6.0-b105)
      Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows 2000 [Version 5.00.2195]

      A DESCRIPTION OF THE PROBLEM :
      Mustang provides auto-detection of desktop antialias settings (see [1] and [2] for more details). The support for this has been added to Metal, Windows and GTK look-and-feels, and it works as expected. However, what about custom third-party look-and-feels? Well, those that extend one of the above three are OK - they get it for free. Those that extend Basic (namely Alloy, Liquid, Napkin, Skin, and Substance) are not so lucky.

      This piece of code is from Metal:
      boolean lafCond = SwingUtilities2.isLocalDisplay();
      Object aaTextInfo = SwingUtilities2.AATextInfo.getAATextInfo(lafCond);
      table.put(SwingUtilities2.AA_TEXT_PROPERTY_KEY, aaTextInfo);

      This piece of code is from Windows:
      Object aaTextInfo = SwingUtilities2.AATextInfo.getAATextInfo(true);
      table.put(SwingUtilities2.AA_TEXT_PROPERTY_KEY, aaTextInfo);

      This piece of code is from GTK:
      gtkAAFontSettingsCond = !cjkLocale && SwingUtilities2.isLocalDisplay();
      aaTextInfo =
      SwingUtilities2.AATextInfo.getAATextInfo(gtkAAFontSettingsCond);

      There's a catch here that prevents third-party look-and-feel from using this - the SwingUtilities2 class that is an internal one (it even has been moved into another package from Tiger to Mustang).

      How can we get UIManager-level support for antialiasing in third-party look-and-feels that extend Basic?

      [1] http://today.java.net/pub/a/today/2005/07/26/lcdtext.html
      [2] http://weblogs.java.net/blog/chet/archive/2005/06/phils_font_fixe.html

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run application under any one of the mentioned LAFs in Mustang.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Application picks up desktop AA settings.
      ACTUAL -
      Application doesn't pick up desktop AA settings

      REPRODUCIBILITY :
      This bug can be reproduced always.

            Unassigned Unassigned
            tyao Ting-Yun Ingrid Yao (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: