Displaying text, 1 general, 2 writing text to the display – Matrix Orbital GLK24064-25 Legacy User Manual
Page 12: 3 text commands

GLK24064-25 rev. 06
12
3. Displaying Text
This chapter describes the various text-display commands in detail. A quick reference summary of all text
commands is found in section 8.4.
3.1 General
Text is displayed on the GLK24064-25 using fonts saved in its internal flash memory. The GLK24064-25 is
supplied with a 5 x 7 font installed. If this suits your needs you don't need to install any other fonts. If you
prefer to install your own fonts, instructions are given in section 6.2.
3.2 Writing Text to the Display
When the display receives a character, it displays that character at the position currently defined. The next
character sent to the module then advances to the following position on the display. Characters are drawn
using the currently selected font, and only characters defined in the current font are actually processed.
Characters that are not defined by the current font are ignored, and the positioning is not advanced for the
next character.
The position where text is to be displayed is a single pixel location stored in the GLK's volatile memory and
maintained internally by the GLK's firmware. This position is manipulated by the commands shown in the
following section.
3.3 Text Commands
In this section commands are identified by their names and decimal values. Hex and ASCII equivalents are
given in the summary (Table 8-1). Before issuing commands to the GLK24064-25 please read sections
8.2 and 8.3.
3.3.1 Auto scroll on (254 81)
When auto scrolling is on, it causes the GLK to shift the entire display’s contents up to make room for a
new line of text when the text reaches the scroll position defined by the “Set Font Metrics” command in the
GLK memory (normally the bottom right character position - default
value for the GLK24064-25 is 64).
3.3.2 Auto scroll off (254 82)
When auto scrolling is disabled, text will wrap to the top left corner of the display area. Existing graphics or
text in the display area are not erased before text is placed; when using proportional fonts without auto
scrolling, care should be taken to clear areas where text is being written, particularly when wrapping occurs.
This may be done using the Draw Solid Rectangle command (see section 4.2.6) with the colour set to white.
3.3.3 Set text insertion point (254 71 [col] [row])
This command sets the insertion point to the [column] and [row] specified. The insertion point is positioned
using the base size of the current font (this command does not position the insertion point at a specific
pixel). The pixel column used is determined by multiplying the width of the widest character in the font by
[column]. The pixel row used is determined by multiplying the row number by [font height + interline
spacing] (see Set font metrics, below). If precise pixel-based text positioning is required, see "Set text
insertion point – pixel values", below.