Class RtfFontManager
- java.lang.Object
-
- org.apache.fop.render.rtf.rtflib.rtfdoc.RtfFontManager
-
public final class RtfFontManager extends java.lang.ObjectRTF font table.
This work was authored by Andreas Putz (a.putz@skynamics.com).
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.HashtablefontIndexIndex table for the fontsprivate java.util.VectorfontTableUsed fonts to this vectorprivate static RtfFontManagerinstanceSingelton instance
-
Constructor Summary
Constructors Modifier Constructor Description privateRtfFontManager()Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidaddFont(java.lang.String family)Adds a font to the table.private java.lang.StringgetFontKey(java.lang.String family)intgetFontNumber(java.lang.String family)Gets the number of font in the font tablestatic RtfFontManagergetInstance()Singelton.private voidinit()Initialize the font table.voidwriteFonts(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
-
-