org.apache.fop.render.afp.fonts
public class CharacterSet extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
codePage
The code page to which the character set relates
|
protected java.lang.String |
encoding
The encoding used for the code page
|
protected static org.apache.commons.logging.Log |
log
Static logging instance
|
protected java.lang.String |
name
The character set relating to the font
|
protected java.lang.String |
path
The path to the installed fonts
|
Constructor and Description |
---|
CharacterSet(java.lang.String codePage,
java.lang.String encoding,
java.lang.String name,
java.lang.String path)
Constructor for the CharacterSetMetric object, the character set is used
to load the font information from the actual AFP font.
|
Modifier and Type | Method and Description |
---|---|
void |
addCharacterSetOrientation(CharacterSetOrientation cso)
Add character set metric information for the different orientations
|
int |
getAscender()
Ascender height is the distance from the character baseline to the
top of the character box.
|
int |
getCapHeight()
Cap height is the average height of the uppercase characters in
a font.
|
java.lang.String |
getCodePage()
Returns the AFP code page identifier
|
int |
getDescender()
Descender depth is the distance from the character baseline to
the bottom of a character box.
|
java.lang.String |
getEncoding()
Returns the AFP code page encoding
|
int |
getFirstChar()
The first character in the character set
|
int |
getLastChar()
The last character in the character set
|
java.lang.String |
getName()
Returns the AFP character set identifier
|
byte[] |
getNameBytes()
Returns the AFP character set identifier
|
java.lang.String |
getPath() |
int[] |
getWidths()
Get the width (in 1/1000ths of a point size) of all characters
|
int |
getXHeight()
XHeight refers to the height of the lower case letters above the baseline.
|
char |
mapChar(char c)
Map a Unicode character to a code point in the font.
|
int |
width(int character)
Get the width (in 1/1000ths of a point size) of the character
identified by the parameter passed.
|
protected static final org.apache.commons.logging.Log log
protected java.lang.String codePage
protected java.lang.String encoding
protected java.lang.String name
protected java.lang.String path
public CharacterSet(java.lang.String codePage, java.lang.String encoding, java.lang.String name, java.lang.String path)
codePage
- the code page identifierencoding
- the encoding of the fontname
- the character set namepath
- the path to the installed afp fontspublic void addCharacterSetOrientation(CharacterSetOrientation cso)
cso
- the metrics for the orientationpublic int getAscender()
public int getCapHeight()
public int getDescender()
public int getFirstChar()
public int getLastChar()
public java.lang.String getPath()
public int[] getWidths()
public int getXHeight()
public int width(int character)
character
- the character from which the width will be calculatedpublic java.lang.String getName()
public byte[] getNameBytes()
public java.lang.String getCodePage()
public java.lang.String getEncoding()
public char mapChar(char c)
c
- character to mapCopyright 1999-2008 The Apache Software Foundation. All Rights Reserved.