Interface FontFacet

All Known Implementing Classes:
FontEmbeddedData

@Beta public interface FontFacet
A FontFacet holds the font data for a shape of a font, i.e. a regular, italic, bold or bold-italic version of a Font.
  • Method Summary

    Modifier and Type
    Method
    Description
    default Object
     
    default int
    Get the font weight.
    default boolean
     
    default void
    setItalic(boolean italic)
    Set the font posture
    default void
    setWeight(int weight)
    Set the font weight
  • Method Details

    • getWeight

      default int getWeight()
      Get the font weight.

      The weight of the font in the range 0 through 1000. For example, 400 is normal and 700 is bold. If this value is zero, a default weight is used.

      Returns:
      the font weight
      Since:
      POI 4.1.0
    • setWeight

      default void setWeight(int weight)
      Set the font weight
      Parameters:
      weight - the font weight
    • isItalic

      default boolean isItalic()
      Returns:
      true, if the font is italic
    • setItalic

      default void setItalic(boolean italic)
      Set the font posture
      Parameters:
      italic - true for italic, false for regular
    • getFontData

      default Object getFontData()
      Returns:
      the wrapper object holding the font data