MonospaceLabel

Available since Roku OS 14.0

The MonospaceLabel node is used to draw a single line of text with all characters spaced at a fixed distance from each other. It transforms proportional fonts into monospaced fonts. It is a substitute for using a monospace font with the Label node.

Fields

FieldTypeDefaultAccess PermissionDescription
textstringREAD_WRITESpecifies the text to be displayed
colorcolor0xddddddffREAD_WRITESpecifies the text color
fontFontsystem defaultREAD_WRITESpecifies the Font node to be used
horizAlignstringleftREAD_WRITESee Horizontal Alignment
vertAlignstringtopREAD_WRITESee Vertical Alignment
widthfloat0READ_WRITESpecifies the width of the label. If set to zero, the width of the label will be set automatically
heightfloat0READ_WRITESpecifies the height of the label. If set to zero, the height of the label will be set automatically
characterWidthfloat0READ_WRITESpecifies the width of the label characters. If set to zero, width of font’s character 'M' will be used
ellipsizeOnBoundaryBooleanfalseREAD_WRITEIf the width field value is greater than zero, controls whether or not the last line of text displayed should be ellipsized if it extends beyond the specified width. It is ignored if the truncateOnDelimiter field value is set to a non-empty stringWhen set to true, text will be ellipsized by whole words. Example: "This is the last line of..."When set to false, text will be ellipsized by characters. Example: "This is the last line of tex..."
firstCharTrueLeftAlignBooleanfalseREAD_WRITEForces the first character to left align completely instead of rendering centered in the character box. Subsequent characters are centered in their character box. If enabled monospace text strings with different first characters will shift around. This is primarily used for single characters strings
wordBreakCharsstringREAD_WRITEBy default, space and hyphen characters are used to determine where lines can be divided. In addition, this field can specify additional characters to be used to determine where the text can be broken into lines
isTextEllipsizedBooleanfalseREADTells whether or not currently displayed text is clipped.