Interface FontInfo
-
- All Known Implementing Classes:
FontHeader
public interface FontInfoA FontInfo object holds information about a font configuration. It is roughly an equivalent to the LOGFONT structure in Windows GDI.If an implementation doesn't provide a property, the getter will return
null- if the value is unset, a default value will be returned.Setting an unsupported property results in an
UnsupportedOperationException.- Since:
- POI 3.17-beta2
- See Also:
- LOGFONT structure
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default FontCharsetgetCharset()default List<? extends FontFacet>getFacets()If font facets are embedded in the document, return the list of embedded facets.default FontFamilygetFamily()default IntegergetIndex()Get the index within the collection of Font objectsdefault byte[]getPanose()default FontPitchgetPitch()StringgetTypeface()default voidsetCharset(FontCharset charset)Sets the charsetdefault voidsetFamily(FontFamily family)Sets the font family classdefault voidsetIndex(int index)Sets the index within the collection of Font objectsdefault voidsetPanose(byte[] panose)Set the panose in binary formdefault voidsetPitch(FontPitch pitch)Set the font pitchdefault voidsetTypeface(String typeface)Sets the font name
-
-
-
Method Detail
-
getIndex
default Integer getIndex()
Get the index within the collection of Font objects- Returns:
- unique index number of the underlying record this Font represents (probably you don't care unless you're comparing which one is which)
-
setIndex
default void setIndex(int index)
Sets the index within the collection of Font objects- Parameters:
index- the index within the collection of Font objects- Throws:
UnsupportedOperationException- if unsupported
-
getTypeface
String getTypeface()
- Returns:
- the full name of the font, i.e. font family + type face
-
setTypeface
default void setTypeface(String typeface)
Sets the font name- Parameters:
typeface- the full name of the font, whennullremoves the font definition - removal is implementation specific- Throws:
UnsupportedOperationException- can return UnsupportedOperationException when FontInfo is read-only
-
getCharset
default FontCharset getCharset()
- Returns:
- the font charset
-
setCharset
default void setCharset(FontCharset charset)
Sets the charset- Parameters:
charset- the charset- Throws:
UnsupportedOperationException- can return UnsupportedOperationException when FontInfo is read-only
-
getFamily
default FontFamily getFamily()
- Returns:
- the family class
-
setFamily
default void setFamily(FontFamily family)
Sets the font family class- Parameters:
family- the font family class- Throws:
UnsupportedOperationException- can return UnsupportedOperationException when FontInfo is read-only
-
getPitch
default FontPitch getPitch()
- Returns:
- the font pitch or
nullif unsupported
-
setPitch
default void setPitch(FontPitch pitch)
Set the font pitch- Parameters:
pitch- the font pitch- Throws:
UnsupportedOperationException- if unsupported
-
getPanose
default byte[] getPanose()
- Returns:
- panose info in binary form or
nullif unknown
-
setPanose
default void setPanose(byte[] panose)
Set the panose in binary form- Parameters:
panose- the panose bytes- Throws:
UnsupportedOperationException- can return UnsupportedOperationException when FontInfo is read-only
-
-