Class RtfFontList

java.lang.Object
com.lowagie.text.rtf.RtfElement
com.lowagie.text.rtf.style.RtfFontList
All Implemented Interfaces:
RtfBasicElement, RtfExtendedElement, com.lowagie.text.RtfElementInterface

public class RtfFontList extends RtfElement implements RtfExtendedElement
The RtfFontList stores the list of fonts used in the rtf document. It also has methods for writing this list to the document Version: $Id: RtfFontList.java 3580 2008-08-06 15:52:00Z howard_s $
  • Field Details

    • DEFAULT_FONT

      private static final byte[] DEFAULT_FONT
      Constant for the default font
    • FONT_TABLE

      private static final byte[] FONT_TABLE
      Constant for the font table
    • FONT_NUMBER

      public static final byte[] FONT_NUMBER
      Constant for the font number
    • fontList

      private final List<RtfFont> fontList
      The list of fonts
  • Constructor Details

    • RtfFontList

      public RtfFontList(RtfDocument doc)
      Creates a RtfFontList
      Parameters:
      doc - The RtfDocument this RtfFontList belongs to
  • Method Details

    • writeContent

      public void writeContent(OutputStream out) throws IOException
      unused
      Specified by:
      writeContent in interface RtfBasicElement
      Specified by:
      writeContent in class RtfElement
      Parameters:
      out - The OutputStream to write the content to
      Throws:
      IOException
    • getFontNumber

      public int getFontNumber(RtfFont font)
      Gets the index of the font in the list of fonts. If the font does not exist in the list, it is added.
      Parameters:
      font - The font to get the id for
      Returns:
      The index of the font
    • writeDefinition

      public void writeDefinition(OutputStream result) throws IOException
      Writes the definition of the font list
      Specified by:
      writeDefinition in interface RtfExtendedElement
      Parameters:
      result - The OutputStream to write the element definition to
      Throws:
      IOException