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

FontSmoothing/AntiAlias not utilized by default despite OS setting

XMLWordPrintable

    • beta
    • x86
    • linux, windows_2000, windows_xp



      Name: bsT130419 Date: 09/13/2001


      java version "1.3.1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
      Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)

      or

      java version "1.4.0-beta2"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta2-b77)
      Java HotSpot(TM) Client VM (build 1.4.0-beta2-b77, mixed mode)


      This is reproducible on 98,ME,2000 & XP.

      * From right click on desktop click "Properties"

      * From the plus tab select font smoothing (or clear type from XP's
      Appearance/Effects/Font Smoothing ... where it's more obvious)

      * Apply the settings.

      * Inspecting any TTF/OTF font from any (non-java) program in detail should
      reveal anti-aliasing behavior (this will not apply to rasterized fonts such as
      System or Lucidia or Courier ). A typical example may be courier new italic
      under notepad at a large size. Notice the smoothness of an l or I when it is
      italic.


      * Go to %JAVA_HOME% (pick your favorite jdk) and run the stylepad demo
      in /demo/jfc/Stylepad with ../../../bin/java -jar Stylepad.jar

      * Compare the results to what you saw with notepad. Pick any equivalent font.
      Set the size equally high. It will be jagged. There will be no way (other then
      to set the Rendering hint programmatically to force anti-aliased output) to
      produce anti-aliased results.

      It would be nice if this setting followed the OS default.

      The antialias setting is a combination of the font-quality flag passed in at
      the time the font is created (it should be highest-quality not 0 ) and the
      surface the text is drawn on (printers for example are not antialiased).

      I have tried to modify this default by search/replacing the font quality on
      all create fonts that I could find in awt.dll and jawt.dll without success
      which leads me to believe the problem is related to the property of the
      drawing surface or a font created in Graphics2D. I would bet that a flag on
      the creation of the drawing surface would fix the problem.
      (Review ID: 131598)
      ======================================================================

            prr Philip Race
            bstrathesunw Bill Strathearn (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: