public class FopCharacterSet extends CharacterSet
codePage, DEFAULT_CODEPAGE, DEFAULT_ENCODING, encoding, LOG, name, SUPPORTED_ORIENTATION
Constructor and Description |
---|
FopCharacterSet(String codePage,
String encoding,
String name,
Typeface charSet,
AFPEventProducer eventProducer)
Constructor for the CharacterSetMetric object, the character set is used
to load the font information from the actual AFP font.
|
FopCharacterSet(String codePage,
String encoding,
String name,
Typeface charSet,
AFPResourceAccessor accessor,
AFPEventProducer eventProducer) |
Modifier and Type | Method and Description |
---|---|
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.
|
Rectangle |
getCharacterBox(char character,
int size) |
int |
getDescender()
Descender depth is the distance from the character baseline to
the bottom of a character box.
|
int |
getUnderscorePosition()
Return the position for an underscore (_) character.
|
int |
getUnderscoreWidth()
Return the width to use for an underscore (_) character.
|
int |
getWidth(char character,
int size)
Get the width (in 1/1000ths of a point size) of the character
identified by the parameter passed.
|
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.
|
addCharacterSetOrientation, encodeChars, getCodePage, getEmSpaceIncrement, getEncoding, getName, getNameBytes, getNominalCharIncrement, getNominalVerticalSize, getResourceAccessor, getSpaceIncrement, hasChar, setNominalVerticalSize
public FopCharacterSet(String codePage, String encoding, String name, Typeface charSet, AFPEventProducer eventProducer)
codePage
- the code page identifierencoding
- the encoding of the fontname
- the character set namecharSet
- the fop character seteventProducer
- for handling AFP related eventspublic FopCharacterSet(String codePage, String encoding, String name, Typeface charSet, AFPResourceAccessor accessor, AFPEventProducer eventProducer)
public int getAscender()
getAscender
in class CharacterSet
public int getCapHeight()
getCapHeight
in class CharacterSet
public int getDescender()
getDescender
in class CharacterSet
public int getXHeight()
getXHeight
in class CharacterSet
public int getWidth(char character, int size)
CharacterSet
getWidth
in class CharacterSet
character
- the Unicode character from which the width will be calculatedsize
- the font sizepublic Rectangle getCharacterBox(char character, int size)
getCharacterBox
in class CharacterSet
public int getUnderscoreWidth()
CharacterSet
getUnderscoreWidth
in class CharacterSet
public int getUnderscorePosition()
CharacterSet
getUnderscorePosition
in class CharacterSet
public char mapChar(char c)
mapChar
in class CharacterSet
c
- character to mapCopyright © 2025 Apache Software Foundation. All rights reserved.