Class XSLFFontInfo

  • All Implemented Interfaces:
    FontInfo

    public class XSLFFontInfo
    extends java.lang.Object
    implements FontInfo
    • Method Detail

      • getTypeface

        public java.lang.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​(java.lang.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
      • setCharset

        public void setCharset​(FontCharset charset)
        Description copied from interface: FontInfo
        Sets the charset
        Specified by:
        setCharset in interface FontInfo
        Parameters:
        charset - the charset
      • 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 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.
        Specified by:
        getFacets in interface FontInfo
        Returns:
        the list of embedded EOT font data
      • 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 font
        fontStream - 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