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 FontFacet
addFacet(java.io.InputStream fontData)
static XSLFFontInfo
addFontToSlideShow(XMLSlideShow ppt, java.io.InputStream fontStream)
Adds or updates a (MTX-) fontFontCharset
getCharset()
java.util.List<FontFacet>
getFacets()
If font facets are embedded in the document, return the list of embedded facets.FontFamily
getFamily()
static java.util.List<XSLFFontInfo>
getFonts(XMLSlideShow ppt)
Return all registered fontsbyte[]
getPanose()
FontPitch
getPitch()
java.lang.String
getTypeface()
void
setCharset(FontCharset charset)
Sets the charsetvoid
setFamily(FontFamily family)
Sets the font family classvoid
setPitch(FontPitch pitch)
Set the font pitchvoid
setTypeface(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:
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
-
getCharset
public FontCharset getCharset()
- Specified by:
getCharset
in interfaceFontInfo
- Returns:
- the font charset
-
setCharset
public void setCharset(FontCharset charset)
Description copied from interface:FontInfo
Sets the charset- Specified by:
setCharset
in interfaceFontInfo
- Parameters:
charset
- the 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
-
getPanose
public byte[] getPanose()
-
getFacets
public java.util.List<FontFacet> getFacets()
Description copied from interface:FontInfo
If 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
-
-