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

Font cleanup

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P1 P1
    • 1.2.0
    • 1.2.0
    • client-libs
    • 2d
    • 1.2beta4
    • generic, sparc
    • generic, solaris_2.6
    • Not verified


      paul.charlton@eng 1998-04-18

      Various font architecture changes for cleanup of API.

      class java.awt.Font.java
      removed:
       <! public static final java.awt.Font DEFAULT;
      (non-essential, workarounds easy, causes race conditions during initialization)

       <! protected java.lang.String fontName;
      (state available from native equivalent, no need to cache inside of Font)

       <! public java.awt.Font(sun.awt.font.FontObject);
      (implementation specific, no longer needed, was not usable by an
      application to begin with)

      removed:
       <! public static java.awt.Font getBestFontFor(java.text.AttributedCharacterIterator);
       <! public static java.awt.Font getBestFontFor(java.text.AttributedCharacterIterator, int, int);
      (utility value limited and potentially very confusing in the presence of fonts containing characters from multiple script systems, recommend posting equivalent sample code)

      ============================================================================
      class java.awt.font.TextLayout.java

      added:
       !> public java.awt.Shape getOutline(java.awt.geom.AffineTransform, float, float);
      (required for consistency with 2D rendering model. Necessary to allow custom paint and brush styles.)

      ============================================================================
      class java.awt.GraphicsEnvironment.java
      removed:
       <! public abstract java.awt.Font getFont(java.lang.String);
      (duplicates functionality of getFont(Map attributes) while adding no significant value)

      added:
       !> public abstract java.lang.String getAvailableFontFamilyNames()[];
       !> public abstract java.lang.String getAvailableFontFamilyNames(java.util.Locale)[];
      (needed to present font selection picker in a GUI ... user needs localized display names of fonts)

       !> public abstract boolean registerFont(java.io.InputStream, boolean);
      (Needed to allow application to register fonts at runtime. The boolean flag is used to allow the application to request persistence of the data stream (security permitting, of course))



      paul.charlton@eng 1998-04-23
      From review:
      remove public abstract boolean registerFont(java.io.InputStream, boolean);

      replace with:
      public boolean registerFont(byte []);

            pcharltosunw Paul Charlton (Inactive)
            pcharltosunw Paul Charlton (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: