com.aspose.note.fonts

Class DocumentFontsSubsystem

  • All Implemented Interfaces:
    IFontsSubsystem


    public class DocumentFontsSubsystem
    extends FontsSubsystem

    Simple implementation of Aspose.Note.Fonts.FontsSubsystem. Retrieves FontFamily object from OS.

    • Constructor Detail

      • DocumentFontsSubsystem

        public DocumentFontsSubsystem(InputStream defaultFontStream,
                                      Map<String,String> fontsSubstitutions)

        Initializes a new instance of the DocumentFontsSubsystem class.

        Parameters:
        defaultFontStream - The stream containing default Font.
        fontsSubstitutions - The fonts substitutions.
      • DocumentFontsSubsystem

        public DocumentFontsSubsystem(InputStream defaultFontStream)

        Initializes a new instance of the DocumentFontsSubsystem class.

        Parameters:
        defaultFontStream - The stream containing default Font.
      • DocumentFontsSubsystem

        public DocumentFontsSubsystem(String defaultFontFile,
                                      Map<String,String> fontsSubstitutions)

        Initializes a new instance of the DocumentFontsSubsystem class.

        Parameters:
        defaultFontFile - The path to the file containing default Font.
        fontsSubstitutions - The fonts substitutions.
      • DocumentFontsSubsystem

        public DocumentFontsSubsystem(String defaultFontFile)

        Initializes a new instance of the DocumentFontsSubsystem class.

        Parameters:
        defaultFontFile - The path to the file containing default Font.
      • DocumentFontsSubsystem

        public DocumentFontsSubsystem(Map<String,String> fontsSubstitutions)

        Initializes a new instance of the DocumentFontsSubsystem class.

        Parameters:
        fontsSubstitutions - The fonts substitutions.
      • DocumentFontsSubsystem

        public DocumentFontsSubsystem()

        Initializes a new instance of the DocumentFontsSubsystem class.

    • Method Detail

      • usingDefaultFont

        public static DocumentFontsSubsystem usingDefaultFont(String defaultFontName,
                                                              Map<String,String> fontsSubstitutions)

        Create new DocumentFontsSubsystem instance using specified default font name.

        Parameters:
        defaultFontName - The default font name.
        fontsSubstitutions - The fonts substitutions.
        Returns:
        DocumentFontsSubsystem.
      • usingDefaultFont

        public static DocumentFontsSubsystem usingDefaultFont(String defaultFontName)

        Create new DocumentFontsSubsystem instance using specified default font name.

        Parameters:
        defaultFontName - The default font name.
        Returns:
        DocumentFontsSubsystem.
      • usingDefaultFontFromFile

        public static DocumentFontsSubsystem usingDefaultFontFromFile(String filePath,
                                                                      Map<String,String> fontsSubstitutions)

        Create new DocumentFontsSubsystem instance using a font from specified file as default.

        Parameters:
        filePath - The file containing default font name.
        fontsSubstitutions - The fonts substitutions.
        Returns:
        DocumentFontsSubsystem.
      • usingDefaultFontFromFile

        public static DocumentFontsSubsystem usingDefaultFontFromFile(String filePath)

        Create new DocumentFontsSubsystem instance using specified default font name.

        Parameters:
        filePath - The file containing default font name.
        Returns:
        DocumentFontsSubsystem.
      • usingDefaultFontFromStream

        public static DocumentFontsSubsystem usingDefaultFontFromStream(InputStream defaultFontStream,
                                                                        Map<String,String> fontsSubstitutions)

        Create new DocumentFontsSubsystem instance using a font from specified stream as default.

        Parameters:
        defaultFontStream - The stream containing the default font name.
        fontsSubstitutions - The fonts substitutions.
        Returns:
        DocumentFontsSubsystem.
      • usingDefaultFontFromStream

        public static DocumentFontsSubsystem usingDefaultFontFromStream(InputStream defaultFontStream)

        Create new DocumentFontsSubsystem instance using a font from specified stream as default.

        Parameters:
        defaultFontStream - The stream containing the default font name.
        Returns:
        DocumentFontsSubsystem.
      • setDefault

        public static void setDefault(DocumentFontsSubsystem value)

        Gets or sets the static default instance.