Matrix Orbital GLK240128-25 Legacy User Manual
Page 25
Bitmap Data
Byte
Hex Value
1
0
0
0
0
1
0
0
0
0
10000100
0x84
1
0
1
1
0
00101101
0x2D
1
1
0
0
1
10011000
0x98
1
0
0
0
1
11000110
0xC6
1
0
0
0
1
00100000
0x20
1
0
0
0
1
Figure 20: Bitmap Encoding
As you can see the letter h will take up five bytes with the last five bits being zero padded to form a full
byte. So if you continue the process you will get the character data as seen in table 5.1.2.
Character Data
Character Data
Byte Size (For Reference)
h
0x84
0x2D
0x98
0xC6
0x20
0x05
i
0x43
0x24
0x84
0x03
j
0x2D
0x98
0x19
0x60
0x04
The second part of the font file is the character table. The character table is comprised of three bytes for
every glyph in the font file.
The first two bytes represents the position, in bytes, of the glyph stored MSB LSB referenced from the
beginning of the file (including the header. The third byte is the width of the glyph in pixels. So because
there will be 0x09 bytes in the character table (three bytes for each glyph) and four bytes in the header
section, the first entry in the table will be 13, or 0x00 0x0D in hexadecimal, and 0x05 for the width.
To calculate the second entry in the character table, representing the position and width of the second
glyph, take the offset of the first entry and add the size of the first bitmap in bytes. Since the first glyph
occupies 0x05 bytes as seen in table 5.1.2 above, and the offset is 0x00 0x0D, the offset of the second entry
will be 0x00 0x12 and the width of the glyph is 0x03.
Calculate the third entry the same way as the second to get table 9 below.
Table 9: Character Table
High Offset (MSB)
Low Offset (LSB)
Character Width
h
0x00
0x0D
0x05
i
0x00
0x12
0x03
j
0x00
0x15
0x04
Once completed, place the character table after the header and the character data aat the end, as seen in
table 10.
Matrix Orbital
GLK240128-25
20