com.lowagie.text.pdf
class PdfFont extends Object implements Comparable
PdfFont
is the Pdf Font object.
Limitation: in this class only base 14 Type 1 fonts (courier, courier bold, courier oblique,
courier boldoblique, helvetica, helvetica bold, helvetica oblique, helvetica boldoblique,
symbol, times roman, times bold, times italic, times bolditalic, zapfdingbats) and their
standard encoding (standard, MacRoman, (MacExpert,) WinAnsi) are supported.
This object is described in the 'Portable Document Format Reference Manual version 1.3'
section 7.7 (page 198-203).
See Also: PdfName PdfDictionary BadPdfFormatException
Field Summary | |
---|---|
BaseFont | font the font metrics. |
protected float | hScale |
protected Image | image an image. |
float | size the size. |
Constructor Summary | |
---|---|
PdfFont(BaseFont bf, float size) |
Method Summary | |
---|---|
int | compareTo(Object object)
Compares this PdfFont with another
|
static PdfFont | getDefaultFont() |
BaseFont | getFont() |
void | setHorizontalScaling(float hScale) |
void | setImage(Image image) |
float | size()
Returns the size of this font.
|
float | width()
Returns the approximative width of 1 character of this font.
|
float | width(int character)
Returns the width of a certain character of this font.
|
float | width(String s) |
PdfFont
with another
Parameters: object the other PdfFont
Returns: a value
Returns: a size
Returns: a width in Text Space
Parameters: character a certain character
Returns: a width in Text Space