com.aspose.slides

Interfaces

Classes

Exceptions

com.aspose.slides

Interface IFontsManager

  • All Known Implementing Classes:
    FontsManager


    public interface IFontsManager

    Manages fonts across the presentation.

    • Method Detail

      • getFontFallBackRulesCollection

        IFontFallBackRulesCollection getFontFallBackRulesCollection()

        Represents a user's collection of FontFallBack rules for managing of collections of fonts for proper substitutions by fallback functionality Read/write IFontFallBackRulesCollection.


         
         Presentation pres = new Presentation();
         try
         {
             // Getting of empty or preinitialized rules collection from FontsManager
             IFontFallBackRulesCollection rulesList = pres.getFontsManager().getFontFallBackRulesCollection();
             // adding of rules to collection
             rulesList.add(new FontFallBackRule(0x400,0x4FF, "Times New Roman"));
             // or 
             // initialization of new instance of rules collection
             IFontFallBackRulesCollection rulesList = new FontFallBackRulesCollection();
             // adding of rules to collection
             rulesList.add(new FontFallBackRule(0x400,0x4FF, "Times New Roman"));
             // and replacing of existing collection by the new one in FontsManager 
             pres.getFontsManager().setFontFallBackRulesCollection(rulesList);
         }
         finally {
             if (pres != null) pres.dispose();
         }
         
      • setFontFallBackRulesCollection

        void setFontFallBackRulesCollection(IFontFallBackRulesCollection value)

        Represents a user's collection of FontFallBack rules for managing of collections of fonts for proper substitutions by fallback functionality Read/write IFontFallBackRulesCollection.


         
         Presentation pres = new Presentation();
         try
         {
             // Getting of empty or preinitialized rules collection from FontsManager
             IFontFallBackRulesCollection rulesList = pres.getFontsManager().getFontFallBackRulesCollection();
             // adding of rules to collection
             rulesList.add(new FontFallBackRule(0x400,0x4FF, "Times New Roman"));
             // or 
             // initialization of new instance of rules collection
             IFontFallBackRulesCollection rulesList = new FontFallBackRulesCollection();
             // adding of rules to collection
             rulesList.add(new FontFallBackRule(0x400,0x4FF, "Times New Roman"));
             // and replacing of existing collection by the new one in FontsManager 
             pres.getFontsManager().setFontFallBackRulesCollection(rulesList);
         }
         finally {
             if (pres != null) pres.dispose();
         }
         
      • getFonts

        IFontData[] getFonts()

        Returns the fonts used in the presentation

        Returns:
        An array of fonts
      • getEmbeddedFonts

        IFontData[] getEmbeddedFonts()

        Returns the fonts embedded in the presentation

        Returns:
        Embedded fonts IFontData[]
      • removeEmbeddedFont

        void removeEmbeddedFont(IFontData fontData)

        Removes the embedded font

        Parameters:
        fontData - Font data object IFontData
      • addEmbeddedFont

        void addEmbeddedFont(IFontData fontData,
                             int embedFontRule)

        Adds the embedded font.

        Parameters:
        fontData - Font data object IFontData
        embedFontRule - Embedded font rule EmbedFontCharacters


        Keep in mind when copying any fonts that most fonts are copyrighted. First locate the license of a font before hand and verify they can be freely transferred to another machine.
        Throws:
        com.aspose.ms.System.ArgumentException - An ArgumentException can be thrown if font data is null or this font is already embedded
      • addEmbeddedFont

        void addEmbeddedFont(byte[] fontData,
                             int embedFontRule)

        Adds the embedded font

        Parameters:
        fontData - Font data byte[]
        embedFontRule - Embedded font rule EmbedFontCharacters


        Keep in mind when adding any fonts that most fonts are copyrighted. First locate the license of a font before hand and verify they can be freely transferred to another machine.
        Throws:
        com.aspose.ms.System.ArgumentException - An ArgumentException can be thrown if font data is null or this font is already embedded
      • replaceFont

        void replaceFont(IFontData sourceFont,
                         IFontData destFont)

        Replace font in presentation

        Parameters:
        sourceFont - Source font
        destFont - Destination font
      • replaceFont

        void replaceFont(IFontSubstRule substRule)

        Replace font in presentation using information provided in IFontSubstRule

        Parameters:
        substRule - Font substitution info
      • replaceFont

        void replaceFont(IFontSubstRuleCollection substRules)

        Replace font in presentation using information provided in collection of IFontSubstRule

        Parameters:
        substRules - Font substitution info collection