| java.lang.Object com.lowagie.text.Font com.lowagie.text.rtf.style.RtfFont
All known Subclasses: com.lowagie.text.rtf.style.RtfParagraphStyle,
RtfFont | public class RtfFont extends Font implements RtfExtendedElement(Code) | | The RtfFont class stores one font for an rtf document. It extends Font,
so can be set as a font, to allow adding of fonts with arbitrary names.
BaseFont fontname handling contributed by Craig Fleming. Various fixes
Renaud Michel, Werner Daehn.
Version: $Id: RtfFont.java 2784 2007-05-24 15:43:40Z hallm $
author: Mark Hall (mhall@edu.uni-klu.ac.at) author: Craig Fleming (rythos@rhana.dhs.org) author: Renaud Michel (r.michel@immedia.be) author: Werner Daehn (Werner.Daehn@BusinessObjects.com) author: Lidong Liu (tmslld@gmail.com) author: Thomas Bickel (tmb99@inode.at) |
Constructor Summary | |
public | RtfFont(String fontName) Constructs a RtfFont with the given font name and all other properties
at their default values. | public | RtfFont(String fontName, float size) Constructs a RtfFont with the given font name and font size and all other
properties at their default values. | public | RtfFont(String fontName, float size, int style) Constructs a RtfFont with the given font name, font size and font style and the
default color. | public | RtfFont(String fontName, float size, int style, Color color) Constructs a RtfFont with the given font name, font size, font style and
color. | public | RtfFont(String fontName, float size, int style, Color color, int charset) Constructs a RtfFont with the given font name, font size, font style, colour
and charset. | protected | RtfFont(RtfDocument doc, int fontNumber) | public | RtfFont(RtfDocument doc, Font font) |
FONT_SIZE | final public static byte[] FONT_SIZE(Code) | | Constant for the font size
|
STYLE_BOLD | final public static int STYLE_BOLD(Code) | | Constant for a bold font
|
STYLE_DOUBLE_STRIKETHROUGH | final public static int STYLE_DOUBLE_STRIKETHROUGH(Code) | | Constant for a double strikethrough font
|
STYLE_EMBOSSED | final public static int STYLE_EMBOSSED(Code) | | Constant for an embossed font
|
STYLE_ENGRAVED | final public static int STYLE_ENGRAVED(Code) | | Constant for an engraved font
|
STYLE_HIDDEN | final public static int STYLE_HIDDEN(Code) | | Constant for a font that hides the actual text.
|
STYLE_ITALIC | final public static int STYLE_ITALIC(Code) | | Constant for an italic font
|
STYLE_NONE | final public static int STYLE_NONE(Code) | | Constant for a plain font
|
STYLE_OUTLINE | final public static int STYLE_OUTLINE(Code) | | Constant for an outlined font
|
STYLE_SHADOW | final public static int STYLE_SHADOW(Code) | | Constant for a shadowed font
|
STYLE_STRIKETHROUGH | final public static int STYLE_STRIKETHROUGH(Code) | | Constant for a strikethrough font
|
STYLE_UNDERLINE | final public static int STYLE_UNDERLINE(Code) | | Constant for an underlined font
|
document | protected RtfDocument document(Code) | | The RtfDocument this RtfFont belongs to.
|
RtfFont | public RtfFont(String fontName)(Code) | | Constructs a RtfFont with the given font name and all other properties
at their default values.
Parameters: fontName - The font name to use |
RtfFont | public RtfFont(String fontName, float size)(Code) | | Constructs a RtfFont with the given font name and font size and all other
properties at their default values.
Parameters: fontName - The font name to use Parameters: size - The font size to use |
RtfFont | public RtfFont(String fontName, float size, int style)(Code) | | Constructs a RtfFont with the given font name, font size and font style and the
default color.
Parameters: fontName - The font name to use Parameters: size - The font size to use Parameters: style - The font style to use |
RtfFont | public RtfFont(String fontName, float size, int style, Color color)(Code) | | Constructs a RtfFont with the given font name, font size, font style and
color.
Parameters: fontName - The font name to use Parameters: size - the font size to use Parameters: style - The font style to use Parameters: color - The font color to use |
RtfFont | public RtfFont(String fontName, float size, int style, Color color, int charset)(Code) | | Constructs a RtfFont with the given font name, font size, font style, colour
and charset. This can be used when generating non latin-1 text.
Parameters: fontName - The font name to use Parameters: size - the font size to use Parameters: style - The font style to use Parameters: color - The font color to use Parameters: charset - The charset of the font content |
RtfFont | protected RtfFont(RtfDocument doc, int fontNumber)(Code) | | Special constructor for the default font
Parameters: doc - The RtfDocument this font appears in Parameters: fontNumber - The id of this font |
RtfFont | public RtfFont(RtfDocument doc, Font font)(Code) | | Constructs a RtfFont from a com.lowagie.text.Font
Parameters: doc - The RtfDocument this font appears in Parameters: font - The Font to use as a base |
difference | public Font difference(Font font)(Code) | | Replaces the attributes that are equal to null with
the attributes of a given font.
Parameters: font - The surrounding font A RtfFont |
equals | public boolean equals(Object obj)(Code) | | Tests for equality of RtfFonts. RtfFonts are equal if their fontName,
fontSize, fontStyle and fontSuperSubscript are equal
Parameters: obj - The RtfFont to compare with this RtfFont True if the RtfFonts are equal, false otherwise |
getCharset | public int getCharset()(Code) | | Gets the charset used for constructing this RtfFont.
The charset of this RtfFont. |
getFontName | public String getFontName()(Code) | | Gets the font name of this RtfFont
The font name |
getFontNumber | public int getFontNumber()(Code) | | Gets the font number of this RtfFont
The font number |
getFontSize | public int getFontSize()(Code) | | Gets the font size of this RtfFont
The font size |
getFontStyle | public int getFontStyle()(Code) | | Gets the font style of this RtfFont
The font style |
hashCode | public int hashCode()(Code) | | Returns the hash code of this RtfFont. The hash code is the hash code of the
string containing the font name + font size + "-" + the font style + "-" + the
font super/supscript value.
The hash code of this RtfFont |
intToByteArray | protected byte[] intToByteArray(int i)(Code) | | Transforms an integer into its String representation and then returns the bytes
of that string.
Parameters: i - The integer to convert A byte array representing the integer |
setCharset | public void setCharset(int charset)(Code) | | Sets the charset used for constructing this RtfFont.
Parameters: charset - The charset to use. |
setFontName | protected void setFontName(String fontName)(Code) | | Sets the font name of this RtfFont.
Parameters: fontName - The font name to use |
setInHeader | public void setInHeader(boolean inHeader)(Code) | | Unused
Parameters: inHeader - |
setInTable | public void setInTable(boolean inTable)(Code) | | Unused
Parameters: inTable - |
setRtfDocument | public void setRtfDocument(RtfDocument doc)(Code) | | Sets the RtfDocument this RtfFont belongs to
Parameters: doc - The RtfDocument to use |
writeBegin | public byte[] writeBegin()(Code) | | Writes the font beginning
A byte array with the font start data |
writeEnd | public byte[] writeEnd()(Code) | | Write the font end
A byte array with the end of font data |
|
|