This is where the numbers down the left side of the grid come in. Notice that there is a
numberfor each row of dots andthat each number is twicethe numberbelow it. Bymaking
thesenumbers powers of two we can take any combination of dots inavertical column and
assign them aunique value.
Assigning avalue of character space
Besides being able to specify the actual width of the character, thisprinter allows you to
specify the position in the standard grid where the character will print. You must specify
the dot column in which the printed character starts and the dot column in which the
character ends. Why, you may ask,would you want to define acharacter this way instead
of merely defining the overall width ofthe character? Because this printer’s proportional
character definitions can also be used to print normal width characters, and by centering
even the narrow characters in the complete grid they will look good even you are not
printing them proportional.
The three bytes are used to specify the width of thecharacter and the space to be allowed
on either sideof it. The left space (in dot columns) is specified by rnOand the right space
is specified by m2.The second byte (ml) specifies the width of the character in dots. By
varying the width of thecharacter itself and the spaces around it, you can actually create
proportional width characters.
When definingcharacters, the numberof printed columns (ml), and the sum ofside spaces
and thecharacter width (mO+ml +m2) cannotexceed the value shown below.
Character mode ml mO+ml +m2
Pica characters 31 36
Elite characters 27 30
Semi-condensed 19 24
Proportional 37 42
Super/subscript 19 36
Proportional super/subscript 37 42
Sample program
To demonstrate how to use the 24-dot download characters, let’s use the “telephone”
characterand the other user-defined characters to printasmall graph.This program willdo
just that:
1000 WIDTH “LPT1 :,255
1010 LPRINT CHR$ (27);“Xl “;
1020 LPRINT CHR$( 27);“it”;CHR$(O):
1030 LPRINT CHR$(60) ;CHR$( 61 );
1FOR N=60 TO 61
1050 READ LS :LPRINT CHR$ (Ls);
1060 READ CW :LPRINT CHR$ (CW):
1070 READ RS :LPRINT CHR$ (Rs) ;
1080 FOR M=1TO CW’k3
1090 READ MM
1100 LPRINT CHR$(MM) ;
1110 NEXT M
1120 NEXT N
Chapter7 DOWNLOAD CHARACTERS 69