Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!sun!angel!henry From: henry%angel@Sun.COM (Henry McGilton -- Software Products) Newsgroups: comp.text Subject: Re: AT&T DWB2.0 question Summary: ditroff with more than 10 fonts. Message-ID: <129463@sun.Eng.Sun.COM> Date: 20 Dec 89 02:00:53 GMT References: <323@vidiot.UUCP> <678@elan.elan.com> Sender: news@sun.Eng.Sun.COM Distribution: na Lines: 64 In article <678@elan.elan.com>, jlo@elan.elan.com (Jeff Lo) writes: * In article <323@vidiot.UUCP> brown@vidiot.UUCP (Vidiot) writes: | I currently have MicroPort's version of AT&T's | Documentor's Workbench 2.0. Is it true that | DWB is imited to the loading of 10 font | positions? I tried doing a .fp 11 and 12 (with | appropriate fonts names) and the PostScript | output showed that they both were assigned to | position #1. Not good. I changed them to 7 | and 8 and everything is just fine. * There are a few problems with doing this. The first is * that the stock DWB 2.0 troff code only allocates (as * global arrays) enough space for 10 mounted fonts. You * can actually mount more than 10 if you set up your DESC * font description file right, but the stock troff * doesn't do any bounds checking and ends up writing font * data all over the place. This leads to all sorts of fun. The following discussion assumes you have source code. You can change the constant called NFONT to enable ditroff to load more than 10 fonts. Then you can changed your DESC files and so on. You also need to recompile the makedev program. If you have TranScript, you also need to recompile psdit, and the TranScript release defines NFONT in its own header file as opposed to using a header file common to ditroff and makedev. And so on and so on. Then make sure that when you create your new DESC file with all those 30 or so groovy fonts, that you still leave the special fonts at the end of the list, because ditroff (last time I looked), marks all fonts after the first special font as special. * I also seem to remember something about problems trying * to select a font position greater than 9 with the \fN * construct, but I'm not as sure about this one. Yes. Here's the problem. The \fn construct only allows a single digit for n (0 - 9). If you try to be clever and type \f(nn where nn is a two digit number, ditroff takes this as the name of a font, not as a two digit font number. For example, if you type \f(16, ditroff won't see this as font position 16, but as a font whose name is `16'. You then get a complaint to the effect that there's no description file for 16.out. Now you might imagine that nobody in their right mind would call for fonts by number anyway, but, some of the macro packages save the current font number and then restore it in across sequences such as switching to italic, and across the bottom and top of page processing, and so on and so on. The macro packages (look in -ms for example) tend to have sequences such as \f(\n(PQ, and these don't work with font positions greater than 9. I believe Elan have fixed the \f(nn escape sequence. But to the best of my limited knowledge, DWB hasn't been fixed in this area. ............. Henry +-------------------+--------------------------+---------------------------+ | Henry McGilton | Timesharing was the mass | | | Sun Microsystems | psychosis of the 1970's, | arpa: hmcgilton@sun.com | | 2550 Garcia | induced by invalid | uucp: ...!sun!angel!henry | | Mountain View, CA | accounting methods. | | +-------------------+--------------------------+---------------------------+