-
Enhancement
-
Resolution: Fixed
-
P1
-
1.2.0
-
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 []);
- duplicates
-
JDK-4112258 Font API has prototype API that should be removed
-
- Closed
-
-
JDK-4112756 Move getOutlineShape from StyledString to TextLayout
-
- Closed
-
-
JDK-4087797 GraphicsEnvironment.getAllFontFamilys()
-
- Closed
-
-
JDK-4112240 Font.GetOutline api should be moved to GlyphSet
-
- Closed
-
- relates to
-
JDK-4101445 Font constructor public Font(FontObject fontObject) invalid
-
- Closed
-
-
JDK-1233833 Want access to arbitrary fonts
-
- Closed
-
-
JDK-4115097 Static Font causes vm hang
-
- Closed
-
-
JDK-4229399 API change required to register font dynamically by Apps
-
- Resolved
-
-
JDK-4116769 2D need support for java logical font name
-
- Closed
-