com.aspose.note.fonts

Class FontsSubsystem

  • All Implemented Interfaces:
    IFontsSubsystem
    Direct Known Subclasses:
    DocumentFontsSubsystem


    public abstract class FontsSubsystem
    extends Object
    implements IFontsSubsystem

    Base class implementing com.aspose.note.IFontsSubsystem interface. Provides functionality for default font and font's substitutions. Override com.aspose.note.FontsSubsystem.fetchFontFamily protected member function in a derived class to implement logic for retrieving of Font object.

    • Method Detail

      • getDefaultFont

        public final Font getDefaultFont()

        Gets default font.

      • addFontSubstitution

        public final void addFontSubstitution(String substituted,
                                              String substitution)

        Adds font substitution.

        Parameters:
        substituted - The substituted font name.
        substitution - The substitution font name.
      • addFont

        public final void addFont(InputStream stream)

        Adds the font.

        Parameters:
        stream - The stream containing the font.
      • loadFontsFromFolder

        public final void loadFontsFromFolder(String folder)
                                       throws FileNotFoundException

        Loads all TrueType fonts from specified folder to internal collection.

        Parameters:
        folder - The folder containing fonts.
        Throws:
        com.aspose.ms.System.NullReferenceException - Parameter 'folder' is null or empty.
        com.aspose.ms.System.IO.DirectoryNotFoundException - There directory specified by folder does not exist.
        com.aspose.ms.System.IO.InvalidDataException - The file from folder does not contain TrueType font.
        FileNotFoundException