textstyle
Text styles (size, font, weight, italic, colour, halo, background).
#Functions
#textstyle.newfunction
A text style (size, font, weight 300-800, italic, colour, halo outline, background).
textstyle.new({ size?: const size = size.normal, font?: const string = font.ui, weight?: const int = 400, italic?: const bool = false, color?: const color = na, halo?: const color = na, bg?: const color = na }): string| Parameter | Type | Description |
|---|---|---|
size | const sizedefault size.normal | The text size: size.tiny ... size.huge, size.px, size.pt or size.rel. |
font | const stringdefault font.ui | One of the font.* constants. |
weight | const intdefault 400 | Font weight, 300-800. |
italic | const booldefault false | true: italic. |
color | const colordefault na | The colour. |
halo | const colordefault na | An outline around the text, readable over candles. |
bg | const colordefault na | A background behind the text. |
Returns string.
Example
const ts = input.textstyle(textstyle.new(size.pt(9), font.mono, 600), "Labels")Since ChartScript 1