Command Summary
29
Table 23: Example Character Table
MSB LSB Width
h
0
13
5
i
0
18
3
j
0
21
4
The character table contains information that allows the display to locate each individual character in a
mass of character data. Each character has three bytes; two indicating it’s offset in the character data
and one indicating its width. The offset takes into account the header and table bytes to point to the
first byte of the character data it references. The first byte of the file, maximum width, has an offset of
zero. The width byte of each character can be identical as in a fixed width font, or in our case, variable.
The character table will become clearer after analyzing the final part of the font file, character data.
Table 24: Character ‘h’
Bitmap
1
0
0
0
0
1
0 0 0 0
1
0
1
1
0
1 1
0 0
1
1
0
0
0
1
1
0 0 0
1
1
0 0 0
1
Table 25: Character ‘h’ Data
1
0
0
0
0
1
0
0
84
132
0 0
1
0
1 1
0
1
2D
45
1
0 0
1
1
0 0
0
98
152
1 1
0
0
0
1
1
0
C6
198
0 0
1
0 0
0 0 0
20
32
The character data is a binary graphical representation of each glyph in a font. Each character is drawn
on a grid containing as many rows as the height specified in the header and as many columns as the
width specified in the character table. Cells are drawn by writing a one in their location and cleared by
setting a value of zero. Starting at the top left, moving right, then down, eight of these cells form a
character data byte. When all cells are accounted for, zeroes may be added to the last byte to complete
it. A sample of an ‘h’ glyph is shown above. The data for the ‘i’ and ‘j’ characters will follow to complete
the custom font file displayed below.
Table 26: Example Font File
Header
5 7 104 106
Character Table
0 13 5
0 18 3
0 21 4
Character Data
132 45 152 198 32
67 36 184
16 49 25 96
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from