FontDescriptor

Inheritance: java.lang.Object

public final class FontDescriptor

Represents font information.

Constructors

ConstructorDescription
FontDescriptor(String fontFamily, float size)Initializes a new instance of the FontDescriptor class with the specified font family and size.
FontDescriptor(String fontFamily, float size, int style)Initializes a new instance of the FontDescriptor class with the specified font family, size and style.
FontDescriptor(FontDescriptor font, int style)Initializes a new instance of the FontDescriptor class with the specified font and style.

Methods

MethodDescription
getFontFamily()Gets the name of the font’s family.
getSize()Gets size of the font.
getStyle()Gets style of the font.

FontDescriptor(String fontFamily, float size)

public FontDescriptor(String fontFamily, float size)

Initializes a new instance of the FontDescriptor class with the specified font family and size.

Parameters:

ParameterTypeDescription
fontFamilyjava.lang.StringName of the font family.
sizefloatSize of the font.

FontDescriptor(String fontFamily, float size, int style)

public FontDescriptor(String fontFamily, float size, int style)

Initializes a new instance of the FontDescriptor class with the specified font family, size and style.

Parameters:

ParameterTypeDescription
fontFamilyjava.lang.StringName of the font family.
sizefloatSize of the font.
styleintStyle of the font.

FontDescriptor(FontDescriptor font, int style)

public FontDescriptor(FontDescriptor font, int style)

Initializes a new instance of the FontDescriptor class with the specified font and style.

Parameters:

ParameterTypeDescription
fontFontDescriptorInstance of FontDescriptor to copy.
styleintStyle of the font.

getFontFamily()

public final String getFontFamily()

Gets the name of the font’s family.

Returns: java.lang.String - the name of the font’s family.

getSize()

public final float getSize()

Gets size of the font.

Returns: float - size of the font.

getStyle()

public final int getStyle()

Gets style of the font.

Returns: int - style of the font.