com.lowagie.text.rtf.style
public class RtfFont extends Font implements RtfExtendedElement
Field Summary | |
---|---|
int | charset
The character set to use for this font |
RtfColor | color
The color of this font |
protected RtfDocument | document
The RtfDocument this RtfFont belongs to. |
String | fontName
The font name. |
int | fontNumber
The number of this font |
int | fontSize
The font size. |
int | fontStyle
The font style. |
static byte[] | FONT_BOLD
Constant for the bold flag |
static byte[] | FONT_CHARSET
Constant for the charset |
static byte[] | FONT_DOUBLE_STRIKETHROUGH
Constant for the double strikethrough flag |
static byte[] | FONT_EMBOSSED
Constant for the embossed flag |
static byte[] | FONT_ENGRAVED
Constant for the engraved flag |
static byte[] | FONT_FAMILY
Constant for the font family to use ("froman") |
static byte[] | FONT_HIDDEN
Constant for hidden text flag |
static byte[] | FONT_ITALIC
Constant for the italic flag |
static byte[] | FONT_OUTLINE
Constant for the outline flag |
static byte[] | FONT_SHADOW
Constant for the shadow flag |
static byte[] | FONT_SIZE
Constant for the font size |
static byte[] | FONT_STRIKETHROUGH
Constant for the strikethrough flag |
static byte[] | FONT_UNDERLINE
Constant for the underline flag |
static int | STYLE_BOLD
Constant for a bold font |
static int | STYLE_DOUBLE_STRIKETHROUGH
Constant for a double strikethrough font |
static int | STYLE_EMBOSSED
Constant for an embossed font |
static int | STYLE_ENGRAVED
Constant for an engraved font |
static int | STYLE_HIDDEN
Constant for a font that hides the actual text. |
static int | STYLE_ITALIC
Constant for an italic font |
static int | STYLE_NONE
Constant for a plain font |
static int | STYLE_OUTLINE
Constant for an outlined font |
static int | STYLE_SHADOW
Constant for a shadowed font |
static int | STYLE_STRIKETHROUGH
Constant for a strikethrough font |
static int | STYLE_UNDERLINE
Constant for an underlined font |
Constructor Summary | |
---|---|
RtfFont(String fontName)
Constructs a RtfFont with the given font name and all other properties
at their default values.
| |
RtfFont(String fontName, float size)
Constructs a RtfFont with the given font name and font size and all other
properties at their default values.
| |
RtfFont(String fontName, float size, int style)
Constructs a RtfFont with the given font name, font size and font style and the
default color.
| |
RtfFont(String fontName, float size, int style, Color color)
Constructs a RtfFont with the given font name, font size, font style and
color.
| |
RtfFont(String fontName, float size, int style, Color color, int charset)
Constructs a RtfFont with the given font name, font size, font style, color
and charset. | |
protected | RtfFont(RtfDocument doc, int fontNumber)
Special constructor for the default font
|
RtfFont(RtfDocument doc, Font font)
Constructs a RtfFont from a com.lowagie.text.Font |
Method Summary | |
---|---|
int | compareTo(Object object) |
Font | difference(Font font)
Replaces the attributes that are equal to null with
the attributes of a given font.
|
boolean | equals(Object obj)
Tests for equality of RtfFonts. |
int | getCharset()
Gets the charset used for constructing this RtfFont.
|
String | getFamilyname() |
String | getFontName()
Gets the font name of this RtfFont
|
int | getFontNumber()
Gets the font number of this RtfFont
|
int | getFontSize()
Gets the font size of this RtfFont
|
int | getFontStyle()
Gets the font style of this RtfFont
|
int | hashCode()
Returns the hash code of this RtfFont. |
protected byte[] | intToByteArray(int i)
Transforms an integer into its String representation and then returns the bytes
of that string.
|
boolean | isStandardFont()
The RtfFont is never a standard font.
|
void | setCharset(int charset)
Sets the charset used for constructing this RtfFont.
|
void | setColor(Color color) |
void | setColor(int red, int green, int blue) |
void | setFamily(String family) |
protected void | setFontName(String fontName)
Sets the font name of this RtfFont.
|
void | setInHeader(boolean inHeader)
Unused |
void | setInTable(boolean inTable)
Unused |
void | setRtfDocument(RtfDocument doc)
Sets the RtfDocument this RtfFont belongs to
|
void | setSize(float size) |
void | setStyle(int style) |
void | setStyle(String style) |
void | setToDefaultFamily(String familyname)
Sets the correct font name from the family name.
|
void | writeBegin(OutputStream result)
Writes the font beginning
|
void | writeContent(OutputStream out)
unused |
void | writeDefinition(OutputStream result)
Writes the font definition |
void | writeEnd(OutputStream result)
Write the font end
|
Parameters: fontName The font name to use
Parameters: fontName The font name to use size The font size to use
Parameters: fontName The font name to use size The font size to use style The font style to use
Parameters: fontName The font name to use size the font size to use style The font style to use color The font color to use
Parameters: fontName The font name to use size the font size to use style The font style to use color The font color to use charset The charset of the font content
Parameters: doc The RtfDocument this font appears in fontNumber The id of this font
Parameters: doc The RtfDocument this font appears in font The Font to use as a base
Parameters: font The surrounding font
Returns: A RtfFont
Parameters: obj The RtfFont to compare with this RtfFont
Returns: True
if the RtfFonts are equal, false
otherwise
Returns: The charset of this RtfFont.
See Also: getFamilyname
Returns: The font name
Returns: The font number
Returns: The font size
Returns: The font style
Returns: The hash code of this RtfFont
Parameters: i The integer to convert
Returns: A byte array representing the integer
RtfFont
is never a standard font.
Since: 2.1.0
Parameters: charset The charset to use.
See Also: setColor
See Also: Font
See Also: setFamily
Parameters: fontName The font name to use
Parameters: inHeader
Parameters: inTable
Parameters: doc The RtfDocument to use
See Also: Font
See Also: Font
See Also: setStyle
Parameters: familyname The family name to set the name to.
Parameters: result The OutputStream
to write to.
Throws: IOException On i/o errors.
Parameters: result The OutputStream
to write to.
Throws: IOException On i/o errors.