Carolyn's Corner - August, 1991

There has been some discussion on the BBS 8-bit C-nets about generating custom fonts and characters for printers with the ability to download them. Since that's a special interest of mine as well, I decided to write about my experiences with the Star NX-1000 Rainbow.

The NX-1000 series printers have the ability to print both draft characters and NLQ (Near-Letter Quality) characters. In addition, you can create new characters and symbols which can be downloaded and printed interchangeably with the built-in fonts.

Designing the dot data for new characters with paper and pencil is very tedious and time-consuming. One could use graph paper (or draw the required matrix of squares), pencil in the required dots, translate this into binary data, and finally send the data for each character to the printer, using the correct preliminary codes. But who would want to?

Appendix C of the NX-1000 manual lists an MS-BASIC program to enable you to do your designing on the computer screen, and then automatically download the resultant characters. It also enables you to maintain disk files of character data for future use.

Unfortunately, this program does not translate readily into Atari BASIC. As written, it also requires more memory than is available for a BASIC program with an 8-bit Atari (any model). Despite the huge amount of memory required, the program also lacks many desirable features of a full-fledged font-generating program.

Even with all these problems, I was determined to design a script font for my NX-1000. Loading up my BASIC XE cartridge, including the BASIC.OSS file, and using EXTENDed mode, I set my sights on writing a new character generator for use with the 8-bit Atari. Some of the MS-BASIC seemed very similar to BASIC XE, but I soon found that the IBM computer's X and Y coordinates are the reverse of the Atari's, not to mention that the 80-column screen of the PC displays more than twice the number of characters than are shown on our 40-column screens.

Many hours (read "weeks") later, after typing up what I thought might sorta kinda run on my 130XE, I was devastated to find that all 128K was used up even before the dimensioning of the essential arrays was completed, never mind actually RUNning the program! After much trial and error, I finally succeeded in streamlining the code to fit the available memory, worked out the bugs, and eventually even added many extra features.

The resultant program, together with my script font (which took about as long to design as it did to write the program), is now in MFACC's library. The ARCed program and font (NXCHRGEN.ARC) is also available from the ATARIAN DOMAIN BBS in Orlando. Documentation is included.

Requirements for the program are a minimum of 128K memory and the BASIC XE language cartridge. (I would have written the program in the public-domain Turbo-BASIC, except for the memory requirement.)

f you lack these prerequisites, you can still use my script font with an NX-1000. I have incorporated into the program a "printing to disk" feature that results in a file (NLQSCRPT.PRN) that can be copied from DOS directly to the printer (P:). The printer will then print all text in the new font until it is turned off. Sending the code ESC % 0 (no spaces) will switch to the built-in ROM font, and ESC % 1 will switch back to the downloaded font.

If you check the lights on your printer panel, you will note that this file automatically sets Italics, so if you change to the ROM font, you will probably want to switch that off as well. You can either use the code ESC 5 or use the printer's pushbuttons. If you resume the script font and want to reinstate Italics, the code is ESC 4.

An alternative to copying the PRN file from DOS is even more convenient. From AtariWriter Plus, LOAD the file NLQSCRPT.PRN. Then while still on the menu screen, hit [CTRL-S]. When you are prompted for a file, type "P:" (without the quotes). When asked, "Replace existing file?", answer "Y". Leave the printer on while you LOAD or CREATE your document. When you PRINT your document, the downloaded font will be used. To change to the ROM font from within the document, type [CTRL-O] 27 % 0 (no spaces). Use [CTRL-O] 27 [CTRL-O] 53 to cancel the Italics. To change back to the downloaded font, type [CTRL-O] 27 % 1 and use [CTRL-O] 27 [CTRL-O] 52 to reinstate Italics.

If you have already LOADed or CREATEd your document and then want to print it with a downloaded font, just SAVE the text file, follow the above instructions for sending the new font to the printer, then reLOAD the document and PRINT it.

You may find that sometimes you only want an extra character or two, not an entire new font. If you are lucky enough to own BASIC XE, this is no problem, because the character generator program copies the resident font into RAM and only replaces the characters for which you have designed a new shape. For instance, you might replace the back slash with a copyright symbol. Do you need a check mark or a degrees symbol? Design these to replace other little-used characters.

Have fun, and please let me know whether my program is useful to you. And I would love to see your new masterpiece character sets!

See you next month.


Return to Articles index