Interface FontInfo
-
- All Known Implementing Classes:
HSLFFontInfo,HSLFFontInfoPredefined,HwmfFont
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 a unsupported property results in an
UnsupportedOperationException.- Since:
- POI 3.17-beta2
- See Also:
- LOGFONT structure
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FontCharsetgetCharset()FontFamilygetFamily()java.lang.IntegergetIndex()Get the index within the collection of Font objectsFontPitchgetPitch()java.lang.StringgetTypeface()voidsetCharset(FontCharset charset)Sets the charsetvoidsetFamily(FontFamily family)Sets the font family classvoidsetIndex(int index)Sets the index within the collection of Font objectsvoidsetPitch(FontPitch pitch)Set the font pitchvoidsetTypeface(java.lang.String typeface)Sets the font name
-
-
-
Method Detail
-
getIndex
java.lang.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
void setIndex(int index)
Sets the index within the collection of Font objects- Parameters:
index- the index within the collection of Font objects- Throws:
java.lang.UnsupportedOperationException- if unsupported
-
getTypeface
java.lang.String getTypeface()
- Returns:
- the full name of the font, i.e. font family + type face
-
setTypeface
void setTypeface(java.lang.String typeface)
Sets the font name- Parameters:
typeface- the full name of the font, whennullremoves the font definition - removal is implementation specific
-
getCharset
FontCharset getCharset()
- Returns:
- the font charset
-
setCharset
void setCharset(FontCharset charset)
Sets the charset- Parameters:
charset- the charset
-
getFamily
FontFamily getFamily()
- Returns:
- the family class
-
setFamily
void setFamily(FontFamily family)
Sets the font family class- Parameters:
family- the font family class
-
getPitch
FontPitch getPitch()
- Returns:
- the font pitch or
nullif unsupported
-
setPitch
void setPitch(FontPitch pitch)
Set the font pitch- Parameters:
pitch- the font pitch- Throws:
java.lang.UnsupportedOperationException- if unsupported
-
-