Class FontTable

java.lang.Object
com.scroogexhtml.rtf.FontTable

public class FontTable extends Object
Contains a list of fonts which are defined in the RTF header.
  • Constructor Details

    • FontTable

      public FontTable()
  • Method Details

    • get

      public FontDescriptor get(int key)
      Note: returns EMPTY_FONT when no matching font exists in the font table.
      Parameters:
      key - the font index
      Returns:
      the FontDescriptor for the given font index, or EMPTY_FONT.
    • getFontName

      public String getFontName(int fontNr)
      Return the font name for the specified font.
      Parameters:
      fontNr - font number.
      Returns:
      font name.
    • getFontCharSet

      public int getFontCharSet(int fontNr)
      Return the charset for the specified font.
      Parameters:
      fontNr - font number.
      Returns:
      charset
    • put

      public void put(int fontNr, FontDescriptor fontDescriptor)
      Map the font descriptor to the given font nr.
      Parameters:
      fontNr - font number.
      fontDescriptor - font descriptor