3 font structure – Microcom 322M User Manual

Page 72

Advertising
background image

Downloadable Fonts

Chapter 8

68

322M Operator’s Manual

<Memory Slot Number> is the memory slot location (1-255) where the graphic will be saved
in the printer’s memory. The printer uses the same TCI of “8” to select downloadable fonts
or graphics. Therefore a font and a graphic cannot have the same Slot Number or CGN
number.

<Rotation> is an 8-bit integer, 0 for an upright font and 1 for a 90-degree rotated image.

<Count> is a 32-bit integer, least significant byte first. This is the number of bytes that the
image uses.

<Image Data> is the graphic image data that has been converted to ASCII-HEX.

ASCII-HEX Conversion
The ASCII-

HEX conversion is performed by OR’ing the most significant and least significant

nibbles of every byte with “30” HEX.

For Example: To convert the byte “6C” to ASCII-HEX, simply OR the first and second
nibbles with “30” HEX. This results in the two bytes “36” HEX and “3C” HEX. This
conversion results in a file size that is twice as big as the source but the data can now be
transmitted over a 7-bit data connection. Refer to Figure 13.

8.3

Font Structure

The following font structure

is offered to programmer’s who wish to use their own programs

to convert fonts. The font structure consists of a set of data structures and location offsets
to those structures. All data is stored in binary form. Multi-byte values are stored

“least

significant byte

” first. The printer can store a font of approximately 64KB or less in any one

memory slot location.

(Word is a 16-bit value, Byte is an 8-bit value, and Label is a location within the file)

Label start:

the beginning of the file


Word, Word, lookup_table_offset

distance in bytes from start to beginning of
lookup_table (4 bytes)


Word tallest_char

height of graphic image in dots

Word widest_char

Width of graphic image in dots


Byte default_spacing

Default spacing, usually 0


Byte byte_width

Width of graphic image in bytes


Byte first_char

20 HEX


Byte last_char

20 HEX

Byte default_char

20 HEX


Label lookup_table

beginning of lookup table

Advertising