Package org.apache.poi.xslf.usermodel
Class XSLFFontInfo
- java.lang.Object
-
- org.apache.poi.xslf.usermodel.XSLFFontInfo
-
-
Constructor Summary
Constructors Constructor Description XSLFFontInfo(XMLSlideShow ppt, java.lang.String typeface)XSLFFontInfo(XMLSlideShow ppt, CTEmbeddedFontListEntry fontListEntry)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description FontFacetaddFacet(java.io.InputStream fontData)static XSLFFontInfoaddFontToSlideShow(XMLSlideShow ppt, java.io.InputStream fontStream)Adds or updates a (MTX-) fontFontCharsetgetCharset()java.util.List<FontFacet>getFacets()If font facets are embedded in the document, return the list of embedded facets.FontFamilygetFamily()static java.util.List<XSLFFontInfo>getFonts(XMLSlideShow ppt)Return all registered fontsbyte[]getPanose()FontPitchgetPitch()java.lang.StringgetTypeface()voidsetCharset(FontCharset charset)Sets the charsetvoidsetFamily(FontFamily family)Sets the font family classvoidsetPitch(FontPitch pitch)Set the font pitchvoidsetTypeface(java.lang.String typeface)Sets the font name
-
-
-
Constructor Detail
-
XSLFFontInfo
public XSLFFontInfo(XMLSlideShow ppt, java.lang.String typeface)
-
XSLFFontInfo
public XSLFFontInfo(XMLSlideShow ppt, CTEmbeddedFontListEntry fontListEntry)
-
-
Method Detail
-
getTypeface
public java.lang.String getTypeface()
- Specified by:
getTypefacein 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:FontInfoSets the font name- Specified by:
setTypefacein interfaceFontInfo- Parameters:
typeface- the full name of the font, whennullremoves the font definition - removal is implementation specific
-
getCharset
public FontCharset getCharset()
- Specified by:
getCharsetin interfaceFontInfo- Returns:
- the font charset
-
setCharset
public void setCharset(FontCharset charset)
Description copied from interface:FontInfoSets the charset- Specified by:
setCharsetin interfaceFontInfo- Parameters:
charset- the charset
-
getFamily
public FontFamily getFamily()
-
setFamily
public void setFamily(FontFamily family)
Description copied from interface:FontInfoSets the font family class
-
getPitch
public FontPitch getPitch()
-
setPitch
public void setPitch(FontPitch pitch)
Description copied from interface:FontInfoSet the font pitch
-
getPanose
public byte[] getPanose()
-
getFacets
public java.util.List<FontFacet> getFacets()
Description copied from interface:FontInfoIf font facets are embedded in the document, return the list of embedded facets. The font embedding is experimental, therefore the API can change.
-
addFacet
public FontFacet addFacet(java.io.InputStream fontData) throws java.io.IOException
- Throws:
java.io.IOException
-
addFontToSlideShow
public static XSLFFontInfo addFontToSlideShow(XMLSlideShow ppt, java.io.InputStream fontStream) throws java.io.IOException
Adds or updates a (MTX-) font- Parameters:
ppt- the slideshow which will contain the fontfontStream- the (MTX) font data as stream- Returns:
- a font data object
- Throws:
java.io.IOException- if the font data can't be stored- Since:
- POI 4.1.0
-
getFonts
public static java.util.List<XSLFFontInfo> getFonts(XMLSlideShow ppt)
Return all registered fonts- Parameters:
ppt- the slideshow containing the fonts- Returns:
- the list of registered fonts
-
-