34
Table 3-9
Print emphasis commands
Function Control code
Boldface ON (ESC) “G”
Boldface OFF (ESC) “H”
Emphasized ON (ESC) “E”
Emphasized OFF (ESC) “F”
Try them now with this little program:
10 ' Demo of boldface and emphasized
20 LPRINT CHR$(27);"G";
30 LPRINT "This line is BOLDFACE printing."
40 LPRINT CHR$(27);"E";
50 LPRINT "This line is BOLDFACE and EMPHASIZED."
60 LPRINT CHR$(27);"H";
70 LPRINT "This line is EMPHASIZED printing."
80 LPRINT CHRS(27);"F";
90 LPRINT "This line is NORMAL printing."
Run this program. The results will look like this:
“rtaj i 5 1 i ne i 5 BULWFUCE pr-i nti ng .
This line is BOLDFACE and EMPHASIZED.
This line is EMPHASIZED printing.
1 'l-1 j, c; .I, j, r
I I...
3 :i Ei IN CJ I:;: lw l.“. 11) y” Ii. I”1 t I. l-1 q
-
-
Line 20 turns on boldface with (ES’C) “G” and line 30 prints a
line of text. In line 40 emphasized is turned on with (ESC) “E”.
Line 50 prints a line of text in boldface and emphasized. Line 60
then turns boldface off with (ESC) “H” so that line 70 can print
in emphasized only. Finally, line 80 turns emphasized off, so
your printer is set for normal printing.
Look closely at the different lines of printing. In the line of
boldface printing each character has been printed twice, and the
paper was moved up slightly the second time they were printed.
In emphasized printing, the characters are moved slightly to the
right the second time the printer prints. The second line combin-
ed both of these so that each character was printed 4 times.