|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.lowagie.text.pdf.DefaultFontMapper
Default class to map awt fonts to BaseFont.
| Nested Class Summary | |
static class |
DefaultFontMapper.BaseFontParameters
A representation of BaseFont parameters. |
| Field Summary | |
private HashMap |
aliases
Maps aliases to names. |
private HashMap |
mapper
Maps names to BaseFont parameters. |
| Constructor Summary | |
DefaultFontMapper()
|
|
| Method Summary | |
BaseFont |
awtToPdf(Font font)
Returns a BaseFont which can be used to represent the given AWT Font |
HashMap |
getAliases()
|
DefaultFontMapper.BaseFontParameters |
getBaseFontParameters(String name)
Looks for a BaseFont parameter associated with a name. |
HashMap |
getMapper()
|
int |
insertDirectory(String dir)
Inserts all the fonts recognized by iText in the directory into the map. |
protected void |
insertNames(String[][] names,
String path)
|
Font |
pdfToAwt(BaseFont font,
int size)
Returns an AWT Font which can be used to represent the given BaseFont |
void |
putAlias(String alias,
String awtName)
Maps an alias to a name. |
void |
putName(String awtName,
DefaultFontMapper.BaseFontParameters parameters)
Maps a name to a BaseFont parameter. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private HashMap aliases
private HashMap mapper
| Constructor Detail |
public DefaultFontMapper()
| Method Detail |
public BaseFont awtToPdf(Font font)
awtToPdf in interface FontMapperfont - the font to be converted
public Font pdfToAwt(BaseFont font,
int size)
pdfToAwt in interface FontMapperfont - the font to be convertedsize - the desired point size of the resulting font
public void putName(String awtName,
DefaultFontMapper.BaseFontParameters parameters)
awtName - the nameparameters - the BaseFont parameter
public void putAlias(String alias,
String awtName)
alias - the aliasawtName - the namepublic DefaultFontMapper.BaseFontParameters getBaseFontParameters(String name)
name - the name
null if not found.
protected void insertNames(String[][] names,
String path)
public int insertDirectory(String dir)
directory into the map. The encoding
will be BaseFont.CP1252 but can be
changed later.
dir - the directory to scan
public HashMap getMapper()
public HashMap getAliases()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||