Class Font
java.lang.Object
com.independentsoft.office.odf.styles.Font
Represents a font face declaration which documents the properties of a font used by the author of a document.
-
Constructor Summary
ConstructorsConstructorDescriptionFont()Initializes a new instance of the Font class.Font(InternalXMLStreamReader reader)Instantiates a new font. -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a new object that is a deep copy of the current instance.Gets the characteristic of the font.Specifies whether a font defines glyphs according to the semantics of [UNICODE] or not.Gets the family of the font.Gets the generic font family name.getName()Gets the unique name for a font declaration.getPitch()Specifies whether a font has a fixed or variable width.intgetSize()Gets the font size.Gets the font stretch.getStyle()Gets the font style.Gets the font variant.Gets the font weight.voidsetAdornments(String adornments)Sets the characteristic of the font.voidsetCharacterSet(String characterSet)Specifies whether a font defines glyphs according to the semantics of [UNICODE] or not.voidSets the family of the font.voidsetGenericFontFamily(GenericFontFamily genericFontFamily)Sets the generic font family name.voidSets the unique name for a font declaration.voidSpecifies whether a font has a fixed or variable width.voidsetSize(int size)Sets the font size.voidsetStretch(FontStretch stretch)Sets the font stretch.voidsetStyle(FontStyleType style)Sets the font style.voidsetVariant(FontVariant variant)Sets the font variant.voidsetWeight(FontWeight weight)Sets the font weight.toString()Converts the value of the current Font object to its equivalent string representation.
-
Constructor Details
-
Font
public Font()Initializes a new instance of the Font class. -
Font
Instantiates a new font.- Parameters:
reader- the reader- Throws:
XMLStreamException- the xML stream exception
-
-
Method Details
-
clone
Creates a new object that is a deep copy of the current instance. -
toString
Converts the value of the current Font object to its equivalent string representation. -
getName
Gets the unique name for a font declaration.- Returns:
- the name
-
setName
Sets the unique name for a font declaration.- Parameters:
name- the new name
-
getFamily
Gets the family of the font.- Returns:
- the family
-
setFamily
Sets the family of the font.- Parameters:
family- the new family
-
getAdornments
Gets the characteristic of the font.- Returns:
- the adornments
-
setAdornments
Sets the characteristic of the font.- Parameters:
adornments- the new adornments
-
getGenericFontFamily
Gets the generic font family name.- Returns:
- the generic font family
-
setGenericFontFamily
Sets the generic font family name.- Parameters:
genericFontFamily- the new generic font family
-
getPitch
Specifies whether a font has a fixed or variable width.- Returns:
- the pitch
-
setPitch
Specifies whether a font has a fixed or variable width.- Parameters:
pitch- the new pitch
-
getCharacterSet
Specifies whether a font defines glyphs according to the semantics of [UNICODE] or not.- Returns:
- the character set
-
setCharacterSet
Specifies whether a font defines glyphs according to the semantics of [UNICODE] or not.- Parameters:
characterSet- the new character set
-
getStyle
Gets the font style.- Returns:
- the style
-
setStyle
Sets the font style.- Parameters:
style- the new style
-
getVariant
Gets the font variant.- Returns:
- the variant
-
setVariant
Sets the font variant.- Parameters:
variant- the new variant
-
getWeight
Gets the font weight.- Returns:
- the weight
-
setWeight
Sets the font weight.- Parameters:
weight- the new weight
-
getStretch
Gets the font stretch.- Returns:
- the stretch
-
setStretch
Sets the font stretch.- Parameters:
stretch- the new stretch
-
getSize
public int getSize()Gets the font size.- Returns:
- the size
-
setSize
public void setSize(int size)Sets the font size.- Parameters:
size- the new size
-