Package org.apache.poi.hslf.usermodel
Class HSLFFontInfo
- java.lang.Object
-
- org.apache.poi.hslf.usermodel.HSLFFontInfo
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HSLFFontInfo.FontRenderType
-
Constructor Summary
Constructors Constructor Description HSLFFontInfo(java.lang.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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FontEntityAtom
createRecord()
FontCharset
getCharset()
FontFamily
getFamily()
java.lang.Integer
getIndex()
Get the index within the collection of Font objectsFontPitch
getPitch()
HSLFFontInfo.FontRenderType
getRenderType()
java.lang.String
getTypeface()
boolean
isEmbedSubsetted()
boolean
isFontSubstitutable()
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
setPitch(FontPitch pitch)
Set the font pitchvoid
setRenderType(HSLFFontInfo.FontRenderType renderType)
void
setTypeface(java.lang.String typeface)
Sets the font name
-
-
-
Constructor Detail
-
HSLFFontInfo
public HSLFFontInfo(java.lang.String typeface)
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
public HSLFFontInfo(FontEntityAtom fontAtom)
Creates a new instance of HSLFFontInfo and initialize it from the supplied font atom
-
HSLFFontInfo
public HSLFFontInfo(FontInfo fontInfo)
-
-
Method Detail
-
getIndex
public java.lang.Integer 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
public java.lang.String getTypeface()
- Specified by:
getTypeface
in interfaceFontInfo
- Returns:
- the full name of the font, i.e. font family + type face
-
setTypeface
public void setTypeface(java.lang.String typeface)
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
public void setCharset(FontCharset charset)
Description copied from interface:FontInfo
Sets the charset- Specified by:
setCharset
in interfaceFontInfo
- Parameters:
charset
- the charset
-
getCharset
public FontCharset getCharset()
- Specified by:
getCharset
in interfaceFontInfo
- Returns:
- the font charset
-
getFamily
public FontFamily getFamily()
-
setFamily
public void setFamily(FontFamily family)
Description copied from interface:FontInfo
Sets the font family class
-
getPitch
public FontPitch getPitch()
-
setPitch
public void setPitch(FontPitch pitch)
Description copied from interface:FontInfo
Set the font pitch
-
getRenderType
public HSLFFontInfo.FontRenderType getRenderType()
-
setRenderType
public void setRenderType(HSLFFontInfo.FontRenderType renderType)
-
isEmbedSubsetted
public boolean isEmbedSubsetted()
-
setEmbedSubsetted
public void setEmbedSubsetted(boolean embedSubset)
-
isFontSubstitutable
public boolean isFontSubstitutable()
-
setFontSubstitutable
public void setFontSubstitutable(boolean isSubstitutable)
-
createRecord
public FontEntityAtom createRecord()
-
-