FontDefinition

Inheritance: java.lang.Object

public class FontDefinition

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).

Constructors

ConstructorDescription
FontDefinition(FontType fontType, String fileExtension, StreamSource streamSource)Creates single-file Font definition.
FontDefinition(FontType fontType, StreamSource streamSource)Creates single-file Font definition.
FontDefinition(String fontName, FontType fontType, String fileExtension, StreamSource streamSource)Creates single-file Font definition.
FontDefinition(FontType fontType, FontFileDefinition fileDefinition)Creates single-file Font definition.
FontDefinition(String fontName, FontType fontType, FontFileDefinition fileDefinition)Creates single-file Font definition.
FontDefinition(String fontName, String postscriptName, FontType fontType, FontFileDefinition fileDefinition)Creates single-file Font definition.
FontDefinition(FontType fontType, FontFileDefinition[] fileDefinitions)Creates multi-file Font definition.
FontDefinition(String fontName, String postscriptName, FontType fontType, FontFileDefinition[] fileDefinitions)Creates multi-file Font definition.
FontDefinition(MultiLanguageString fontNames, MultiLanguageString postscriptNames, FontType fontType, FontFileDefinition fileDefinition)Creates multi-file Font definition.
FontDefinition(MultiLanguageString fontNames, MultiLanguageString postscriptNames, FontType fontType, FontFileDefinition[] fileDefinitions)Creates multi-file Font definition.

Methods

MethodDescription
open(String fileName, FontType fontType)Returns FontDefinition for font file and font type.
open(StreamSource source, FontType fontType)Returns FontDefinition for font stream source and font type.
getFontName()Returns Font name.
getFontNames()Gets Font names as a MultiLanguageString .
getPostscriptName()Gets postscript Font name.
getPostscriptNames()Gets postscript Font names as a MultiLanguageString .
getFontType()Gets Font type.
getFileDefinitions()Gets file definitions collection.

FontDefinition(FontType fontType, String fileExtension, StreamSource streamSource)

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

Creates single-file Font definition.

Parameters:

ParameterTypeDescription
fontTypeFontTypeFont type.
fileExtensionjava.lang.StringFont file extension.
streamSourceStreamSourceFont stream source.

FontDefinition(FontType fontType, StreamSource streamSource)

public FontDefinition(FontType fontType, StreamSource streamSource)

Creates single-file Font definition.

Parameters:

ParameterTypeDescription
fontTypeFontTypeFont type.
streamSourceStreamSourceFont stream source.

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

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

Creates single-file Font definition.

Parameters:

ParameterTypeDescription
fontNamejava.lang.StringFont name.
fontTypeFontTypeFont type.
fileExtensionjava.lang.StringFont file extension.
streamSourceStreamSourceFont stream source.

FontDefinition(FontType fontType, FontFileDefinition fileDefinition)

public FontDefinition(FontType fontType, FontFileDefinition fileDefinition)

Creates single-file Font definition.

Parameters:

ParameterTypeDescription
fontTypeFontTypeFont type.
fileDefinitionFontFileDefinitionFontFileDefinition.

FontDefinition(String fontName, FontType fontType, FontFileDefinition fileDefinition)

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

Creates single-file Font definition.

Parameters:

ParameterTypeDescription
fontNamejava.lang.StringFont name.
fontTypeFontTypeFont type.
fileDefinitionFontFileDefinitionFontFileDefinition.

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

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

Creates single-file Font definition.

Parameters:

ParameterTypeDescription
fontNamejava.lang.StringFont name.
postscriptNamejava.lang.StringPostscript Font name.
fontTypeFontTypeFont type.
fileDefinitionFontFileDefinitionFontFileDefinition.

FontDefinition(FontType fontType, FontFileDefinition[] fileDefinitions)

public FontDefinition(FontType fontType, FontFileDefinition[] fileDefinitions)

Creates multi-file Font definition.

Parameters:

ParameterTypeDescription
fontTypeFontTypeFont type.
fileDefinitionsFontFileDefinition[]Array of FontFileDefinition objects.

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

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

Creates multi-file Font definition.

Parameters:

ParameterTypeDescription
fontNamejava.lang.StringFont name.
postscriptNamejava.lang.StringPostscript Font name.
fontTypeFontTypeFont type.
fileDefinitionsFontFileDefinition[]Array of FontFileDefinition objects.

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

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

Creates multi-file Font definition.

Parameters:

ParameterTypeDescription
fontNamesMultiLanguageStringFont names.
postscriptNamesMultiLanguageStringPostscript Font names.
fontTypeFontTypeFont type.
fileDefinitionFontFileDefinitionFontFileDefinition.

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

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

Creates multi-file Font definition.

Parameters:

ParameterTypeDescription
fontNamesMultiLanguageStringFont names.
postscriptNamesMultiLanguageStringPostscript Font names.
fontTypeFontTypeFont type.
fileDefinitionsFontFileDefinition[]Array of FontFileDefinition objects.

open(String fileName, FontType fontType)

public static FontDefinition open(String fileName, FontType fontType)

Returns FontDefinition for font file and font type.

Parameters:

ParameterTypeDescription
fileNamejava.lang.StringFont file name.
fontTypeFontTypeFont type.

Returns: FontDefinition - FontDefinition.

open(StreamSource source, FontType fontType)

public static FontDefinition open(StreamSource source, FontType fontType)

Returns FontDefinition for font stream source and font type.

Parameters:

ParameterTypeDescription
sourceStreamSourceFont stream source.
fontTypeFontTypeFont type.

Returns: FontDefinition - FontDefinition.

getFontName()

public String getFontName()

Returns Font name.

Returns: java.lang.String - Font name.

getFontNames()

public MultiLanguageString getFontNames()

Gets Font names as a MultiLanguageString .

Returns: MultiLanguageString - Font names as a MultiLanguageString .

getPostscriptName()

public String getPostscriptName()

Gets postscript Font name.

Returns: java.lang.String - Postscript Font name.

getPostscriptNames()

public MultiLanguageString getPostscriptNames()

Gets postscript Font names as a MultiLanguageString .

Returns: MultiLanguageString - Postscript Font names as a MultiLanguageString .

getFontType()

public FontType getFontType()

Gets Font type.

Returns: FontType - Font type.

getFileDefinitions()

public FontFileDefinition[] getFileDefinitions()

Gets file definitions collection.

Returns: com.aspose.font.FontFileDefinition[] - File definitions collection.