Font

Overview

The Font object represents a native font in javascript.

Ancestors

  1. None
 

Descendants

  1. None
 

See Also

  1. None

Constructors

new Font
Description

Gets a system font and creates a font object for it.

Definition

new Font(name, number)

Members

bold
Description

Gets or sets whether the font is bolded. Note, for finer control over the font's boldness use the weight property.

Definition

boolean font.bold (default false)
expanded
Description

Gets or sets whether the font is expanded.

Definition

boolean font.expanded (default false)
face
Description

Gets or sets the face fo the font.

Definition

string font.face
family
Description

Gets or sets the font's family.

Definition

string font.family (default 12)
fontFamilies
Description

Gets a list of all available font families installed on the system.

Definition

array font.fontFamilies
fonts
Description

Gets a list of all available fonts on the system. This is a 'static' method, and does not require creating a font (E.g., Font.fonts).

Definition

array font.fonts
italic
Description

Gets or sets whether the font is italicized.

Definition

boolean font.italic (default false)
monospaced
Description

Gets whether the font is monospaced.

Definition

boolean font.monospaced
size
Description

Gets or sets the size of the font in logical pixels.

Definition

number font.size (default 12)
vertical
Description

Gets whether the font is vertical or horizontal.

Definition

boolean font.vertical
weight
Description

Gets or sets the boldness of the font, this can be a range from 0 to 999.

Definition

number font.weight (default 400)