new Tiny.TextStyle(style)
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
style |
object |
The style parameters
|
Methods
-
clone() ❯ {Tiny.TextStyle}
-
Creates a new TextStyle object with the same values as this one.
Note that the only the properties of the object are cloned.Returns:
Type Description Tiny.TextStyle New cloned TextStyle object -
reset()
-
Resets all properties to the defaults specified in TextStyle.prototype._default
-
toFontString() ❯ {string}
-
Generates a font style string to use for
TextMetrics.measureFont().Returns:
Type Description string Font style string, for passing to TextMetrics.measureFont()