4 working with font files, File format (font) – Matrix Orbital GLK12232-25-SM Legacy User Manual
Page 24

24
[type] = 1 is a font file
[type] = 5 is a bitmap
Once this command is completed all files “move up” and recover the empty space for efficient memory
management.
6.3.2 Purge memory (254 33 89 33)
This command completely erases the GLK12232-25-SM's non-volatile memory. This removes all fonts,
font metrics, bitmaps, and settings (current font, cursor position, communication speed, etc.). It is an "odd"
command in that it is three bytes in length. This is to prevent accidental execution.
6.3.3 Upload Font (254 36 [ref] [file size] [file data])
This command begins a font upload to the GLK12232-25-SM's non-volatile memory. [ref] is the reference
number to be used for this font. File size is a 2 byte value that must be calculated by the host before the
transfer takes place. See section 6.4 for details.
6.3.4 Upload Bitmap (254 94 [ref] [file size] [file data])
This command begins a bitmap upload to the GLK12232-25-SM's non-volatile memory. [ref] is the
reference number to be used for this bitmap. File size is a 2 byte value that must be calculated by the host
before the transfer takes place. See section 6.5 for details.
6.4 Working with Font Files
A font file consists of a header, a character list, and character bitmaps.
The header consists of:
Placeholder for actual EOF (2 bytes, use 0xFF 0xFF – these bytes will be set to their final value by the
module)
Nominal character width (1 byte)
Absolute font height (1 byte)
ASCII value of first character defined in this file (1 byte)
ASCII value of last character defined in this file (1 byte)
The character list consists of groups of 3 bytes per character:
Offset to character bitmap (2 bytes)
Actual width of this character (1 byte)
The character bitmaps are described in section 6.4.3.
6.4.1 Font File in Table Form
The table below shows the layout of a font file in table form.
File Format (Font)
0xFF
0xFF
X size
Y size
Start
End
O-High
O-Low
Width O-High O-Low Width O-High O-Low Width O-High