com.aspose.font

Interfaces

Classes

Enums

Exceptions

com.aspose.font

Class FontDefinition



  • public class FontDefinition
    extends Object

    Represents Font file set definition. This class contains fields which are not related to font internal data. These fields describe font placement and another data needed to load font from some font source(file, memory, etc).

    • Constructor Detail

      • FontDefinition

        public FontDefinition(FontType fontType,
                              String fileExtension,
                              StreamSource streamSource)

        Creates single-file Font definition.

        Parameters:
        fontType - Font type.
        fileExtension - Font file extension.
        streamSource - Font stream source.
      • FontDefinition

        public FontDefinition(FontType fontType,
                              StreamSource streamSource)

        Creates single-file Font definition.

        Parameters:
        fontType - Font type.
        streamSource - Font stream source.
      • FontDefinition

        public FontDefinition(String fontName,
                              FontType fontType,
                              String fileExtension,
                              StreamSource streamSource)

        Creates single-file Font definition.

        Parameters:
        fontName - Font name.
        fontType - Font type.
        fileExtension - Font file extension.
        streamSource - Font stream source.
      • FontDefinition

        public FontDefinition(FontType fontType,
                              FontFileDefinition fileDefinition)

        Creates single-file Font definition.

        Parameters:
        fontType - Font type.
        fileDefinition - FontFileDefinition.
      • FontDefinition

        public FontDefinition(String fontName,
                              FontType fontType,
                              FontFileDefinition fileDefinition)

        Creates single-file Font definition.

        Parameters:
        fontName - Font name.
        fontType - Font type.
        fileDefinition - FontFileDefinition.
      • FontDefinition

        public FontDefinition(String fontName,
                              String postscriptName,
                              FontType fontType,
                              FontFileDefinition fileDefinition)

        Creates single-file Font definition.

        Parameters:
        fontName - Font name.
        postscriptName - Postscript Font name.
        fontType - Font type.
        fileDefinition - FontFileDefinition.
      • FontDefinition

        public FontDefinition(FontType fontType,
                              FontFileDefinition[] fileDefinitions)

        Creates multi-file Font definition.

        Parameters:
        fontType - Font type.
        fileDefinitions - Array of FontFileDefinition objects.
      • FontDefinition

        public FontDefinition(String fontName,
                              String postscriptName,
                              FontType fontType,
                              FontFileDefinition[] fileDefinitions)

        Creates multi-file Font definition.

        Parameters:
        fontName - Font name.
        postscriptName - Postscript Font name.
        fontType - Font type.
        fileDefinitions - Array of FontFileDefinition objects.
      • FontDefinition

        public FontDefinition(MultiLanguageString fontNames,
                              MultiLanguageString postscriptNames,
                              FontType fontType,
                              FontFileDefinition fileDefinition)

        Creates multi-file Font definition.

        Parameters:
        fontNames - Font names.
        postscriptNames - Postscript Font names.
        fontType - Font type.
        fileDefinition - FontFileDefinition.
      • FontDefinition

        public FontDefinition(MultiLanguageString fontNames,
                              MultiLanguageString postscriptNames,
                              FontType fontType,
                              FontFileDefinition[] fileDefinitions)

        Creates multi-file Font definition.

        Parameters:
        fontNames - Font names.
        postscriptNames - Postscript Font names.
        fontType - Font type.
        fileDefinitions - Array of FontFileDefinition objects.
    • Method Detail

      • open

        public static FontDefinition open(String fileName,
                                          FontType fontType)

        Returns FontDefinition for font file and font type.

        Parameters:
        fileName - Font file name.
        fontType - Font type.
        Returns:
        FontDefinition.
      • open

        public static FontDefinition open(StreamSource source,
                                          FontType fontType)

        Returns FontDefinition for font stream source and font type.

        Parameters:
        source - Font stream source.
        fontType - Font type.
        Returns:
        FontDefinition.
      • getFontName

        public String getFontName()

        Returns Font name.

        Returns:
        Font name.
      • getFontNames

        public MultiLanguageString getFontNames()

        Gets Font names as a MultiLanguageString.

        Returns:
        Font names as a MultiLanguageString.
      • getPostscriptName

        public String getPostscriptName()

        Gets postscript Font name.

        Returns:
        Postscript Font name.
      • getPostscriptNames

        public MultiLanguageString getPostscriptNames()

        Gets postscript Font names as a MultiLanguageString.

        Returns:
        Postscript Font names as a MultiLanguageString.
      • getFontType

        public FontType getFontType()

        Gets Font type.

        Returns:
        Font type.
      • getFileDefinitions

        public FontFileDefinition[] getFileDefinitions()

        Gets file definitions collection.

        Returns:
        File definitions collection.