Class RtfFontManager
- java.lang.Object
-
- org.apache.fop.render.rtf.rtflib.rtfdoc.RtfFontManager
-
public final class RtfFontManager extends java.lang.Object
RTF font table.
This work was authored by Andreas Putz (a.putz@skynamics.com).
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Hashtable
fontIndex
Index table for the fontsprivate java.util.Vector
fontTable
Used fonts to this vectorprivate static RtfFontManager
instance
Singelton instance
-
Constructor Summary
Constructors Modifier Constructor Description private
RtfFontManager()
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addFont(java.lang.String family)
Adds a font to the table.private java.lang.String
getFontKey(java.lang.String family)
int
getFontNumber(java.lang.String family)
Gets the number of font in the font tablestatic RtfFontManager
getInstance()
Singelton.private void
init()
Initialize the font table.void
writeFonts(RtfHeader header)
Writes the font table in the header.
-
-
-
Field Detail
-
instance
private static RtfFontManager instance
Singelton instance
-
fontIndex
private java.util.Hashtable fontIndex
Index table for the fonts
-
fontTable
private java.util.Vector fontTable
Used fonts to this vector
-
-
Method Detail
-
getInstance
public static RtfFontManager getInstance()
Singelton.- Returns:
- The instance of RtfFontManager
-
init
private void init()
Initialize the font table.
-
getFontNumber
public int getFontNumber(java.lang.String family)
Gets the number of font in the font table- Parameters:
family
- Font family name ('Helvetica')- Returns:
- The number of the font in the table
-
writeFonts
public void writeFonts(RtfHeader header) throws java.io.IOException
Writes the font table in the header.- Parameters:
header
- The header container to write in- Throws:
java.io.IOException
- On error
-
getFontKey
private java.lang.String getFontKey(java.lang.String family)
-
addFont
private void addFont(java.lang.String family)
Adds a font to the table.- Parameters:
family
- Identifier of font
-
-