Search
Font Members
Constructors Properties Methods
 


Represents a font.

The following tables list the members exposed by the Font type.

 Public Constructors

  Name Description

Font

Initializes a new instance of the Font class with the specified attributes.

 Public Properties

  Name Description

bold

Gets whether the font is bold.

fontStyle

Gets or sets the style of this font.

italic

Gets whether the font is italic.

name

Gets or sets the name of this font.

size

Gets or sets the size of this font.

underline

Gets whether the font is underlined.

 Public Methods

  Name Description

apply

Applies the font properties to a CanvasRenderingContext2D drawing object.

fromObject

Returns a Font from a JSON object or string describing this font.

toObject

Returns a JSON object describing this font.

 See Also