FONT ID EDITOR
by Charles F. Johnson
Maurice Molyneaux's Step 1 column this month is about GDOS, which stands for graphic device operating system, (although people have been known to call it other, less publishable names, as well). One of the purposes of GDOS is to let applications use multiple fonts for both screen and printer output. The scheme that GDOS uses to manage the fonts, however, is anything but "user friendly," and it puts a lot of the burden of font management squarely on the users' shoulders. Since Maurice has already explained the whole process very well, I'll refer you to his column for the down and dirty details.
As I was reading over a rough draft of Maurice's column, it occurred to me that there was really no way to easily change the ID number of a GDOS font. And as the column says, there are some occasions where you may need to do just that, since GDOS uses the font ID numbers to tell which fonts belong to the same "family" (e.g., Swiss, Dutch, typewriter, etc.). A GDOS font family may consist of several files, each representing a different point size. The only way GDOS knows which fonts belong to the same group is by their font ID numbers. The filenames are meaningless. All the point sizes of a font must have the same ID number or else GDOS cannot group them together.
With more public domain and commercial GDOS fonts appearing all the time, it's very possible to end up with two different fonts that have the same ID number. When these fonts are listed in the ASSIGN.SYS file, GDOS is unable to tell them apart, and you've got trouble. The problem is that the font IDs are contained within the font files, and the only way to change them is to use a program like Neocept's Fontz! or Brad Christie's public domain GEMFED.PRG. (If you're adventurous, you could also use a disk sector editor. Just remember that all values in GDOS font files are stored in 8088 "low/high" format.)
There are other problems related to font ID numbers too. Some GDOS applications expect the fonts to be loaded with their font IDs in ascending order. This is usually fine as long as you use the fonts and ASSIGN.SYS file supplied with the program. But if you ever need to add or delete fonts from the list, watch out! And to make things even more confusing, some programs cannot recognize fonts with ID numbers higher than 255.
Font ID Editor is a short, simple and easy-to-use utility program that lets you view and change the ID number of a GDOS font file. To use it, type in the ST BASIC listing accompanying this article (and check your typing with ST-Check on page 48), save the ST BASIC file, and then run it. (You don't need to type in the assembly language source-code listing. It is included for those readers interested in programming.) The BASIC program will create a file called ID__EDIT.PRG. You can now run Font ID Editor by double-clicking this file from the ST desktop.
Font ID Editor uses the GEM file selector to let you locate and choose a GDOS font to examine. When you select the file, the program displays its full pathname, the font name, point size and current ID number, and asks you to type in a new ID number. At this point, you can send the font information to your printer by typing the letter P (upper or lowercase) and hitting Return. This makes it simple to keep lists of fonts and their ID numbers—which is a very good idea if you have a lot of fonts.
If you wish to change the font ID, type in a number and hit Return, and Font ID Editor will write the new ID to the chosen file. Note that you can use any number from two to 32,767 for your font IDs, but there are a few conventions and restrictions. Again, be sure to read Step 1 for some tips on the best way to number your fonts. If you hit Return without typing anything, the ID number will not be changed. After each font, you will be asked if you wish to examine another font. This way you can quickly change the ID numbers of an entire font family.
I hope Font ID Editor makes it a little bit easier for you to find your way through the GDOS jungle!