Package com.lowagie.text.rtf.style
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
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 Summary
FieldsModifier and TypeFieldDescriptionprivate static final byte[]
Constant for the default fontstatic final byte[]
Constant for the font numberprivate static final byte[]
Constant for the font tableThe list of fontsFields inherited from class com.lowagie.text.rtf.RtfElement
document, inHeader, inTable
Fields inherited from interface com.lowagie.text.rtf.RtfBasicElement
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getFontNumber
(RtfFont font) Gets the index of the font in the list of fonts.void
writeContent
(OutputStream out) unusedvoid
writeDefinition
(OutputStream result) Writes the definition of the font listMethods inherited from class com.lowagie.text.rtf.RtfElement
intToByteArray, isInTable, setInHeader, setInTable, setRtfDocument
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.lowagie.text.rtf.RtfBasicElement
setInHeader, setInTable, setRtfDocument
-
Field Details
-
DEFAULT_FONT
private static final byte[] DEFAULT_FONTConstant for the default font -
FONT_TABLE
private static final byte[] FONT_TABLEConstant for the font table -
FONT_NUMBER
public static final byte[] FONT_NUMBERConstant for the font number -
fontList
The list of fonts
-
-
Constructor Details
-
RtfFontList
Creates a RtfFontList- Parameters:
doc
- The RtfDocument this RtfFontList belongs to
-
-
Method Details
-
writeContent
unused- Specified by:
writeContent
in interfaceRtfBasicElement
- Specified by:
writeContent
in classRtfElement
- Parameters:
out
- TheOutputStream
to write the content to- Throws:
IOException
-
getFontNumber
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
Writes the definition of the font list- Specified by:
writeDefinition
in interfaceRtfExtendedElement
- Parameters:
result
- TheOutputStream
to write the element definition to- Throws:
IOException
-