Font

new Font()

A Font class to store font information.

Properties
NameTypeDescription
familystring

The font family.

sizenumber

The font size.

styleFont.STYLE

The font style.

weightFont.WEIGHT

The font weight.

Members

(static, readonly) STYLE :string

Font style.

Type:
  • string
Properties
NameTypeDescription
NORMALstring
ITALICstring
OBLIQUEstring

(static, readonly) WEIGHT :string

Font weight.

Type:
  • string
Properties
NameTypeDescription
NORMALstring
BOLDstring
BOLDERstring
LIGHTERstring

Methods

toString() → {string}

Returns the font as a string.

Returns:

The font as a string.

Type: 
string