Class RtfFontManager

java.lang.Object
org.apache.fop.render.rtf.rtflib.rtfdoc.RtfFontManager

public final class RtfFontManager extends Object

RTF font table.

This work was authored by Andreas Putz (a.putz@skynamics.com).

  • Field Details

    • instance

      private static RtfFontManager instance
      Singelton instance
    • fontIndex

      private Hashtable fontIndex
      Index table for the fonts
    • fontTable

      private Vector fontTable
      Used fonts to this vector
  • Constructor Details

    • RtfFontManager

      private RtfFontManager()
      Constructor.
  • Method Details

    • getInstance

      public static RtfFontManager getInstance()
      Singelton.
      Returns:
      The instance of RtfFontManager
    • init

      private void init()
      Initialize the font table.
    • getFontNumber

      public int getFontNumber(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 IOException
      Writes the font table in the header.
      Parameters:
      header - The header container to write in
      Throws:
      IOException - On error
    • getFontKey

      private String getFontKey(String family)
    • addFont

      private void addFont(String family)
      Adds a font to the table.
      Parameters:
      family - Identifier of font