FONTSY and FONTCODE 9/16/85 Banner Printing System (C) 1985 Merlin R. Null This Library should contain: FONTSY .COM Multiple font banner printer FONTSY .BAS MBASIC source for the above FONTSY .DOC This documentation CLARE .FNT A 54 character 70 column serifed font HERON .FNT A 95 character 50 column serifed font KIWI .FNT A boldface version of the above RAVEN .FNT A 56 character 65 column sans serif font GOTHIC .FNT The 77 character font from GOTHIC.COM DINGBAT .FNT A small collection of designs FONTCODE.COM Encodes or modifies fonts for FONTSY FONTCODE.BAS MBASIC source for the above FONTSY .CRC CRC and other stats for verification The compiled MBASIC programs should run on any 8080 or Z80 machine with at least a 52K TPA (59K CP/M), not counting the extra space taken from the TPA by an expanded CCP. On smaller systems, the source should be recompiled with BASCOM, otherwise the string space will run into the operating system and crash. BRUN.COM, the external runtime package, is not required. These programs were written because I needed better sign making programs for LOSCON, the annual Science Fiction convention of the Los Angeles Science Fantasy Society. Last year the only useable banner program I had was GOTHIC. I found the old public domain banner program much too crude for good signs and they are too light to be read across a large room. I also wanted to have several fonts on line. Inspiration came from BIGLET@.LQR a modified form of LETTERS.LQR by Daniel Lieberman. These were not programs but collections of banner letters in text format that were printed by concatenating the files into a giant banner file with PIP. The idea of having text files you can modify with your word processor was what I was looking for, but 200K of disk space per font was not the answer. Thank You, Daniel, for giving me the key idea for what has become the FONTSY banner programs. INSTALLATION Both FONTSY and FONTCODE are self installing. The only information you need for installation is the decimal values of your clear screen sequence. The programs look for the clear screen data file, CLS.DAT. If it is missing, the programs will go into the installation routine and you will see: CLS.DAT, the clear screen data file, not found. Please enter your clear screen sequence one byte at a time in Decimal numbers. End your entries with a to generate CLS.DAT Clear Screen character 1 If the installation was correct, you will see the screen clear and the program start. If the installation information scrolls off the screen, the installation failed. Erase CLS.DAT and try again. If you do not like the clear screen operation, just enter 10 (line feed) in place of the clear screen sequence request and repeat it for as many blank lines you would like in place of the clear screen. The clear screen installation will take up to 9 characters or blank lines. Any time you move the program to a new disk and forget to copy CLS.DAT the installation routine will run and ask you for the clear screen sequence again. If both FONTSY and FONTCODE are on the same disk, they will both use the same CLS.DAT file. Only one of them has to be installed. The installation is the same whether you use the compiled or interpreted versions. The fonts can be used as is, but you might want to use FONTCODE to change the defaults. If your printer has a graphic block, you can set that to the default. If you always print a certain font at 17 pitch, as I often do, you might want to change the column offset default. All the fonts included in this library, except GOTHIC.FNT are centered for 80 columns at 10 pitch. FONTSY The Multiple Font Banner Printer Five fonts are supplied for FONTSY in this library. They are: CLARE, HERON, KIWI, RAVEN and GOTHIC. CLARE is a 70 column serifed font with upper case only. It is probably the best looking of the fonts. HERON is a 50 column high, full character set, serifed font. KIWI is a similar, but boldfaced font. RAVEN is a 65 column sans serif font with upper case only. Most of the rest of the character set is included. GOTHIC is nothing more than the extracted font from GOTHIC.COM. I made only two minor changes to it. The GOTHIC font is large enough that it will not fit in 80 columns. I use 17 pitch and reduced linefeeds to make it work on the standard size tractor feed paper. It will print much faster with FONTSY as FONTSY will only use a single pass to print each line. GOTHIC.COM uses 3 passes to print an "O" followed by an "X" and finally an "*". I have also included a small set of designs in DINGBAT.FNT. You might try adding a new design to this "font". The best effect can be obtained with FONTSY by using solid graphic blocks available on most dot matrix printers or by downloading a block in place of one character. If this is not available or you have a letter quality printer, use the @ sign as the print character. All fonts are set to use the @ sign in the 1.0 release of FONTSY. This can be changed on the fly with FONTSY or changed permanently with FONTCODE. With FONTSY the data files are only about 6-8K for a full 95 character font. That is because there is not a full character or bit map of the font. The data only includes two bytes for each segment on a given row. First, what column to start printing and second, how many pixels in succession. If it is the last segment in a given row, the 8th bit is set high on the second byte to represent the carriage return, line feed. 3 other bytes in the font header give the default print character, default column to start printing and the default number of rows between large characters. Running FONTSY Fonts may be loaded in FONTSY from the CP/M command line by entering: FONTSY If no fontname is specified in the command tail, you will be prompted to enter the name of the font. The extension .FNT is not required. If you do not recall what fonts are available, just enter a drive name (A:) to get a list of fonts on that drive. A; will work fine also. At the next prompt you have two choices. You may enter your banner text followed by a to print your banner. Or a without any text input will take you to the menu to change default font parameters or fonts. The print screen with HERON.FNT loaded looks like this: FONTSY Version 1.0 9/15/85 (C) 1985 Merlin R. Null ---------------------------------------------------------------- Heron version 1.0 (C) 1985 Merlin R. Null Characters available in HERON are: space ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } tilde Enter to change font defaults, ^C to exit. Banner text ?_ Only the characters listed above the prompt are available for the particular font you are using. If a lower case letter is missing from the font, FONTSY will substitute the upper case letter. If any other character is not available, FONTSY will ignore your input for that character only. In the example above a full character set is available, so all printing characters may be used. If you enter , you will see the following menu: Set Font Defaults ------------------------------------------------ 1. Change Fonts is: HERON.FNT 2. Set margin is: 7 columns 3. Set print character is: 64 decimal 4. Set banner spacing is: 3 rows Enter banner text. Option or ? _ OPTION 1. Simply goes back to the initial screen to enter a new font. The initial screen would have been bypassed, if you loaded a font directly from CP/M. OPTION 2. Allows you to reset the amount of space under the banner. I hope that later there smaller size fonts will be available so that this option can be used to set for more than one line of text. OPTION 3. Allows you to change the print character. In the distribution fonts CLARE, HERON, RAVEN and GOTHIC, this is set to the @ sign. This is because the @ sign is the densest character of the standard set. You may change this to any other printing character by simply entering it at the option 3 prompt: Set Print Character" --------------------------------------------------------------- The single character used by FONTSY to print all large letters can be set to any printable character or to a printer character in the upper 128 characters. Just use a single keystroke to enter it or enter a minimum of two decimal numbers to use the ASCII value. Example: The Gemini-10X has a 6 by 6 graphic square with an ASCII decimal value of 239. Enter only for each large character to be printed with its own character. Character, decimal value or ? _ If you want to specify a character by its ASCII decimal number, it must be at least two characters long. Numbers over 255 will be rejected. OPTION 4. Allows you to set the number of rows between the large characters in the banner. Once this option is set the default value included with the font is lost. If you want the font default value back and forgot what the value was, you should reload the font with option 1. A at "Number of rows?" will set a default of three rows. Entering a without any selection at the option menu returns to the text entering screen. If you have a dot matrix printer with a download character set, you may want to change the @ sign to a solid block for darker banners. On the Gemini-10X the maximum size block of this type is 5 X 7 pins. For a slightly smoother character set in the banner, omit the corner dots in this block. If your printer does not have the download character set, check to see if there are graphics blocks accessed some other way. FONTCODE Do you want to modify a font, reset the font defaults on one of the distribution fonts or create your own? FONTCODE will let you change existing fonts, extend them to add missing characters or create your own from scratch. FONTCODE creates the compressed data files that FONTSY uses for printing banners. To generate a new font, you simply create a text file with your word processor in non document mode that is exactly like each large letter you want in a font. There will be some distortion of the letter on the screen. Normally a letter on screen should be made to appear too wide. The rows on a printer are usually more compressed. If you need a sample, use FONTCODE to extract a character from one of the standard fonts. Each file in a font must have the same main filename. They should only differ in the extension. For example: HERON.065 Contains the raw data for the large letter A. HERON.066 Contains the raw data for the large letter B. HERON.067 Contains the raw data for the large letter C. HERON.068 Contains the raw data for the large letter D. etc. The number in the extension is the decimal ASCII value of the large letter. You need not create all 95 possible characters for your font. A font could contain only one character and still be encoded by FONTCODE. You could even create a non alphabet "font" that would have something like an apple when you hit "A" and a bat when you hit "B" or any other block graphic image. These could be used to decorate a banner printed with one of the regular fonts. DINGBAT.FNT is an example of this type of "font". Running FONTCODE If you want to modify an existing encoded font, you can specify the font at the CP/M command line by entering: FONTCODE The extension is not required. You may also select an encoded font to modify at the main menu. If you have selected a font from CP/M, your font will be indicated by the menu. Otherwise it will look like this: FONTCODE Version 1.1 9/16/85 by Merlin R. Null Encodes or decodes font data files used with the FONTSY banner printer." The current font is: 1. Load an existing font (encoded) 2. Load a single font character (text) 3. Load a full set of font characters (text) 4. Open a new font 5. Unload a single character from the current font 6. Unload all of the current font to text files 7. Save the current font 8. Change font defaults 9. EXIT Option (1-9)? _ Option 1. Load an existing font (encoded). Will just load an encoded font, if you forgot to name it at the CP/M command line. Option 2. Load a single font character (text). This is how you bring in a modified character to a previously encoded font or add a new character. After selecting this option, characters are added to the font by entering a single keystroke followed by . Option 3. Load a full set of font characters (text). This will create an encoded font from scratch. You will be prompted for, font name title, print character (the default character to print each pixel), margin (offset to center the banner) and number of rows between each large character. FONTCODE will then look for all source files for the font you have named. These files must have exactly the same filename as your output font. They will differ only in the extension. The source files have numeric extension and the output file should have the extension .FNT. You can specify the extension of the encoded font to be something other than FNT, but to use this font with FONTSY, you would have to give the extension to load it. It takes quite a while to encode a full font. FONTCODE would have to read in 95 files. Disk access is what takes the time. Option 4. Open a new font. This just sets up the fontname, title and defaults so that font source files may be read in one at a time with function 2. Do not open a new font if all you want to do is modify an existing font. This option is just for generating encoded fonts from scratch. Option 3 does not require this option. Option 5. Unload a single character from the current font. This will recreate a source (text) file for single character. Use this if you want to modify only a few characters. Try this on one of the fonts in this library to see the structure of the source files. Option 6. Unload all of the current font to text files. If you want to do extensive modification of a font, or use an existing font as a framework for generating a new one, you can recreate the source for an entire font at one time. Be sure you have lots of disk space available. This will generate from 100K to over 200K for a large font. The source files for the font HERON take up 196K with a 2K block size on my system. If you have 1K blocks, This number will be reduced a fair amount. Option 7. Save the current font. If you forget to save a modified font, you will be prompted to do so before you exit or load a new font. 8. Change font defaults. Use this option to change the title or any of the font default values on previously encoded fonts. If you have a system that is limited to 64 directory entries and want to encode a font with a large number of characters you will have to start the font with what will fit in your directory, leaving room for the output font and then add the rest of the large characters to the font one at a time. Font Structure The encoded font contains a header with five records containing the title and copyright notice for the font, an optional comment or subtitle record, plus the font default values: Print character, margin value and rows between banner characters. This is followed by one record for each character. Within each field blank lines are represented by the single byte FF hex. A segment of pixels to print is defined by two bytes. The first giving the row to print (with an offset of decimal 32), followed by the number of pixels to print (also with an offset of 32 decimal). If this segment is the final one in a row, the 8th bit is set on the number of pixels byte. Example: @@@@@@@@@@ @@@@@@ ^ ^ column 16 column 35 This would be encoded as: 30h 2Ah 43h A6h. These four bytes replace 41 bytes of spaces and @ signs, the carriage return and line feed. The final byte in the record is followed by 0Dh 0Ah as the record delimiter. The reason for the 32 offset is to avoid MBASIC's tab expansion of CHR$(9). MBASIC tries to convert this to spaces. LEGAL NOTICE FONTSY, FONTCODE, this documentation and all fonts except GOTHIC.FNT are NOT "Public Domain." Copyright on each is held by the author: Merlin R. Null P. O. Box 9422 N. Hollywood, CA 91609 (818) 762-1429 Permission is given only for private, nonprofit use of FONTSY. Feel free to make copies of the programs for your own use or for your friends. However, they may NOT be sold or included with any collection of programs for sale or used as an inducement to buy another product or program without the written permission of the author. Permission is also given for nonprofit computer clubs to include this program in distribution disks, provided total charges for the entire disk of programs, copying and shipping do not exceed $20.00. My vote of thanks goes to those clubs that have kept their charges under $10.00. Portions of the compiled programs FONTSY.COM and FONTCODE.COM are COPYRIGHTED BY MICROSOFT, 1981 MBASIC, BASCOM and BRUN are Trademarks of Microsoft Corporation CP/M is a registered trademark of Digital Research, Inc.