Class XSLFFontInfo

java.lang.Object
org.apache.poi.xslf.usermodel.XSLFFontInfo
All Implemented Interfaces:
FontInfo

public class XSLFFontInfo extends Object implements FontInfo
  • Constructor Details

  • Method Details

    • getTypeface

      public String getTypeface()
      Specified by:
      getTypeface in interface FontInfo
      Returns:
      the full name of the font, i.e. font family + type face
    • setTypeface

      public void setTypeface(String typeface)
      Description copied from interface: FontInfo
      Sets the font name
      Specified by:
      setTypeface in interface FontInfo
      Parameters:
      typeface - the full name of the font, when null removes the font definition - removal is implementation specific
    • getCharset

      public FontCharset getCharset()
      Specified by:
      getCharset in interface FontInfo
      Returns:
      the font charset
    • setCharset

      public void setCharset(FontCharset charset)
      Description copied from interface: FontInfo
      Sets the charset
      Specified by:
      setCharset in interface FontInfo
      Parameters:
      charset - the charset
    • getFamily

      public FontFamily getFamily()
      Specified by:
      getFamily in interface FontInfo
      Returns:
      the family class
    • setFamily

      public void setFamily(FontFamily family)
      Description copied from interface: FontInfo
      Sets the font family class
      Specified by:
      setFamily in interface FontInfo
      Parameters:
      family - the font family class
    • getPitch

      public FontPitch getPitch()
      Specified by:
      getPitch in interface FontInfo
      Returns:
      the font pitch or null if unsupported
    • setPitch

      public void setPitch(FontPitch pitch)
      Description copied from interface: FontInfo
      Set the font pitch
      Specified by:
      setPitch in interface FontInfo
      Parameters:
      pitch - the font pitch
    • getPanose

      public byte[] getPanose()
      Specified by:
      getPanose in interface FontInfo
      Returns:
      panose info in binary form or null if unknown
    • getFacets

      public 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.
      Specified by:
      getFacets in interface FontInfo
      Returns:
      the list of embedded EOT font data
    • addFacet

      public FontFacet addFacet(InputStream fontData) throws IOException
      Throws:
      IOException
    • addFontToSlideShow

      public static XSLFFontInfo addFontToSlideShow(XMLSlideShow ppt, InputStream fontStream) throws IOException
      Adds or updates a (MTX-) font
      Parameters:
      ppt - the slideshow which will contain the font
      fontStream - the (MTX) font data as stream
      Returns:
      a font data object
      Throws:
      IOException - if the font data can't be stored
      Since:
      POI 4.1.0
    • getFonts

      public static List<XSLFFontInfo> getFonts(XMLSlideShow ppt)
      Return all registered fonts
      Parameters:
      ppt - the slideshow containing the fonts
      Returns:
      the list of registered fonts