org.apache.fop.render.afp.fonts
Class RasterFont
- FontMetrics
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).
protected static Log | log - Static logging instance
|
RasterFont(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.
|
void | addCharacterSet(int size, CharacterSet characterSet)
|
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".
|
String | getEncoding() - 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").
|
char | mapChar(char c) - Map a Unicode character to a code point in the font.
|
log
protected static final Log log
Static logging instance
RasterFont
public RasterFont(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.
name
- the name of the font
addCharacterSet
public void addCharacterSet(int size,
CharacterSet characterSet)
getAscender
public 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". Also
used to denote the part of the letter extending above the x-height.
- getAscender in interface FontMetrics
getCapHeight
public int getCapHeight(int size)
Obtains the height of capital letters for the specified point size.
- getCapHeight in interface FontMetrics
getCharacterSet
public CharacterSet getCharacterSet(int size)
Get the character set metrics for the specified point size.
- getCharacterSet in interface AFPFont
- the character set metrics
getDescender
public 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". Also used to denote the part of the
letter extending below the base line.
- getDescender in interface FontMetrics
getEncoding
public String getEncoding()
Get the encoding of the font.
- getEncoding in interface Typeface
getFirstChar
public int getFirstChar()
Get the first character in this font.
getLastChar
public int getLastChar()
Get the last character in this font.
getWidth
public int getWidth(int character,
int size)
Obtain the width of the character for the specified point size.
- getWidth in interface FontMetrics
getWidths
public int[] getWidths()
Get the getWidth (in 1/1000ths of a point size) of all characters in this
character set.
- getWidths in interface FontMetrics
- the widths of all characters
getWidths
public int[] getWidths(int size)
Get the getWidth (in 1/1000ths of a point size) of all characters in this
character set.
- the widths of all characters
getXHeight
public int getXHeight(int size)
The "x-height" (the height of the letter "x").
- getXHeight in interface FontMetrics
mapChar
public char mapChar(char c)
Map a Unicode character to a code point in the font.
- mapChar in interface Typeface
Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.