Version 1

Scrolling Text Format

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.

Scrollable Text Format
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.

Examples

In the following examples, the byte values in the example are all in hexadecimal.

[00, 05, 53, 61, 6c, 65, 21, 00, 1f, 42, 61, 6e, 61, 6e, 6e, 61, 73, 20, 24, 31, 2f, 6c, 62, 2c, 20, 41, 70, 70, 6c, 65, 73, 20, 24, 31, 2e, 35, 30, 2f, 6c, 62, 00, 00, 10]
This produces a message with one static area on top saying "Sale!" and the scrolling message "Banannas $1/lb, Apples $1.50/lb" scrolling at 10 pixels per second.
[00, 05, 53, 61, 6c, 65, 21, 00, 0e, 4f, 69, 6c, 20, 43, 68, 61, 6e, 67, 65, 20, 24, 31, 30, 00, 0a, 54, 6f, 64, 61, 79, 20, 4f, 6e, 6c, 79, 0f]
This produces a message with two static areas, the one on top saying "Sale!", the one on bottom saying "Today Only", and the scrolling text inbetween, "Oil Change $10", with a scrolling speed of 15 pixels per second.