FontMetrics
public class RasterFont extends AFPFont
Modifier and Type | Field | Description |
---|---|---|
protected static org.apache.commons.logging.Log |
LOG |
Static logging instance
|
eventListener, NOT_FOUND
Constructor | Description |
---|---|
RasterFont(java.lang.String name,
boolean embeddable) |
Constructor for the raster font requires the name, weight and style
attribute to be available as this forms the key to the font.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addCharacterSet(int size,
CharacterSet characterSet) |
Adds the character set for the given point size
|
int |
getAscender(int size) |
The ascender is the part of a lowercase letter that extends above the
"x-height" (the height of the letter "x"), such as "d", "t", or "h".
|
java.awt.Rectangle |
getBoundingBox(int character,
int size) |
TODO
|
int |
getCapHeight(int size) |
Obtains the height of capital letters for the specified point size.
|
CharacterSet |
getCharacterSet(int sizeInMpt) |
Get the character set metrics for the specified point size.
|
int |
getDescender(int size) |
The descender is the part of a lowercase letter that extends below the
base line, such as "g", "j", or "p".
|
java.lang.String |
getEncodingName() |
Get the encoding of the font.
|
int |
getUnderlinePosition(int size) |
Returns the distance from the baseline to the center of the underline (negative
value indicates below baseline).
|
int |
getUnderlineThickness(int size) |
Returns the thickness of the underline.
|
int |
getWidth(int character,
int size) |
Obtain the width of the character for the specified point size.
|
int |
getXHeight(int size) |
The "x-height" (the height of the letter "x").
|
boolean |
hasChar(char c) |
Determines whether this font contains a particular character/glyph.
|
char |
mapChar(char c) |
Map a Unicode character to a code point in the font.
|
getEmbedFontName, getFamilyNames, getFontName, getFontType, getFontURI, getFullName, getKerningInfo, getStrikeoutPosition, getStrikeoutThickness, getWidths, hasKerningInfo, isEmbeddable, toString, toUnicodeCodepoint
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getMaxAscent, hadMappingOperations, hasFeature, isMultiByte, notifyMapOperation, setEventListener, warnMissingGlyph
public RasterFont(java.lang.String name, boolean embeddable)
name
- the name of the fontembeddable
- true
if the font is embeddablepublic void addCharacterSet(int size, CharacterSet characterSet)
size
- point size (in mpt)characterSet
- character setpublic CharacterSet getCharacterSet(int sizeInMpt)
getCharacterSet
in class AFPFont
sizeInMpt
- the point size (in mpt)public int getAscender(int size)
size
- the font size (in mpt)public int getUnderlinePosition(int size)
size
- font sizepublic int getUnderlineThickness(int size)
AFPFont
getUnderlineThickness
in interface FontMetrics
getUnderlineThickness
in class AFPFont
size
- font sizepublic int getCapHeight(int size)
size
- the font size (in mpt)public int getDescender(int size)
size
- the font size (in mpt)public int getXHeight(int size)
size
- the font size (in mpt)public int getWidth(int character, int size)
character
- the charactersize
- the font size (in mpt)public java.awt.Rectangle getBoundingBox(int character, int size)
getBoundingBox
in interface FontMetrics
getBoundingBox
in class AFPFont
character
- glyph indexsize
- font sizepublic boolean hasChar(char c)
public char mapChar(char c)
public java.lang.String getEncodingName()
getEncodingName
in class Typeface
Copyright 1999-2016 The Apache Software Foundation. All Rights Reserved.