org.jfree.report.modules.output.support.itext
Class BaseFontSupport
java.lang.Object
|
+--org.jfree.report.modules.output.support.itext.BaseFontSupport
- public class BaseFontSupport
- extends java.lang.Object
- implements com.lowagie.text.pdf.FontMapper
iText font support.
- Author:
- Thomas Morgner
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
BaseFontSupport
public BaseFontSupport()
- Creates a new support instance.
BaseFontSupport
public BaseFontSupport(java.lang.String defaultEncoding)
getResourceManager
protected static org.jfree.resourceloader.ResourceManager getResourceManager()
getDefaultEncoding
public java.lang.String getDefaultEncoding()
setDefaultEncoding
public void setDefaultEncoding(java.lang.String defaultEncoding)
isEmbedFonts
public boolean isEmbedFonts()
setEmbedFonts
public void setEmbedFonts(boolean embedFonts)
close
public void close()
- Close the font support.
createBaseFont
public BaseFontRecord createBaseFont(FontDefinition font,
java.lang.String encoding,
boolean embedded)
throws BaseFontCreateException
- Creates a BaseFontRecord for an AWT font. If no basefont could be created, an
OutputTargetException is thrown.
- Parameters:
font - the new font (null not permitted).encoding - the encoding.embedded - a flag indicating whether to embed the font glyphs in the generated
documents.- Returns:
- the base font record.
- Throws:
- BaseFontCreateException - if there was a problem setting the font for the
target.
awtToPdf
public com.lowagie.text.pdf.BaseFont awtToPdf(java.awt.Font font)
- Returns a BaseFont which can be used to represent the given AWT Font
- Specified by:
- awtToPdf in interface com.lowagie.text.pdf.FontMapper
- Parameters:
font - the font to be converted- Returns:
- a BaseFont which has similar properties to the provided Font
pdfToAwt
public java.awt.Font pdfToAwt(com.lowagie.text.pdf.BaseFont font,
int size)
- Returns an AWT Font which can be used to represent the given BaseFont
- Specified by:
- pdfToAwt in interface com.lowagie.text.pdf.FontMapper
- Parameters:
font - the font to be convertedsize - the desired point size of the resulting font- Returns:
- a Font which has similar properties to the provided BaseFont