TextSpan

TextSpan

new TextSpan(text)

The TextSpan constructor
Parameters:
Name Type Description
text String The text content
Properties:
Name Type Description
__supportedAttributes__ __list__ List of supported attribute names. In addition to the property names listed for DisplayObject, these are the attribute names you can pass to the attr() method. Note that this property is not available in your code, it's just here for documentation purposes.
Properties
Name Type Description
text string The text content.
fontSize number The font size. Default: 16
fontFamily string The font family Default: 'monospace'
fontStyle string The font style. Can be one of 'normal' or 'italic'. Default: 'normal'
fontWeight string The font weight. Can be one of 'normal' or 'bold'. Default: 'normal'
glyphx string An array of x offsets mapped to each individual glyph position
glyphy string An array of y offsets mapped to each individual glyph position
cap string The shape to be used at the end of open Path items, when they have a stroke. Can be one of 'round', 'square', 'butt'. Default: 'butt'
textFillColor string The fill color. Default: black.
join string The shape to be used at the corners of paths. Can be one of 'miter', 'round', 'bevel'. Default: 'miter'
textStrokeColor string The line color. Default: transparent
textStrokeWidth number The line width. Default: 0
miterLimit number The miter limit of the stroke. Default: 4
selectable number Boolean indicates whether the text is selectable or not

Extends