Classic Computer Magazine Archive ANTIC VOL. 7, NO. 3 / JULY 1988


TOP BANNER!

Ultimate banner maker even uses Print Shop fonts

By Jacob Donham and Lee Brilliant, M.D.


Top Banner is a banner printing program that's loaded with features but easy to handle. It can even use fonts from Broderbund's Print Shop software as well as standard Atari 8 X 8 fonts. This BASIC program works on 8-bit Atari computers with 48K memory and disk drive.

Top Banner easily produces a tremendous variety of horizontal banners or vertical streamers on just about any Epson-compatible dot-matrix or letter quality printer. You can control the height (up to eight inches) and width of each individual letter, as well as choosing the character that each letter is to be printed with. You can even use fonts from Broderbund's Print Shop software as well as standard 8x8 Atari fonts.

GETTING STARTED

Type in Listing 1, TBANNER.BAS, check it with TYPO II and SAVE a copy to disk before you RUN it.

Control the pointer on any menu with the up and down [ARROW] keys. You don't need to hold down the [CONTROL] key. Press [RETURN] to select an item or [ESC] to go to the previous menu.

The main menu choices are as follows:

EDIT MESSAGE takes you to an editing window so you can type the text of the banner. You can re-edit a message without retyping the whole thing. To erase the whole message, go to Edit and press [RETURN] without moving the cusor. NOTE: Trying to shffl from a standard 8x8 font to a special Print Shop font will erase your message.

CHANGE PARAMETERS brings up another menu where you can change INDIVIDUAL or OVERALL parametes, or use EFFECTS. Selecting INDIVIDUAL takes you to a window where you move the cusor with the left and right [ARROW] keys. Press [RETURN] to enter your changes in foreground, background, height and width of each character. The foreground and background values are the ASCII codes that will be sent to your printer. The numbers that determine the height and width of each "printed pixel" must be between 1 and 10. OVERALL lets you change the parameters of all the characters at once.

There are also four special effects:

RESPECTIVE FOREGROUND/BACKGROUND automatically sets each character to be printed equal to the ATASCII value of the overall letter. For example, if you had a banner that said "Hi", the "H" would be made up of little H characters, the "i" of i characters.

SHRINKING/GROWING makes the sizes of letters increase or decrease from left to right.

LOAD CHARACTER SET is where you enter the filename of the font you want. When you decide to print your banner, you'll be notified if you haven't yet typed a message or if your printer is disconnected. If an error message pops up, press any key to return to the main menu.

Each character has a different density when printed on paper. You can use this to your advantage. For instance, a letter made of periods will be much lighter than one made of asterisks. Interesting fade-ins and fade-outs can be produced by clever use of the foreground. You can also create small capitals by changing the heights and widths of some of the characters. Many of Top Banner's features work well together, while other combinations produce less-satisfactory results. By all means, experiment.

ABOUT THE PROGRAM

Top Banner uses quasi-pull-down menus. I did this the hard way, by PRINTing each menu separately. However, I'm working on a system that will create menus from DATA statements, requiring much less code.

Line 1010 lets you set up the program for your own printer. RESET$ contains the printer reset command which re-initializes all printer settings to the power-up defaults. It also contains the commands setting the printer's line feed length to 1/72 inches. MARGIN$ contains the command to set the printer's left margin (see example in line 3050). SMALL$ contains the command which sets the print pitch to 17 characters per inch.

PRINT SHOP FONTS

Top Banner is unusual because it uses not only standard 8 x 8 Atari fonts, but fonts that are compatible with Broderbund's Print Shop software as well. On Print Shop's menu screens, those nine fonts have names like Alexia or RSVP, but on the disk their filenames are simply F0 to F8.

Unlike DOS files, Print Shop fonts are only stored in contiguous sector blocks. So they can't be scattered all over the sector map like DOS files. If you want to modify a font using Print Shop Companion's font editor, you can only shrink it--you can't expand it. The Companion's fonts use the flename FO. plus the title and they also have different filename structures and file sizes.

The font directory starts on sector 362 and each directory entry occupies 32 bytes. (DOS directories start at sector 361, and filenames occupy only 16 bytes.) Bytes 17 and 18 of a Print Shop font filename contain the starting sector, while bytes 25 and 26 hold the file size.

Each file starts with four tables of 59 bytes, each byte corresponding to an ASCII character from 32 to 91--from space to Z. The @ is not used and has no values in the tables. The first table contains the width of each character in columns because Print Shop fonts are proportional, unlike fixed 8x8 fonts. The second table contains the height in rows, and the last two tables contain the address in RAM where each character's shape starts as it is loaded.

The characters in the Print Shop memory map start in RAM at $60EC (24812 decimal). The rest of the file contains the the font data itself. Companion files have an additional 12-byte header at the beginning containing, among other things, the index line settings for the editor.

The largest that a Print Shop font character can be is 48 columns by 38 rows (228 bytes). So 58 characters at 228 bytes apiece comes out to 13,224 bytes. Unfortunately, there's not enough free RAM, and font length is limited to only 11K. Luckily, even the largest existing fonts occupy only a few kilobytes. Therefore you should be able to use the Print Shop Editor to create two fonts and link them into one long file. One font will have upper case and the other adds lower case and graphics. Print Shop can't recognize the extra material, but Top Banner can.

Atari 8 x 8 fonts are only 1K each and are compatible with the standard Atari character set. They can be created with editor programs such as UltraFont (Antic, August 1986). These fonts need a .FNT extender to be accepted by Top Banner.

ADVANCED TECHNIQUES

When you use "Change Overall Parameters," only enough members of the storage array are changed to accomodate the length of the message. If you re-edit and lengthen the message, you must re-do the Change routine.

Be careful when using Respective Foreground and Background with characters other than standard ASCII. While your computer understands ATASCII, your printer doesn't--a CHR$(12) would not be a small square but a multipage form feed.

While 8 x 8 fonts are fixed in size, Print Shop fonts vary from font to font--and between characters within a font. When printing Print Shop fonts, the height (or width in verical mode) will be scaled down to fit the page according to the largest character in the set. Otherwise a size 10 Balloon character would be about three pages wide.

Top Banner runs much faster than Print Shop, even when using the same fonts. That's because Top Banner has a different approach to printing. Print Shop first maps each letter into RAM, then converts it to graphics data to send to the printer. But Top Banner simply prints dots as solid rectangular text, instead of solid rectangular graphics like Print Shop.

A whole line of text occupies only 80 bytes (at 10 characters per inch), but a whole line of graphics could consume up to 2,000 bytes. Furthermore, printing graphics is much slower than printing text. So Top Banner represents each pixel in a column by either "blank" strings or as "pixel" strings which are then linked to form a print line. Banner height is altered by changing the length of these two strings, while width is controlled by how many times you print the line.

The slowest part is the logic required to print the letters sideways, so to speed things up these subroutines are located between at lines 100-400.

(Talk about an embarrassment of riches! Antic hasn't printed a banner-making program since the highly popular Bannertizer (December 1984) because we didn't get another submission that did the job better. But now we suddenly had two!

From Jacob Donham, author of the ambitious MegAnimator in the February 1988 Antic, we accepted a powerful banner program controlled via easy-to-use pull-down menu windows. Then a few weeks later, well-known 8-bit programmer Lee Brilliant sent in his own banner program that did just about everything Donham's program did--plus accepting Print Shop fonts. When we asked Dr. Brilliant if we could add his Print Shop module to Donham's program, he generously offered to combine the best of both programs.ŅANTIC ED)

Listing1:TBANNER.BAS Download

Listing2:ARCHAIC.FNT Download

Listing3:BALOON.FNT Download

Listing4:BROADWAY.FNT Download

Listing5:CASUALGT.FNT Download

Listing6:CURSIVE.FNT Download

Listing7:FANCY.FNT Download

Listing8:FAT.FNT Download