Microcom 412 User Manual

Page 71

Advertising
background image

Chapter 7

Downloadable Fonts

412 Operators Manual

63

If a string of more than 255 0h or FFh bytes occurs, the byte-plus-count sequence may be
repeated as often as necessary to incorporate all occurrences of the byte. For example, a
string of 1132 FFh bytes in sequence can be encoded as:

FF FF FF FF FF FF FF FF FF 6B

The first four pairs of FFh each encode 256 bytes of FFh (one for the first byte and 255
copies), totaling 1024 bytes of FFh. The next FFh byte adds another, and the 6Bh adds 107
more copies. Thus, (4 x 256) + 1 + 107 = 1132 FFh bytes.

7.2.2 UNCOMPRESSED IMAGE COMMAND (^D104)
This command allows fonts or graphic images (fonts must be less than 64KB uncompressed)
to be transmitted in ASCII-HEX, thereby allowing all image data to pass over a 7 bit
connection. This command is useable on data connections that support 7 or 8 bit data.

The following is the format of ^D104 command when used with a graphic image file.

^A <slot number> ^D104
<rotation> <count> <image data>

Where:
<slot number> 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.

<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 character image data, described in section 7.3, which has been converted
to ASCII-HEX. (The ASCII-HEX conversion is described below.)

ASCII-HEX Conversion
The ASCII-HEX conversion is preformed by OR’ing the most significant and least significant
nibbles of every byte with 30h.

For example: To convert the byte 6C to ASCII-HEX, simply OR the first and second nibbles
with 30h. This results in two bytes 36h and 3Ch. This conversion results in a file size that is
twice a big as the source. The main advantage is that the file can be easily transmitted across
a 7 bit data connection.

7.3

FONT STRUCTURE

The following font structure is offered to programmers who with to use their own programs to
convert fonts.

Note: The 412 does not differentiate between graphics and fonts. They both are accessed by
using a TCI of 8. Therefore a font and a graphic cannot have the same CGN number.

Advertising