|
fop 1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.fonts.Typeface
org.apache.fop.afp.fonts.AFPFont
org.apache.fop.afp.fonts.RasterFont
public class RasterFont
A font where each character is stored as an array of pixels (a bitmap). Such fonts are not easily scalable, in contrast to vectored fonts. With this type of font, the font metrics information is held in character set files (one for each size and style).
Field Summary | |
---|---|
protected static org.apache.commons.logging.Log |
log
Static logging instance |
Fields inherited from class org.apache.fop.afp.fonts.AFPFont |
---|
name |
Fields inherited from class org.apache.fop.fonts.Typeface |
---|
eventListener, NOT_FOUND |
Constructor Summary | |
---|---|
RasterFont(java.lang.String name)
Constructor for the raster font requires the name, weight and style attribute to be available as this forms the key to the font. |
Method Summary | |
---|---|
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". |
int |
getCapHeight(int size)
Obtains the height of capital letters for the specified point size. |
CharacterSet |
getCharacterSet(int size)
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 |
getFirstChar()
Get the first character in this font. |
int |
getLastChar()
Get the last character in this font. |
int |
getWidth(int character,
int size)
Obtain the width of the character for the specified point size. |
int[] |
getWidths()
Get the getWidth (in 1/1000ths of a point size) of all characters in this character set. |
int[] |
getWidths(int size)
Get the getWidth (in 1/1000ths of a point size) of all characters in this character set. |
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. |
Methods inherited from class org.apache.fop.afp.fonts.AFPFont |
---|
getEmbedFontName, getFamilyNames, getFontName, getFontType, getFullName, getKerningInfo, hasKerningInfo, isEmbeddable, setEmbeddable, toString, toUnicodeCodepoint |
Methods inherited from class org.apache.fop.fonts.Typeface |
---|
getMaxAscent, hadMappingOperations, isMultiByte, notifyMapOperation, setEventListener, warnMissingGlyph |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.commons.logging.Log log
Constructor Detail |
---|
public RasterFont(java.lang.String name)
name
- the name of the fontMethod Detail |
---|
public void addCharacterSet(int size, CharacterSet characterSet)
size
- point size (in mpt)characterSet
- character setpublic CharacterSet getCharacterSet(int size)
getCharacterSet
in class AFPFont
size
- the point size (in mpt)
public int getFirstChar()
public int getLastChar()
public int getAscender(int size)
size
- the font size (in mpt)
public 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 int[] getWidths(int size)
size
- the font size (in mpt)
public int[] getWidths()
public boolean hasChar(char c)
hasChar
in class Typeface
c
- character to check
public char mapChar(char c)
mapChar
in class Typeface
c
- character to map
public java.lang.String getEncodingName()
getEncodingName
in class Typeface
|
fop 1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |