public abstract class

Font2D

extends Object
java.lang.Object
   ↳ sun.font.Font2D
Known Direct Subclasses
Known Indirect Subclasses

Summary

Constants
int DEFAULT_RANK
int FONT_CONFIG_RANK
int JRE_RANK
int NATIVE_RANK
int TTF_RANK
int TYPE1_RANK
int UNKNOWN_RANK
Fields
protected FontFamily family
protected String familyName
protected int fontRank
protected String fullName
public Font2DHandle handle
protected Reference lastFontStrike
protected CharToGlyphMapper mapper
protected ConcurrentHashMap<FontStrikeDescReference> strikeCache
protected int style
Public Constructors
Font2D()
Public Methods
boolean canDisplay(int cp)
boolean canDisplay(char c)
boolean canDoStyle(int style)
int charToGlyph(int wchar)
byte getBaselineFor(char c)
String getFamilyName(Locale l)
void getFontMetrics(Font font, AffineTransform at, Object aaHint, Object fmHint, float[] metrics)
The length of the metrics array must be >= 8.
void getFontMetrics(Font font, FontRenderContext frc, float[] metrics)
The length of the metrics array must be >= 4.
String getFontName(Locale l)
float getItalicAngle(Font font, AffineTransform at, Object aaHint, Object fmHint)
int getMissingGlyphCode()
int getNumGlyphs()
String getPostscriptName()
FontStrike getStrike(Font font, AffineTransform devTx, AffineTransform glyphTx, int aa, int fm)
FontStrike getStrike(Font font)
FontStrike getStrike(Font font, AffineTransform devTx, int aa, int fm)
FontStrike getStrike(Font font, FontRenderContext frc)
int getStyle()
void getStyleMetrics(float pointSize, float[] metrics, int offset)
The length of the metrics array must be >= offset+4, and offset must be >= 0.
boolean hasSupplementaryChars()
boolean useAAForPtSize(int ptsize)
Protected Methods
long getUnitsPerEm()
int getValidatedGlyphCode(int glyphCode)
void setStyle()
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int DEFAULT_RANK

Constant Value: 4 (0x00000004)

public static final int FONT_CONFIG_RANK

Constant Value: 2 (0x00000002)

public static final int JRE_RANK

Constant Value: 2 (0x00000002)

public static final int NATIVE_RANK

Constant Value: 5 (0x00000005)

public static final int TTF_RANK

Constant Value: 3 (0x00000003)

public static final int TYPE1_RANK

Constant Value: 4 (0x00000004)

public static final int UNKNOWN_RANK

Constant Value: 6 (0x00000006)

Fields

protected FontFamily family

protected String familyName

protected int fontRank

protected String fullName

public Font2DHandle handle

protected Reference lastFontStrike

protected CharToGlyphMapper mapper

protected ConcurrentHashMap<FontStrikeDescReference> strikeCache

protected int style

Public Constructors

public Font2D ()

Public Methods

public boolean canDisplay (int cp)

public boolean canDisplay (char c)

public boolean canDoStyle (int style)

public int charToGlyph (int wchar)

public byte getBaselineFor (char c)

public String getFamilyName (Locale l)

public void getFontMetrics (Font font, AffineTransform at, Object aaHint, Object fmHint, float[] metrics)

The length of the metrics array must be >= 8. This method will store the following elements in that array before returning: metrics[0]: ascent metrics[1]: descent metrics[2]: leading metrics[3]: max advance metrics[4]: strikethrough offset metrics[5]: strikethrough thickness metrics[6]: underline offset metrics[7]: underline thickness

public void getFontMetrics (Font font, FontRenderContext frc, float[] metrics)

The length of the metrics array must be >= 4. This method will store the following elements in that array before returning: metrics[0]: ascent metrics[1]: descent metrics[2]: leading metrics[3]: max advance

public String getFontName (Locale l)

public float getItalicAngle (Font font, AffineTransform at, Object aaHint, Object fmHint)

public int getMissingGlyphCode ()

public int getNumGlyphs ()

public String getPostscriptName ()

public FontStrike getStrike (Font font, AffineTransform devTx, AffineTransform glyphTx, int aa, int fm)

public FontStrike getStrike (Font font)

public FontStrike getStrike (Font font, AffineTransform devTx, int aa, int fm)

public FontStrike getStrike (Font font, FontRenderContext frc)

public int getStyle ()

public void getStyleMetrics (float pointSize, float[] metrics, int offset)

The length of the metrics array must be >= offset+4, and offset must be >= 0. Typically offset is 4. This method will store the following elements in that array before returning: metrics[off+0]: strikethrough offset metrics[off+1]: strikethrough thickness metrics[off+2]: underline offset metrics[off+3]: underline thickness Note that this implementation simply returns default values; subclasses can override this method to provide more accurate values.

public boolean hasSupplementaryChars ()

public boolean useAAForPtSize (int ptsize)

Protected Methods

protected long getUnitsPerEm ()

protected int getValidatedGlyphCode (int glyphCode)

protected void setStyle ()