Package com.independentsoft.office.odf.styles

# Class Font

java.lang.Object
com.independentsoft.office.odf.styles.Font

public class Font extends Object
Represents a font face declaration which documents the properties of a font used by the author of a document.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Font()`
  Initializes a new instance of the Font class.
  `Font​(InternalXMLStreamReader reader)`
  Instantiates a new font.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Font`
  `clone()`
  Creates a new object that is a deep copy of the current instance.
  `String`
  `getAdornments()`
  Gets the characteristic of the font.
  `String`
  `getCharacterSet()`
  Specifies whether a font defines glyphs according to the semantics of [UNICODE] or not.
  `String`
  `getFamily()`
  Gets the family of the font.
  `GenericFontFamily`
  `getGenericFontFamily()`
  Gets the generic font family name.
  `String`
  `getName()`
  Gets the unique name for a font declaration.
  `FontPitch`
  `getPitch()`
  Specifies whether a font has a fixed or variable width.
  `int`
  `getSize()`
  Gets the font size.
  `FontStretch`
  `getStretch()`
  Gets the font stretch.
  `FontStyleType`
  `getStyle()`
  Gets the font style.
  `FontVariant`
  `getVariant()`
  Gets the font variant.
  `FontWeight`
  `getWeight()`
  Gets the font weight.
  `void`
  `setAdornments​(String adornments)`
  Sets the characteristic of the font.
  `void`
  `setCharacterSet​(String characterSet)`
  Specifies whether a font defines glyphs according to the semantics of [UNICODE] or not.
  `void`
  `setFamily​(String family)`
  Sets the family of the font.
  `void`
  `setGenericFontFamily​(GenericFontFamily genericFontFamily)`
  Sets the generic font family name.
  `void`
  `setName​(String name)`
  Sets the unique name for a font declaration.
  `void`
  `setPitch​(FontPitch pitch)`
  Specifies whether a font has a fixed or variable width.
  `void`
  `setSize​(int size)`
  Sets the font size.
  `void`
  `setStretch​(FontStretch stretch)`
  Sets the font stretch.
  `void`
  `setStyle​(FontStyleType style)`
  Sets the font style.
  `void`
  `setVariant​(FontVariant variant)`
  Sets the font variant.
  `void`
  `setWeight​(FontWeight weight)`
  Sets the font weight.
  `String`
  `toString()`
  Converts the value of the current Font object to its equivalent string representation.

  ### Methods inherited from class java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### Font

    public Font()
    Initializes a new instance of the Font class.

  - ### Font

    public Font​(InternalXMLStreamReader reader) throws XMLStreamException
    Instantiates a new font.
    Parameters:
      `reader` - the reader
    Throws:
      `XMLStreamException` - the xML stream exception

- ## Method Details

  - ### clone

    public Font clone()
    Creates a new object that is a deep copy of the current instance.
    Overrides:
      `clone` in class `Object`
    Returns:
      A new object that is a copy of this instance.

  - ### toString

    public String toString()
    Converts the value of the current Font object to its equivalent string representation.
    Overrides:
      `toString` in class `Object`
    Returns:
      the string

  - ### getName

    public String getName()
    Gets the unique name for a font declaration.
    Returns:
      the name

  - ### setName

    public void setName​(String name)
    Sets the unique name for a font declaration.
    Parameters:
      `name` - the new name

  - ### getFamily

    public String getFamily()
    Gets the family of the font.
    Returns:
      the family

  - ### setFamily

    public void setFamily​(String family)
    Sets the family of the font.
    Parameters:
      `family` - the new family

  - ### getAdornments

    public String getAdornments()
    Gets the characteristic of the font.
    Returns:
      the adornments

  - ### setAdornments

    public void setAdornments​(String adornments)
    Sets the characteristic of the font.
    Parameters:
      `adornments` - the new adornments

  - ### getGenericFontFamily

    public GenericFontFamily getGenericFontFamily()
    Gets the generic font family name.
    Returns:
      the generic font family

  - ### setGenericFontFamily

    public void setGenericFontFamily​(GenericFontFamily genericFontFamily)
    Sets the generic font family name.
    Parameters:
      `genericFontFamily` - the new generic font family

  - ### getPitch

    public FontPitch getPitch()
    Specifies whether a font has a fixed or variable width.
    Returns:
      the pitch

  - ### setPitch

    public void setPitch​(FontPitch pitch)
    Specifies whether a font has a fixed or variable width.
    Parameters:
      `pitch` - the new pitch

  - ### getCharacterSet

    public String getCharacterSet()
    Specifies whether a font defines glyphs according to the semantics of [UNICODE] or not.
    Returns:
      the character set

  - ### setCharacterSet

    public void setCharacterSet​(String characterSet)
    Specifies whether a font defines glyphs according to the semantics of [UNICODE] or not.
    Parameters:
      `characterSet` - the new character set

  - ### getStyle

    public FontStyleType getStyle()
    Gets the font style.
    Returns:
      the style

  - ### setStyle

    public void setStyle​(FontStyleType style)
    Sets the font style.
    Parameters:
      `style` - the new style

  - ### getVariant

    public FontVariant getVariant()
    Gets the font variant.
    Returns:
      the variant

  - ### setVariant

    public void setVariant​(FontVariant variant)
    Sets the font variant.
    Parameters:
      `variant` - the new variant

  - ### getWeight

    public FontWeight getWeight()
    Gets the font weight.
    Returns:
      the weight

  - ### setWeight

    public void setWeight​(FontWeight weight)
    Sets the font weight.
    Parameters:
      `weight` - the new weight

  - ### getStretch

    public FontStretch getStretch()
    Gets the font stretch.
    Returns:
      the stretch

  - ### setStretch

    public void setStretch​(FontStretch stretch)
    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