public abstract class Typeface extends Object implements FontMetrics
Modifier and Type | Field and Description |
---|---|
protected FontEventListener |
eventListener
An optional event listener that receives events such as missing glyphs etc.
|
static char |
NOT_FOUND
Code point that is used if no code point for a specific character has
been found.
|
Constructor and Description |
---|
Typeface() |
Modifier and Type | Method and Description |
---|---|
abstract String |
getEncodingName()
Get the encoding of the font.
|
int |
getMaxAscent(int size)
Returns the maximum ascent of the font described by this
FontMetrics object.
|
boolean |
hadMappingOperations()
Indicates whether this font had to do any character mapping operations.
|
abstract boolean |
hasChar(char c)
Determines whether this font contains a particular character/glyph.
|
boolean |
isMultiByte()
Determines whether the font is a multibyte font.
|
abstract char |
mapChar(char c)
Map a Unicode character to a code point in the font.
|
protected void |
notifyMapOperation()
Used for keeping track of character mapping operations in order to determine if a font
was used at all or not.
|
void |
setEventListener(FontEventListener listener)
Sets the font event listener that can be used to receive events about particular events
in this class.
|
String |
toString() |
protected void |
warnMissingGlyph(char c)
Provide proper warning if a glyph is not available.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAscender, getCapHeight, getDescender, getEmbedFontName, getFamilyNames, getFontName, getFontType, getFullName, getKerningInfo, getWidth, getWidths, getXHeight, hasKerningInfo
public static final char NOT_FOUND
protected FontEventListener eventListener
public abstract String getEncodingName()
public abstract char mapChar(char c)
c
- character to mapprotected void notifyMapOperation()
public boolean hadMappingOperations()
public abstract boolean hasChar(char c)
c
- character to checkpublic boolean isMultiByte()
public int getMaxAscent(int size)
getMaxAscent
in interface FontMetrics
size
- font sizepublic void setEventListener(FontEventListener listener)
listener
- the font event listenerprotected void warnMissingGlyph(char c)
c
- the character which is missing.Copyright © 2007-2019. All Rights Reserved.