FontFactory

Inheritance: java.lang.Object

public class FontFactory

Contains functionality for opening fonts of different types and other methods for creating various objects.

Constructors

ConstructorDescription
FontFactory()Constructor

Methods

MethodDescription
open(FontDefinition fontDefinition)Opens a font, using FontDefinition object.
open(FontType fontType, StreamSource fontStreamSource)Opens a font, using font type and stream source.
open(FontType fontType, String fileName)Opens a font, using font type and font file name.
open(FontType fontType, byte[] fontData)Opens a font, using font type and font data byte array.

FontFactory()

public FontFactory()

Constructor

open(FontDefinition fontDefinition)

public Font open(FontDefinition fontDefinition)

Opens a font, using FontDefinition object.

Parameters:

ParameterTypeDescription
fontDefinitionFontDefinitionFont definition object.

Returns: Font - Font loaded.

open(FontType fontType, StreamSource fontStreamSource)

public Font open(FontType fontType, StreamSource fontStreamSource)

Opens a font, using font type and stream source.

Parameters:

ParameterTypeDescription
fontTypeFontTypeFont type.
fontStreamSourceStreamSourceStream source for font.

Returns: Font - Font loaded.

open(FontType fontType, String fileName)

public Font open(FontType fontType, String fileName)

Opens a font, using font type and font file name.

Parameters:

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

Returns: Font - Font loaded.

open(FontType fontType, byte[] fontData)

public Font open(FontType fontType, byte[] fontData)

Opens a font, using font type and font data byte array.

Parameters:

ParameterTypeDescription
fontTypeFontTypeFont type.
fontDatabyte[]Byte array to load font from.

Returns: Font - Font loaded.