Font

Font

Stores font informations (To be used with wCanvas#textFont)

Constructor

new Font(fontFamilyopt, fontSizeopt, …attributesopt)

Source:
Parameters:
Name Type Attributes Default Description
fontFamily String <optional>
Arial

The Font Family to use

fontSize Number <optional>
12

The size of the font

attributes String <optional>
<repeatable>

All the extra CSS Attributes for the font

Classes

Font

Members

attributes :Array.<String>

Other font attributes like "italic", "oblique" and others

Source:
Type:
  • Array.<String>

fontFamily :String

The font family

Source:
Type:
  • String

fontSize :Number

The size of the font

Source:
Type:
  • Number

Methods

toCSSProperty() → {String}

Returns this font as a CSS property

Source:
Returns:
Type:
String

The font as a CSS property