7 * n6.c -- width functions, sizes and fonts
38 if (i >= t.tfont.nchars) /* not on the font */
39 k = t.Char; /* really ought to check properly */
41 k = t.tfont.wp[i].wid * t.Char;
52 Tchar n_setabs(void) /* set absolute char from \N'...' */
53 { /* for now, a no-op */
61 if ((k = i - '0') >= 0 && k <= nfonts && k < smnt)
63 for (k = 0; fontlab[k] != i; k++)
74 setfbits(chbits, font);
75 sps = width(' ' | chbits);
84 if (isdigit(i)) { /* \sd or \sdd */
88 else if (i <= 3 && (ch=getch()) && isdigit(cbits(ch))) { /* \sdd */
91 } else if (i == '(') { /* \s(dd */
94 } else if (i == '+' || i == '-') { /* \s+, \s- */
96 if (isdigit(j)) { /* \s+d, \s-d */
98 } else if (j == '(') { /* \s+(dd, \s-(dd */
106 Tchar n_setht(void) /* set character height from \H'...' */
116 Tchar n_setslant(void) /* set slant from \S'...' */
135 void n_setfont(int a)
143 if (!i || i == 'P') {
147 if (i == 'S' || i == '0')
149 if ((j = findft(i)) == -1)
163 int savhp, savapts, savapts1, savfont, savfont1, savpts, savpts1;
165 base = numtabp[ST].val = numtabp[ST].val = wid = numtabp[CT].val = 0;
166 if (ismot(i = getch()))
169 savhp = numtabp[HP].val;
178 while (cbits(i = getch()) != delim && !nlflg) {
181 numtabp[HP].val += k;
183 emsz = (INCH * pts + 36) / 72;
184 } else if (isvmot(i)) {
192 if (base < numtabp[SB].val)
193 numtabp[SB].val = base;
194 if ((k = base + emsz) > numtabp[ST].val)
197 setn1(wid, 0, (Tchar) 0);
198 numtabp[HP].val = savhp;
231 getch(); /*eat delim*/
235 i = makem(quant(n, j));
284 if ((i = cbits(getch()) - '0') < 0 || i > nfonts)
286 if (skip() || !(j = getrq()))
299 if (skip() || !(i = getrq()) || (j = findft(i)) == -1) {
327 dfact = INCH; /*default scaling is points!*/
334 i = VERT; /* was VERT */
344 /* stores \x'...' into
345 /* two successive Tchars.
346 /* the first contains HX, the second the value,
347 /* encoded as a vertical motion.
348 /* decoding is done in n2.c by pchar().
354 i = quant(atoi0(), VERT);
358 *pbp++ = MOT | VMOT | i;
360 *pbp++ = MOT | VMOT | NMOT | -i;