Configuration options for the text sprite block.
The font family used for rendering the text.
The font size used for rendering the text, in pixels.
The fixed line height for each sprite, in pixels.
The maximum number of lines of text to be displayed.
The width constraint for the text layout, in pixels.
Creates sprites from the rendered text using the browser's Canvas API. Returns an array of TxSprite instances, one per line of text. Each sprite has exactly lineHeight pixels in height and width pixels in width, except blank lines which are 1×lineHeight.
The text to render. Lines are split on '\n'.
Array of TxSprite instances.
Packs the text block header into a 6-byte binary format. Format: 0xFF (1 byte) | width (uint16 BE) | lineHeight (uint16 BE) | maxDisplayLines (uint8)
Uint8Array Binary representation of the text block header.
A block of text rendered as sprites, for use in a browser environment.