[comp.text] AT&T DWB2.0 question

brown@vidiot.UUCP (Vidiot) (12/17/89)

This is a quick and simple question:

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.

If this is really true, then I suppose I can play games by shifting fonts
in and out as required.
-- 
                harvard\     att!nicmad\
Vidiot            ucbvax!uwvax..........!astroatc!vidiot!brown
                rutgers/  decvax!nicmad/
        ARPA/INTERNET: <@spool.cs.wisc.edu,@astroatc:brown@vidiot>

kg@elan.elan.com (Ken Greer) (12/18/89)

From article <323@vidiot.UUCP>, by brown@vidiot.UUCP (Vidiot):
> 
> This is a quick and simple question:
> 
> 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.
> 
> If this is really true, then I suppose I can play games by shifting fonts
> in and out as required.

The font mount table takes up a fair amount of space, so on the
286, it is likely that Microport lowered the font mount table
to say 10.  Not an inherent limitation of DWB, though.
Note... Watch out you don't stomp on the Special font (s).  Try...

		troff -Tzzz < /dev/null

where zzz is your printer type, and it will print the mounted fonts.
Don't mount on position S or troff won't work.

Ken Greer  Elan Computer Group, Inc. 888 Villa St. 3rd Floor Mt View CA 94041
Phone:     415-964-2200
Internet:  kg@elan.com
UUCP:      {ames,hplabs,uunet}!elan!kg

jlo@elan.elan.com (Jeff Lo) (12/20/89)

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.
>
>If this is really true, then I suppose I can play games by shifting fonts
>in and out as required.

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.  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.  Fonts are also
automatically temporarily mounted on position 0 if you call up a font
which is not mounted, but there are some bugs with this in certain cases
also.  You're probably best off only mounting on positions 1-8, leaving
position 9 for the special font.
-- 
Jeff Lo, Elan Computer Group, Inc.
jlo@elan.com, ..!{ames,uunet}!elan!jlo
888 Villa Street, Third Floor, Mountain View, CA 94041, 415-964-2200

henry%angel@Sun.COM (Henry McGilton -- Software Products) (12/20/89)

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.    |                           |
+-------------------+--------------------------+---------------------------+

brown@vidiot.UUCP (Vidiot) (12/22/89)

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.
<>
<>If this is really true, then I suppose I can play games by shifting fonts
<>in and out as required.
<
<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.  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.  Fonts are also
<automatically temporarily mounted on position 0 if you call up a font
<which is not mounted, but there are some bugs with this in certain cases
<also.  You're probably best off only mounting on positions 1-8, leaving
<position 9 for the special font.

By shifting fonts in and out I meant that maybe on a page I need Helvetica
Narrow and not Helvetica Bold Italic, so I would .fp 8 Hn.  Troff allows me
to do that just fine.  So, I don't understand the problem.

The DESC file that I have does (in PostScript output):

1(NewCenturySchlbk-Roman)xf 1 f
2(NewCenturySchlbk-Italic)xf 2 f
3(NewCenturySchlbk-Bold)xf 3 f
4(NewCenturySchlbk-BoldItalic)xf 4 f
5(Helvetica)xf 5 f
6(Helvetica-Bold)xf 6 f
7(Courier)xf 7 f
8(Courier-Bold)xf 8 f
9(Symbol)xf 9 f
10(DIThacks)xf 10 f

Actually, the Times-Roman fonts are in 1 -> 4, but I do a -F NewCentury.  In
any event, I start off by changing fonts seven and eight with Helvetica Italic
and Helvetica Bold Italic, which shows up as PostScript code after the page
starts.

As you can see, nine and ten are used for the special character fonts.  So,
since DWB2.0 only allows ten fonts, I will have to work within the first eight.
I will actually only change five -> eight, since one -> four contain my main
working fonts.
-- 
                harvard\     att!nicmad\
Vidiot            ucbvax!uwvax..........!astroatc!vidiot!brown
                rutgers/  decvax!nicmad/
        ARPA/INTERNET: <@spool.cs.wisc.edu,@astroatc:brown@vidiot>

brown@vidiot.UUCP (Vidiot) (12/22/89)

In article <129463@sun.Eng.Sun.COM> henry%angel@Sun.COM (Henry McGilton -- Software Products) writes:
<
<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.

I guess I won't ever attempt to go past 10 fonts, since I (not being in my
right mind :-) like to change fonts by number.  Why?  Portability.  Trying
to change fonts by name cause problems on troff cope I ship to other people
on the net.  Not all fonts have the same name on other systems.  If everyone
used Adobe Transcript, there wouldn't be a problem, but that isn't the case.

So using font numbers is a must.  I take care of the font name problem by a
file that gets loaded with the main troff file that contains the font loading
information.
-- 
                harvard\     att!nicmad\
Vidiot            ucbvax!uwvax..........!astroatc!vidiot!brown
                rutgers/  decvax!nicmad/
        ARPA/INTERNET: <@spool.cs.wisc.edu,@astroatc:brown@vidiot>