[net.text] getting the wrong font in ti-troff

lee@rochester.UUCP (Lee Moore) (10/09/85)

I am having a problem with Typesetter Independent Troff.  It is set up
with a DESC file that describes 26 different fonts.  The problem comes
when I ask for font "B" and I get font "LB".  Looking at the intermediate
output of Troff, font "B" gets mapped into 18 which is the number for
"LB" rather than the correct number: 3.  When I ask for font 3 explicitly,
(like with a \f3) things work correctly.

Anybody have an clues?  Below is out DESC file:

# describe the 'newraven' press device
res 2540
hor 1
vert 1
unitwidth 5
paperwidth 21590
paperlength 27940
sizes  5 6 7 8 9 10 11 12 13 14 15 16 18 20 24 30 36 48 72 0
fonts 26  R I B X AR cR ER GR GI GB GX HR HI HB HX hR LR LB LO OE tR TR UR MR HP S
charset
 ff Fi Fl fi fl \- hy sl ua <- ap A: O: Ao a: o: ao u: c, um .. ri
 ga aa be ma ct po ps *! sc bu dg dd pp I! !! I? hc ud 14 12 *P is
 cs *S bc __ de if di an .= fm sr +- cm -+ tf a/ ci sq tr dm a+ a-
 ax ag ** rh lh bs bx <= != >= cf fa mo C# gr te sb !s ib sp !S ip
 cr nm !m es pt r2 R# ~~ bt cu lo == mu QE l< r> da -> al ~> co pd
 ~= io <> im :> h- || no mc st |- |= rg NE NW SW SE << >> ca -| 34
 r1 *A *B *C *D *E *F *G *Y *I *K *L *M *N *O *H *R *T *U *W *X *Q
 *Z *a *b *c *d *e *f *g *y *i ts *k *l *m *n *o *p *h *r *s *t *u
 *w *x *q *z ru ul br lt lb rt rb lk rk bv lf rf lc rc mi pl eq rn
 em or \| \^
-- 
TCP/IP:		lee@rochester.arpa
UUCP:		{seismo, allegra, decvax, cmcl2, topaz, harvard}!rochester!lee
XNS:		Lee Moore:CS:Univ Rochester
Phone:		+1 (716) 275-7747, -5671
Physical:	43 01' 40'' N, 77 37' 49'' W

-- 11 months 'till I drop off the face of the earth.

jeff@mcnc.UUCP (Jeffrey Copeland) (10/16/85)

>I am having a problem with Typesetter Independent Troff.  It is set up
>with a DESC file that describes 26 different fonts.  The problem comes
>when I ask for font "B" and I get font "LB".  Looking at the intermediate
>output of Troff, font "B" gets mapped into 18 which is the number for
>"LB" rather than the correct number: 3.  When I ask for font 3 explicitly,
>(like with a \f3) things work correctly.
>
>Anybody have an clues?  Below is out DESC file:
>
># describe the 'newraven' press device
>res 2540
	.
	.
	.
>fonts 26  R I B X AR cR ER GR GI GB GX HR HI HB HX hR LR LB LO OE tR TR UR MR HP S

The problem comes about when there are more than 16 fonts, 
because of the line:

	if ((k=i-'0') >= 0 && k <= nfonts && k < smnt )

(where "i" is contains the font request) in findft() of t6.c in
ditroff.  The routine confuses ".ft B" with ".ft 17".  (A corrollary of
this problem is the inability to say ".ft 10".)  You can either mount
fewer than 16 fonts at startup and rely on the .fp directive, or modify
findft() and casefp() to accept font positions greater than 10 and
check for the difference between font requests by name and number.