Character font image download (esc =) – Compuprint 4247-Z03 Programmer Manual User Manual
Page 34
This command selects unidirectional printing for one line only. The print head moves to the home position
at the left side of the printer and prints one line, left to right. The command is then cancelled by the
carriage return that sends the print head back to the home position.
Character Font Image Download (ESC =)
1B
3D
LL
HH
FF
LF
W
H
CP
N
XX...XX
This control downloads special character images.
A two-byte count (LL HH) indicates the number of bytes that follow in this control.
LL is the least significant byte of the count; HH is the most significant byte of the count. The number of
bytes that follow should equal HH
× 256 + LL. If the count equals X'0000', the control is ignored.
FF is the format byte and must equal X'13'. LF is a one-byte font identifier that specifies the previously
initialized or selected font to be modified. See “Change Font (ESC I)” on page 16.
W is a one-byte value that specifies the width of the character cells in options. For DP fonts, the value is
X'0A'. For fixed pitch DP Text and NLQ fonts, the value is X'14'. For DP Text and NLQ, proportional fonts
values may vary. However, for all code points downloaded with this control, all character cells defined will
be Width options wide.
H is a one-byte value that specifies the height of the character cells in dots. Valid values are X'09' for DP
and DP Text and X'12' for NLQ.
CP is a one-byte value. This parameter specifies the first code point to download. A single code point or
multiple code points can be downloaded. If the font being downloaded was previously initialized, the
downloaded characters overlay the resident characters in the font.
N is a one-byte value that specifies the number of code points defined by this control. If the starting code
point plus the number of code points is greater than 256, the control is ignored.
XX .. XX is the font image download data. These data bytes define the character cells. Multiple bytes
define each vertical slice of the character cell. The slice data for each code point is in a contiguous format
(run-together) as follows:
v
If the slice data is nine-bits high, byte 1 is put into the high-order bits in slice 1 and the high-order bit of
byte 2 is the low order bit of slice 1. The remaining seven bits of byte 2 are put into the high-order
seven bits of slice 2, and so on.
v
If the slice data is 18-bits high, bytes 1 and 2 are put into the high-order bits of the first slice and the
two high-order bits of byte 3 complete the first slice. Slice 2 is composed similarly, starting with the
remaining six bits in byte 3.
Note: The contiguous format (run-together) does not occur from one code point to the next. The top dot of
the leftmost slice of each code point is always in the high-order bit of the first byte of image data for
that code point.
The number of data bytes required to define the image for each code point can be calculated as follows:
Image Length = (Width × Height) ÷ 8
Note: If there is a remainder from the division by 8, add 1 to the quotient.
Example: To define an image for a standard DP font where Width = 10 and Height = 9:
Image Length = (10 × 9) ÷ 8
14
Programmer Manual