Interface FontFacet
-
@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
All Methods Instance Methods Default Methods Modifier and Type Method Description default ObjectgetFontData()default intgetWeight()Get the font weight.default booleanisItalic()default voidsetItalic(boolean italic)Set the font posturedefault voidsetWeight(int weight)Set the font weight
-
-
-
Method Detail
-
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- Throws:
UnsupportedOperationException- can return UnsupportedOperationException when FontFacet is read-only
-
isItalic
default boolean isItalic()
- Returns:
true, if the font is italic
-
setItalic
default void setItalic(boolean italic)
Set the font posture- Parameters:
italic-truefor italic,falsefor regular- Throws:
UnsupportedOperationException- can return UnsupportedOperationException when FontFacet is read-only
-
getFontData
default Object getFontData()
- Returns:
- the wrapper object holding the font data
-
-