ANSI Support

All text messages sent to the iLCD may contain ANSI control sequences, for cursor control, attribute settings and so on. For further information about what sequences exist and how they are interpreted refer to the chapters listed under Standard ANSI Sequences and Private ANSI Extensions. Please note that setting ANSI mode to off causes the ANSI sequences to be interpreted as normal characters.

Using cursor control sequences from the standard ANSI sequences makes sense only if you have chosen a fixed pitch font as the iLCD controller always uses the maximum character width of the selected font (which is equal to the character width of any character on a fixed size font).

If you use a standard sequence such as \e[4D (go left 4 characters), and you have printed the text "Hill" via a proportional font, the resulting cursor position would be too far left as the "i" and "l" characters take much less space than the maximum character width used.

ANSI cursor control sequences will mainly be used on simple character output applications, which may use the iLCD's terminal mode. A typical application is showing the console output of a Linux system. In such cases there is no problem in using a fixed pitch font. More sophisticated applications can run the command mode or use the private ANSI extensions, which support many more possibilities.

Find following listings in this chapter: