JDK-4130437 : Font cleanup
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.2.0
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,solaris_2.6
  • CPU: generic,sparc
  • Submitted: 1998-04-18
  • Updated: 1999-01-14
  • Resolved: 1999-01-14
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.2.0 1.2beta4Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
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 []);


Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.2beta4 FIXED IN: 1.2beta4 INTEGRATED IN: 1.2beta4
14-06-2004

PUBLIC COMMENTS Font related changes in new APIs to facilitate better use of natively available fonts. Rendering changes for TextLayout to allow use of custom brushes and fills, and to allow a TextLayout to be used as the basis for a clip region
10-06-2004

EVALUATION paul.charlton@eng 1998-04-18 Management approval and external review required.
18-04-1998