FontMetrics
AFPFont
, Base14Font
, CustomFont
, CustomFontMetricsMapper
, LazyFont
, SystemFontMetricsMapper
public abstract class Typeface extends java.lang.Object implements FontMetrics
Modifier and Type | Field | 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 | Description |
---|---|
Typeface() |
Modifier and Type | Method | Description |
---|---|---|
abstract java.lang.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 |
hasFeature(int tableType,
java.lang.String script,
java.lang.String language,
java.lang.String feature) |
Determine if metrics supports specific feature in specified font table.
|
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.
|
java.lang.String |
toString() |
|
protected void |
warnMissingGlyph(char c) |
Provide proper warning if a glyph is not available.
|
getAscender, getBoundingBox, getCapHeight, getDescender, getEmbedFontName, getFamilyNames, getFontName, getFontType, getFontURI, getFullName, getKerningInfo, getStrikeoutPosition, getStrikeoutThickness, getUnderlinePosition, getUnderlineThickness, getWidth, getWidths, getXHeight, hasKerningInfo
public static final char NOT_FOUND
protected FontEventListener eventListener
public abstract java.lang.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()
isMultiByte
in interface FontMetrics
public int getMaxAscent(int size)
getMaxAscent
in interface FontMetrics
size
- font sizepublic boolean hasFeature(int tableType, java.lang.String script, java.lang.String language, java.lang.String feature)
hasFeature
in interface FontMetrics
tableType
- type of table (GSUB, GPOS, ...), see GlyphTable.GLYPH_TABLE_TYPE_*script
- to qualify feature lookuplanguage
- to qualify feature lookupfeature
- to testpublic void setEventListener(FontEventListener listener)
listener
- the font event listenerprotected void warnMissingGlyph(char c)
c
- the character which is missing.public java.lang.String toString()
toString
in class java.lang.Object
Copyright 1999-2016 The Apache Software Foundation. All Rights Reserved.