Version 1.1 Aug., l990. by David Lawyer In this directory you will find C Source code for font generators for some video display terminals (not monitors). They allow you to create your own characters of any shape and then put these characters into the terminal so that when you type you will see them on the CRT screen. This is useful for displaying foreign languages which do not use English (actually Latin) letters such as Russian, Greek, Japanese, etc. It may also be used to create fancy italics or special math. symbols (for example APL symbols used in the APL programming language). Such symbols must be no larger than the ordinary characters displayed on the terminal. If you have a personal computer, you probably don't have any terminal so you have no use for this software. Terminals usually run on multiuser operating systems such as Unix or Unix-like operating systems. In order to use this software you should be able to write a simple shell-script to download the softfont (a sample script is supplied) and be able to compile a C program. The VT200 series of terminals permit 8-bit characters so you can have 256 (00-FF hex) of them. Some terminals only allow 128 (00-7F hex) 7-bit characters to be downloaded. Unfortunately for us, many terminals don't permit one to download any characters at all. The code which is downloaded is often called "softfont". To create your own fonts you must first "draw" the characters ( something like the example of the large "A" character shown below) in a file using any convenient editor such as vi or Emacs. Of course someone else may have already done this for you. ...*... ..*.*.. This is an example of a character (A) which you might .*...*. "draw" in a file. It is really just a drawing of a bit *.....* map where the *'s might be ones and the dots zeros. You ******* can draw this rapidly if you start out with "blank" *.....* cells of all dots. You may define macros so that just pressing *.....* a key will draw a row or column of *'s. Another key may *.....* be programmed to replace a dot with a * (and conversely). *.....* Find out how to do this with your editor. *.....* ....... (Last 2 rows reserved for descenders.) ....... Then you run the font generator program (such as FontGenVT220) on this file and create a softfont file ready to download to the terminal. In some cases all you need to do then is to copy this softfont file to the terminal and your new font is installed. In most cases however, there are other things to do in order to install the softfont such as setting up the terminal in an appropriate way and assigning the new font to a certain font bank in the terminal. Thus in most cases you will need to write a shell script to install the font, one line of which will copy (or cat in Unix) the softfont to the terminal. An example script for VT220 terminals may be found in the FontVT200.doc file. PROBLEMS IN DOWNLOADING Many terminals can't download font at 9600 baud. There are 3 types of fixes for this problem: 1. Lower the baud rate. 2. Enable Xon/Xoff flow control (Doesn't always solve the problem on some inferior terminals). 3. Add null padding to your my_font file by using a flag such as -p 80 when generating the softfont. On a Wyse 99GT terminal it was necessary to use 80 nulls per line (-p 80). Another method of introducing delays which is not always a good one is to have the program which downloads the font contain delays. But if the terminals communicate with computers over a network, the network may accumulate data in packets and thus eliminate some of your delays (while adding other delays). The same sort of thing could happen when output data is buffered in the host computer. Both the Wyse 99GT and Wyse 60 CRT's flash erratically when font is being downloaded. At the end of this downloading you should see a message that the loading has been completed. Also the header lines from your pattern file should be visible on the CRT. If you don't see all of this, then something has likely gone wrong. Sometimes a second try will succeed. Otherwise you had better try adding more delay (or the like). INPUT PATTERN FILE FORMAT Look at a sample file (named ...pat) while reading this. The file begins with optional comment lines each starting with #. The next two lines are file-header lines for the entire file. The first gives the size of the character cells in the pattern file. For example: 12x7 cells. The second line should be an important comment which will be displayed on the CRT each time you download the font. Then comes thick-rows of Character matrices (* patterns). Each such thick-row is called a "band" and must be preceded by a horizontal separator-header line. These horizontal separator-header lines should contain the character numbers etc. but may contain anything (including a blank line). Each character matrix is separated from the adjacent one to its right (or left) by vertical "columns" of white space. Each such "column" may be wider than one space if desired. There must be exactly 8 character matrices (patterns) in each band (= thick-row). Since the minimum number of characters is eight, if you want to create less than eight you may readily do so by generating some blank characters and then deleting them from the softfont file. For loading just a few characters you will probably want to put the softfont directly into the shell script used to install them. In this case you will "echo" the softfont to the terminal rather than "cat" a file of softfont to the terminal. See the CONTENTS file for a list of the files in this directory and a one-line description of them. To see the command line options just run the GenFont... program with no arguments. You may want to look at the C source code for more details. Compile using the gcc compiler if possible since "dynamic arrays" are used in the source code. To report bugs or let me know about your possible improvements/additions send U.S. mail to me. I am losing my net access but may be able to post using someone else's account. David Lawyer, 909 S. El Molino Ave., Pasadena CA 91106.