ru.novosoft.dc.rtf.dom.objects
Class RTFFont

java.lang.Object
  |
  +--ru.novosoft.dc.rtf.dom.objects.RTFFont

public class RTFFont
extends java.lang.Object

The class supports all properties of fonts in RTF Specification 1.6 except font embedding property.


Field Summary
static byte BIDI
          Family of Arabic, Hebrew, or other bidirectional fonts
static byte DECOR
          Family of decorative fonts
static byte MODERN
          Family of fixed-pitch serif and sans serif fonts
static byte NIL
          Family of unknown or default fonts
static byte ROMAN
          Family of roman, proportionally spaced serif fonts
static byte SCRIPT
          Family of script fonts
static byte SWISS
          Family of swiss, proportionally spaced sans serif fonts
static byte TECH
          Family of technical, symbol, and mathematical fonts
 
Constructor Summary
RTFFont(int index)
          Construct a font of the required index.
 
Method Summary
 void exportTo(org.w3c.dom.Element elem, boolean usedOnly)
          Export the contents of this object to the specified DOM element.
 java.lang.String getAltName()
          Get the alternative font name
 int getCharset()
          Get the font charset (-1 means unspecified charset)
 int getCodePage()
          Get the font code page number (0 means unspecified code page)
 int getFamily()
          Get the font family
 java.lang.String getName()
          Get the font name
 java.lang.String getNontaggedName()
          Get the nontagged font name
 Panose getPanoseClassifier()
          Get the panose classifier
 int getPitch()
          Get the font pitch (0 is the default pitch, 1 is the fixed pitch, 2 is the variable pitch)
 int index()
          Return the index of the font (font number).
 boolean inUse()
          Return the value of the "in use" tag.
 void setAltName(java.lang.String value)
          Set the alternative font name
 void setCharset(int value)
          Set the font charset
 void setCodePage(int value)
          Set the font code page number
 void setFamily(int value)
          Set the font family
 void setInUse(boolean value)
          Set a value for the "in use" tag.
 void setName(java.lang.String value)
          Set the font name
 void setNontaggedName(java.lang.String value)
          Set the nontagged font name
 void setPanoseClassifier(Panose value)
          Set the panose classifier
 void setPitch(int value)
          Set the font pitch
 java.lang.String toString()
          Return representation of the font as ANSI string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NIL

public static final byte NIL
Family of unknown or default fonts

ROMAN

public static final byte ROMAN
Family of roman, proportionally spaced serif fonts

SWISS

public static final byte SWISS
Family of swiss, proportionally spaced sans serif fonts

MODERN

public static final byte MODERN
Family of fixed-pitch serif and sans serif fonts

SCRIPT

public static final byte SCRIPT
Family of script fonts

DECOR

public static final byte DECOR
Family of decorative fonts

TECH

public static final byte TECH
Family of technical, symbol, and mathematical fonts

BIDI

public static final byte BIDI
Family of Arabic, Hebrew, or other bidirectional fonts
Constructor Detail

RTFFont

public RTFFont(int index)
Construct a font of the required index.
Method Detail

index

public final int index()
Return the index of the font (font number).

setInUse

public final void setInUse(boolean value)
Set a value for the "in use" tag.

inUse

public final boolean inUse()
Return the value of the "in use" tag.

setFamily

public final void setFamily(int value)
Set the font family

getFamily

public final int getFamily()
Get the font family

setCharset

public final void setCharset(int value)
Set the font charset

getCharset

public final int getCharset()
Get the font charset (-1 means unspecified charset)

setCodePage

public final void setCodePage(int value)
Set the font code page number

getCodePage

public final int getCodePage()
Get the font code page number (0 means unspecified code page)

setPitch

public final void setPitch(int value)
Set the font pitch

getPitch

public final int getPitch()
Get the font pitch (0 is the default pitch, 1 is the fixed pitch, 2 is the variable pitch)

setPanoseClassifier

public final void setPanoseClassifier(Panose value)
Set the panose classifier

getPanoseClassifier

public final Panose getPanoseClassifier()
Get the panose classifier

setName

public final void setName(java.lang.String value)
Set the font name

getName

public final java.lang.String getName()
Get the font name

setAltName

public final void setAltName(java.lang.String value)
Set the alternative font name

getAltName

public final java.lang.String getAltName()
Get the alternative font name

setNontaggedName

public final void setNontaggedName(java.lang.String value)
Set the nontagged font name

getNontaggedName

public final java.lang.String getNontaggedName()
Get the nontagged font name

toString

public java.lang.String toString()
Return representation of the font as ANSI string.
Overrides:
toString in class java.lang.Object

exportTo

public void exportTo(org.w3c.dom.Element elem,
                     boolean usedOnly)
Export the contents of this object to the specified DOM element.