Readonly
stageThe Advanced Text Renderer adds support for:
<b>
tag for bold text
<b>This is bold</b>
<i>
tag for italics text
<i>This is italics</i>
<color=$ARGB>
tag for colored text
<color=0xff00ff00>This is green</color>
See: https://github.com/rdkcentral/Lightning/pull/318 for more details
Enables the Advanced Text Renderer
The Advanced Text Renderer adds support for:
<b>
tag for bold text
<b>This is bold</b>
<i>
tag for italics text
<i>This is italics</i>
<color=$ARGB>
tag for colored text
<color=0xff00ff00>This is green</color>
See: https://github.com/rdkcentral/Lightning/pull/318 for more details
X coordinate of text cutting end position (in pixels)
X coordinate of text cutting end position (in pixels)
Y coordinate of text cutting end position (in pixels)
Y coordinate of text cutting end position (in pixels)
X coordinate of text cutting start position (in pixels)
X coordinate of text cutting start position (in pixels)
Y coordinate of text cutting start position (in pixels)
Y coordinate of text cutting start position (in pixels)
Font baseline ratio (Advanced Text Renderer only)
This can be used to improve vertical text alignment when using the Advanced Text Renderer.
You MUST enable advancedRenderer in order to use this.
See PR #378 for more information about this feature.
To calculate the ratio for a particular font face, you can do this calculation from font metadata:
(head.unitsPerEm − hhea.Ascender − hhea.Descender) / (2 × head.unitsPerEm)
This give you the ratio for the baseline, which is then used to figure out where the baseline is relative to the bottom of the text bounding box.
The input values can be retrieved using the opentype.js Font Inspector.
Font baseline ratio (Advanced Text Renderer only)
This can be used to improve vertical text alignment when using the Advanced Text Renderer.
You MUST enable advancedRenderer in order to use this.
See PR #378 for more information about this feature.
To calculate the ratio for a particular font face, you can do this calculation from font metadata:
(head.unitsPerEm − hhea.Ascender − hhea.Descender) / (2 × head.unitsPerEm)
This give you the ratio for the baseline, which is then used to figure out where the baseline is relative to the bottom of the text bounding box.
The input values can be retrieved using the opentype.js Font Inspector.
Font family
If an array is provided, font families that appear later in the array are used as fallbacks. If the
(default) null
value is specified, the font family value specified in the defaultFontFace
Stage Option is used. If the resolved font
family (or families) is unavailable to the browser, a fallback is chosen by the browser. The special
CSS defined font family values
of "serif" and "sans-serif" may be used as well.
null
(uses Stage.Options.defaultFontFace)
Font family
If an array is provided, font families that appear later in the array are used as fallbacks. If the
(default) null
value is specified, the font family value specified in the defaultFontFace
Stage Option is used. If the resolved font
family (or families) is unavailable to the browser, a fallback is chosen by the browser. The special
CSS defined font family values
of "serif" and "sans-serif" may be used as well.
null
(uses Stage.Options.defaultFontFace)
Font size (in pixels)
Font size (in pixels)
Font style
Font style
Highlight mode
Highlight mode
Highlight color
highlight must be enabled for this property to have any affect.
Highlight color
highlight must be enabled for this property to have any affect.
Highlight height (in pixels)
Highlight height (in pixels)
Highlight Y offset (in pixels)
Shifts the rendered highlight blocks down the Y-axis.
highlight must be enabled for this property to have any affect.
Highlight Y offset (in pixels)
Shifts the rendered highlight blocks down the Y-axis.
highlight must be enabled for this property to have any affect.
Highlight left padding (in pixels)
> 0
:
< 0
:
highlight must be enabled for this property to have any affect.
Highlight left padding (in pixels)
> 0
:
< 0
:
highlight must be enabled for this property to have any affect.
Highlight right padding (in pixels)
> 0
:
< 0
:
highlight must be enabled for this property to have any affect.
Highlight right padding (in pixels)
> 0
:
< 0
:
highlight must be enabled for this property to have any affect.
Spacing between letters
Spacing between letters
Line height (in pixels)
Line height (in pixels)
Maximum number of lines to display before truncation
If this is set to a value greater than 0, multiline text will be truncated at this number of lines. The maxLinesSuffix will be inserted at the end of the last rendered line of text.
Maximum number of lines to display before truncation
If this is set to a value greater than 0, multiline text will be truncated at this number of lines. The maxLinesSuffix will be inserted at the end of the last rendered line of text.
String rendered at the end of a truncated line of text
This suffix is used in the following situations:
"ellipsis"
,
and wordWrapWidth is exceeded.String rendered at the end of a truncated line of text
This suffix is used in the following situations:
"ellipsis"
,
and wordWrapWidth is exceeded.Text Y offset (in pixels)
Translates the position of rendered text along the Y-axis.
This value must be equal to at least the fontSize (which is the default) for the first line of
text to be completely visible in the texture. If set to 0
, the first line of text will be completely
clipped.
Text Y offset (in pixels)
Translates the position of rendered text along the Y-axis.
This value must be equal to at least the fontSize (which is the default) for the first line of
text to be completely visible in the texture. If set to 0
, the first line of text will be completely
clipped.
Padding left (in pixels)
Padding left (in pixels)
Padding right (in pixels)
Padding right (in pixels)
Render precision of text
Stage.Options.precision stage option
Render precision of text
Stage.Options.precision stage option
Text shadow mode
If set, enables a text shadow behind the rendered text controlled by these properties:
See CanvasRenderingContext2D - Shadows (MDN) for more information on the properties that determine shadows.
Text shadow mode
If set, enables a text shadow behind the rendered text controlled by these properties:
See CanvasRenderingContext2D - Shadows (MDN) for more information on the properties that determine shadows.
Text shadow blur iterations
shadow must be enabled for this property to have any affect.
See CanvasRenderingContext2D.shadowBlur
(MDN)
for more information on this property.
Text shadow blur iterations
shadow must be enabled for this property to have any affect.
See CanvasRenderingContext2D.shadowBlur
(MDN)
for more information on this property.
Text shadow color
shadow must be enabled for this property to have any affect.
See CanvasRenderingContext2D.shadowColor
(MDN)
for more information on this property.
Text shadow color
shadow must be enabled for this property to have any affect.
See CanvasRenderingContext2D.shadowColor
(MDN)
for more information on this property.
Text shadow X offset (in pixels)
shadow must be enabled for this property to have any affect.
See CanvasRenderingContext2D.shadowOffsetX
(MDN)
for more information on this property.
Text shadow X offset (in pixels)
shadow must be enabled for this property to have any affect.
See CanvasRenderingContext2D.shadowOffsetX
(MDN)
for more information on this property.
Text shadow Y offset
shadow must be enabled for this property to have any affect.
See CanvasRenderingContext2D.shadowOffsetY
(MDN)
for more information on this property.
Text shadow Y offset
shadow must be enabled for this property to have any affect.
See CanvasRenderingContext2D.shadowOffsetY
(MDN)
for more information on this property.
Text to display
Text to display
Text baseline
See CanvasRenderingContext2D.textBaseline
(MDN)
for the available options.
Text baseline
See CanvasRenderingContext2D.textBaseline
(MDN)
for the available options.
Text color
Text color
Indent of the first line of text (in pixels)
Indent of the first line of text (in pixels)
Text overflow mode
When enabled, truncates long blocks of text with a suffix (like "..") to the size specified in wordWrapWidth. wordWrap must be disabled for this to work.
Values
"ellipsis"
: Truncated text will end in maxLinesSuffix."clip"
: Truncated text will not end in a suffix.string
: Truncated text will end in this user-defined suffix.Text overflow mode
When enabled, truncates long blocks of text with a suffix (like "..") to the size specified in wordWrapWidth. wordWrap must be disabled for this to work.
Values
"ellipsis"
: Truncated text will end in maxLinesSuffix."clip"
: Truncated text will not end in a suffix.string
: Truncated text will end in this user-defined suffix.Vertical text aligment
Vertical text aligment
Word Breaking mode (Advanced Text Renderer only)
When enabled, words that overflow the set width of the texture will be broken to another line.
You MUST enable advancedRenderer in order to use this.
Word Breaking mode (Advanced Text Renderer only)
When enabled, words that overflow the set width of the texture will be broken to another line.
You MUST enable advancedRenderer in order to use this.
Word wrap mode
When enabled (default), long lines that exceed wordWrapWidth will be be broken into new lines.
Word wrap mode
When enabled (default), long lines that exceed wordWrapWidth will be be broken into new lines.
Word wrap width (in pixels)
Word wrap width (in pixels)
Protected
_getProtected
_getProtected
_getProtected
Static
renderer
Enables the Advanced Text Renderer