Constructor
new Font()
- Source:
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
type |
string | Font type or face; typography name | ||
size |
number |
<optional> |
24
|
Size of font; in pixels |
weight |
string |
<optional> |
'normal'
|
Weight of font |
maxWidth |
number | Font's maximum width | ||
offset |
Point | Point offset coordinates |
Methods
font(value)
- Description:
- Set font
- Source:
Parameters:
Name | Type | Description |
---|---|---|
value |
string | CSS style font property syntax |
font() → {string}
- Description:
- Get font
- Source:
Returns:
CSS style font property syntax
- Type
- string
maxWidth(value)
- Description:
- Set font's max width
- Source:
Parameters:
Name | Type | Description |
---|---|---|
value |
number | Max width |
maxWidth() → {number}
- Description:
- Get font's max width
- Source:
Returns:
Max width
- Type
- number
offset() → {Point}
- Description:
- Get font's offset
- Source:
Returns:
Font's offset; ( x, y )
- Type
- Point
size(value)
- Description:
- Set font size
- Source:
Parameters:
Name | Type | Description |
---|---|---|
value |
number | Font size |
size() → {number}
- Description:
- Get font size
- Source:
Returns:
Font size
- Type
- number
type(value)
- Description:
- Set font type
- Source:
Parameters:
Name | Type | Description |
---|---|---|
value |
string | Type face; typography name |
type() → {string}
- Description:
- Get type
- Source:
Returns:
Type face; typography name
- Type
- string
weight(value)
- Description:
- Set font weight
- Source:
Parameters:
Name | Type | Description |
---|---|---|
value |
number | Font weight |
weight() → {number}
- Description:
- Get font weight
- Source:
Returns:
Font weight
- Type
- number