Package org.apache.poi.hslf.usermodel
Class HSLFFontInfo
java.lang.Object
org.apache.poi.hslf.usermodel.HSLFFontInfo
- All Implemented Interfaces:
FontInfo
Represents a Font used in a presentation.
In PowerPoint Font is a shared resource and can be shared among text object in the presentation.
- Since:
- POI 3.17-beta2
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionHSLFFontInfo
(String typeface) Creates a new instance of HSLFFontInfo with more or sensible defaults.HSLFFontInfo
(FontInfo fontInfo) HSLFFontInfo
(FontEntityAtom fontAtom) Creates a new instance of HSLFFontInfo and initialize it from the supplied font atom -
Method Summary
Modifier and TypeMethodDescriptiongetIndex()
Get the index within the collection of Font objectsgetPitch()
boolean
boolean
void
setCharset
(FontCharset charset) Sets the charsetvoid
setEmbedSubsetted
(boolean embedSubset) void
setFamily
(FontFamily family) Sets the font family classvoid
setFontSubstitutable
(boolean isSubstitutable) void
setIndex
(int index) Sets the index within the collection of Font objectsvoid
Set the font pitchvoid
setRenderType
(HSLFFontInfo.FontRenderType renderType) void
setTypeface
(String typeface) Sets the font name
-
Constructor Details
-
HSLFFontInfo
Creates a new instance of HSLFFontInfo with more or sensible defaults.If you don't use default fonts (see
HSLFFontInfoPredefined
) then the results of the font substitution will be better, if you also specify the other properties.- Parameters:
typeface
- the font name
-
HSLFFontInfo
Creates a new instance of HSLFFontInfo and initialize it from the supplied font atom -
HSLFFontInfo
-
-
Method Details
-
getIndex
Description copied from interface:FontInfo
Get the index within the collection of Font objects -
setIndex
public void setIndex(int index) Description copied from interface:FontInfo
Sets the index within the collection of Font objects -
getTypeface
- Specified by:
getTypeface
in interfaceFontInfo
- Returns:
- the full name of the font, i.e. font family + type face
-
setTypeface
Description copied from interface:FontInfo
Sets the font name- Specified by:
setTypeface
in interfaceFontInfo
- Parameters:
typeface
- the full name of the font, whennull
removes the font definition - removal is implementation specific
-
setCharset
Description copied from interface:FontInfo
Sets the charset- Specified by:
setCharset
in interfaceFontInfo
- Parameters:
charset
- the charset
-
getCharset
- Specified by:
getCharset
in interfaceFontInfo
- Returns:
- the font charset
-
getFamily
-
setFamily
Description copied from interface:FontInfo
Sets the font family class -
getPitch
-
setPitch
Description copied from interface:FontInfo
Set the font pitch -
getRenderType
-
setRenderType
-
isEmbedSubsetted
public boolean isEmbedSubsetted() -
setEmbedSubsetted
public void setEmbedSubsetted(boolean embedSubset) -
isFontSubstitutable
public boolean isFontSubstitutable() -
setFontSubstitutable
public void setFontSubstitutable(boolean isSubstitutable) -
createRecord
-