beautypg.com

Microcom 412 User Manual

Page 70

background image

Downloadable Fonts

Chapter 7

412 Operators Manual

62

^A ^D107

Where:
is a slot number, 1 through 255 (in ASCII). Note: The 412 uses the same TCI
for fonts and graphics. They are both accessed by using a TCI of 8. Therefore a font and a
graphic cannot have the same CGN number.

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

is a 32-bit integer, least significant byte first. This is number of uncompressed bytes
that the image uses, not the number of bytes that will actually be transmitted. Due to
compression, the number of bytes transmitted will normally be less than this number.

are the compressed character images. Refer to section 7.3 for a detailed
description of this data.

Compression Algorithm
The binary data that make up the image file is a run-length compressed version of the image
data described in section 6.2. Bytes with a value of 0h or FFh are followed by another byte
indicating the number of times that value is repeated.

For example, suppose the original (uncompressed) image file has a sequence of bytes like
this: (all values are in hexadecimal)
00 01 02 03 04 00 00 00 00 00 00 FF FD FF FF FF FF FF 00 FF

The encoded result would look like this:
00 00 01 02 03 04 00 05 FF 00 FD FF 04 00 00 FF 00

Here's the interpretation:
00 - the first byte is 00
00 - count of 0 - the previous 00 byte is not repeated
01 - a 01 byte
02 - a 02 byte
03 - a 03 byte
04 - a 04 byte
00 - another 00 byte in the file
05 - count of 5 - insert 5 more 00 bytes (total of 6 in sequence)
FF - a FF byte
00 - count of 0 - the previous FF byte is not repeated
FD - a FD byte
FF - another FF byte
04 - count of 4 - insert 4 more FF bytes (total of 5 in sequence)
00 - another 00 bytes
00 - count of 0 - the previous 00 byte is not repeated
FF - another FF byte
00 - count of 0 - the previous FF byte is not repeated.