Scrolling text supports either 1 scrolling line of text, or 1 static text area and 1 scrolling line of text, or 1 scrolling line of text sandwiched between two static text areas. The scroll speed is a configurable option.
The font size for the scrollable text will be determined as the largest font which (1) permits the number of lines in this message and (2) permits the word "substantial" to render on the board. The scrollable line is then placed according to how many of the static areas are non-empty. (If the first is non-empty, the scrollable area is placed on the bottom, etc.) The remaining area(s) of the board are then treated as smaller signs, and the text for them is rendered into the static area using the adaptive text algorithm.
The direction of scrolling is calculated by analyzing the scrolling text, and scrolling in the opposite direction from the plurality of character directions.
The scrollable text's format is as follows:
NOTE: all multi-byte formats are big-endian unless otherwise specified, and String refers to the java DataOutput string type which is a big-endian short indicating the number of bytes following, followed by that many bytes of UTF-8 data.
Size | Data Type | Value | Description |
2-65,537 | String | The first static text. | |
2-65,537 | String | The dynamic line text. | |
2-65,537 | String | The second static text. | |
1 | unsigned byte | speed, in pixels per second per 100 pixels of board width |
If either static text area is the string "" (that is, length 0 with no characters following), then that static text area is omitted. If both are "", then the message consists only of the scrolling text.
The speed is defined to be per 100 pixels of board width, so it must be scaled to do the actual scrolling. For example, with a pps of 30, on a board 48x27 board, the text should be scrolled at 14.4 pps. On a 160x48 board, the text should be scrolled at 48pps.
In the following examples, the byte values in the example are all in hexadecimal.