FontMetrics
AbstractOutlineFont
, RasterFont
public abstract class AFPFont extends Typeface
Modifier and Type | Field | Description |
---|---|---|
protected java.lang.String |
name |
The font name
|
eventListener, NOT_FOUND
Constructor | Description |
---|---|
AFPFont(java.lang.String name,
boolean embeddable) |
Constructor for the base font requires the name.
|
Modifier and Type | Method | Description |
---|---|---|
abstract java.awt.Rectangle |
getBoundingBox(int glyphIndex,
int size) |
Returns the bounding box of the glyph at the given index, for the given font size.
|
abstract CharacterSet |
getCharacterSet(int size) |
Returns the character set for a given size
|
java.lang.String |
getEmbedFontName() |
Returns the font name for font embedding (may include a prefix, Example: "1E28bcArialMT").
|
java.util.Set<java.lang.String> |
getFamilyNames() |
Returns the font's family names as a Set of Strings (Example: "Helvetica").
|
java.lang.String |
getFontName() |
Returns the "PostScript" font name (Example: "Helvetica-BoldOblique").
|
FontType |
getFontType() |
Returns the type of the font.
|
java.net.URI |
getFontURI() |
Returns the URI of the font file from which these metrics were loaded.
|
java.lang.String |
getFullName() |
Returns the font's full name (Example: "Helvetica Bold Oblique").
|
java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.lang.Integer>> |
getKerningInfo() |
Returns the kerning map for the font.
|
int |
getStrikeoutPosition(int size) |
Returns the distance from the baseline to the center of the strikeout line
(negative value indicates below baseline).
|
int |
getStrikeoutThickness(int size) |
Returns the thickness of the strikeout line.
|
int |
getUnderlineThickness(int size) |
Returns the thickness of the underline.
|
int[] |
getWidths() |
Return the array of widths.
|
boolean |
hasKerningInfo() |
Indicates if the font has kerning information.
|
boolean |
isEmbeddable() |
Indicates if this font may be embedded.
|
java.lang.String |
toString() |
|
protected static char |
toUnicodeCodepoint(int character) |
Maps mapped code points to Unicode code points.
|
getAscender, getCapHeight, getDescender, getUnderlinePosition, getWidth, getXHeight
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getEncodingName, getMaxAscent, hadMappingOperations, hasChar, hasFeature, isMultiByte, mapChar, notifyMapOperation, setEventListener, warnMissingGlyph
public AFPFont(java.lang.String name, boolean embeddable)
name
- the name of the fontembeddable
- whether this font is to be embeddedpublic java.net.URI getFontURI()
public java.lang.String getFontName()
public java.lang.String getEmbedFontName()
public java.lang.String getFullName()
public java.util.Set<java.lang.String> getFamilyNames()
public FontType getFontType()
public boolean hasKerningInfo()
public java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.lang.Integer>> getKerningInfo()
public abstract CharacterSet getCharacterSet(int size)
size
- the font sizepublic boolean isEmbeddable()
protected static final char toUnicodeCodepoint(int character)
character
- the mapped code pointpublic int getUnderlineThickness(int size)
size
- font sizepublic int getStrikeoutPosition(int size)
size
- font sizepublic int getStrikeoutThickness(int size)
size
- font sizepublic abstract java.awt.Rectangle getBoundingBox(int glyphIndex, int size)
glyphIndex
- glyph indexsize
- font sizepublic int[] getWidths()
This is used to get an array for inserting in an output format. It should not be used for lookup.
Copyright 1999-2016 The Apache Software Foundation. All Rights Reserved.