carvalho@garnet.berkeley.edu (Marcio de Carvalho) (02/21/88)
I am using four different fonts in the same document. Three of them are the run-of-the-mill roman, italic and bold which are loaded in positions 1 2 and 3. I want to refer to the fourth font in a generic manner, in such way that I can print the document in different typesetters without having to do major editings in the document. I will alternate between a PostScript laser and an APS typesetter. Since, similar fonts have different designations in the two printers, if I use the escape sequence "\fxx" to change fonts, I have will to edit every occurrence of that string when I change printers. I tried to load the extra font in a preselected posi- tion with the troff command .fp 4 xx Troff gives an error message: "font xx is to big for position 4" Apparently (according to the local troff guru) ".fp" behaves differently from machine to machine. How do I assign symbolic names to fonts in the begin- ning of the document? Any suggestions?
wnp@dcs.UUCP (Wolf N. Paul) (02/22/88)
In article <7088@agate.BERKELEY.EDU> carvalho@garnet.berkeley.edu (Marcio de Carvalho) writes: > I tried to load the extra font in a preselected posi- > tion with the troff command > > .fp 4 xx > > > Troff gives an error message: > > "font xx is to big for position 4" > > I believe this has to do with the fact that TROFF expects font 4 to be its "SPECIAL" font, which is print to display most of the characters represented by escape sequences (i.e. \(bu, \(dg, and greek/maths characters). Apparently TROFF knows how many characters ought to be in that font and burps if that does not match reality. If that is so, mounting a font other than "S" in fp 4 is likely to give strange results, even if TROFF let you mount it. -- Wolf N. Paul Phone: (214) 306-9101 (h) (214) 404-8077 (w) 3387 Sam Rayburn Run UUCP: ihnp4!killer!{dcs, doulos}!wnp Carrollton, TX 75007 INTERNET: wnp@dcs.UUCP ESL: 62832882 Pat Robertson does NOT speak for all evangelical Christians--not for me, anyway!
kg@elan.UUCP (Ken Greer) (02/23/88)
In article <7088@agate.BERKELEY.EDU> carvalho@garnet.berkeley.edu (Marcio de Carvalho) writes: > I tried to load the extra font in a preselected position with > the troff command > .fp 4 xx > Troff gives an error message: > "font xx is to big for position 4" Your font xx is *longer* than font 4. That is, font xx has more characters than font 4. The space troff has allocated for 4 is too small to hold xx. This problem existed in older Troff's -- it's fixed in DWB 2.0. If you have DWB 2.0 source, look at "biggestfont" in your DESC file and make it as big as any font you have (or 255 if you feel like wasting memory.) If you don't have DWB 2.0, trying mounting xx at another position. -- Ken Greer Elan Computer Group, Inc. 415-322-2450 {ames,hplabs}!elan!kg
hapke@ccvaxa.UUCP (02/23/88)
If you want to assign symbolic names to troff fonts, you can use a troff string define IF you have device-independent troff. You will need to test the value of the .T string and define the string accordingly. At our site, we have a Dataproducts PostScript printer and an Imagen. I use this code to handle the different names for the Courier font: .\" Ef is example font (Courier), which is used in code displays. .\" If the string .T is 300, we are on the Imagen and Courier is L. .\" If the string .T is psc, we are on the Dataproducts and it is C. .if t .if '\*(.T'300' .ds Ef L .if t .if '\*(.T'psc' .ds Ef C .DS \f\*(Ef main(argv, argc) . . \fR .DE Remember that this works only for device-independent troff. Warren Hapke, Gould CSD-Urbana inhp4!uiucdcs!ccvaxa!hapke