com.lowagie.text.rtf.style

Class RtfFontList

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,v 1.19 2006/09/14 23:52:27 xlv Exp $

Author: Mark Hall (mhall@edu.uni-klu.ac.at)

Field Summary
static byte[]DEFAULT_FONT
Constant for the default font
ArrayListfontList
The list of fonts
static byte[]FONT_NUMBER
Constant for the font number
static byte[]FONT_TABLE
Constant for the font table
Constructor Summary
RtfFontList(RtfDocument doc)
Creates a RtfFontList
Method Summary
intgetFontNumber(RtfFont font)
Gets the index of the font in the list of fonts.
byte[]writeDefinition()
Writes the definition of the font list

Field Detail

DEFAULT_FONT

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

fontList

private ArrayList fontList
The list of fonts

FONT_NUMBER

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

FONT_TABLE

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

Constructor Detail

RtfFontList

public RtfFontList(RtfDocument doc)
Creates a RtfFontList

Parameters: doc The RtfDocument this RtfFontList belongs to

Method Detail

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 byte[] writeDefinition()
Writes the definition of the font list

Returns: A byte array with the definition of the font list