jfig.utils
Class ItextFontMapper

java.lang.Object
  extended bycom.lowagie.text.pdf.DefaultFontMapper
      extended byjfig.utils.ItextFontMapper
All Implemented Interfaces:
com.lowagie.text.pdf.FontMapper

public class ItextFontMapper
extends com.lowagie.text.pdf.DefaultFontMapper
implements com.lowagie.text.pdf.FontMapper

A class to map AWT fonts to Itext BaseFont. Unlike the original DefaultFontMapper from itext, we also check for and allow the traditional JDK 1.1-style font names like "Courier"/"Monospaced"/"TimesRoman"/"Serif"/"Helvetica"/"SansSerif". This class also knows about the CM fonts used for TeX-mode text objects.


Nested Class Summary
 
Nested classes inherited from class com.lowagie.text.pdf.DefaultFontMapper
com.lowagie.text.pdf.DefaultFontMapper.BaseFontParameters
 
Constructor Summary
ItextFontMapper()
           
 
Method Summary
 com.lowagie.text.pdf.BaseFont awtToPdf(java.awt.Font font)
          Returns a BaseFont which can be used to represent the given AWT Font
 void msg(java.lang.String s)
           
 void setVerbose(boolean b)
           
 
Methods inherited from class com.lowagie.text.pdf.DefaultFontMapper
getAliases, getBaseFontParameters, getMapper, insertDirectory, insertNames, pdfToAwt, putAlias, putName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.lowagie.text.pdf.FontMapper
pdfToAwt
 

Constructor Detail

ItextFontMapper

public ItextFontMapper()
Method Detail

setVerbose

public void setVerbose(boolean b)

msg

public void msg(java.lang.String s)

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