7
* n6.c -- width functions, sizes and fonts
39
if (i >= t.tfont.nchars) /* not on the font */
40
k = t.Char; /* really ought to check properly */
42
k = t.tfont.wp[i].wid * t.Char;
53
Tchar n_setabs(void) /* set absolute char from \N'...' */
54
{ /* for now, a no-op */
62
if ((k = i - '0') >= 0 && k <= nfonts && k < smnt)
64
for (k = 0; fontlab[k] != i; k++)
75
setfbits(chbits, font);
76
sps = width(' ' | chbits);
85
if (isdigit(i)) { /* \sd or \sdd */
89
else if (i <= 3 && (ch=getch()) && isdigit(cbits(ch))) { /* \sdd */
92
} else if (i == '(') { /* \s(dd */
95
} else if (i == '+' || i == '-') { /* \s+, \s- */
97
if (isdigit(j)) { /* \s+d, \s-d */
99
} else if (j == '(') { /* \s+(dd, \s-(dd */
107
Tchar n_setht(void) /* set character height from \H'...' */
117
Tchar n_setslant(void) /* set slant from \S'...' */
136
void n_setfont(int a)
144
if (!i || i == 'P') {
148
if (i == 'S' || i == '0')
150
if ((j = findft(i)) == -1)
164
int savhp, savapts, savapts1, savfont, savfont1, savpts, savpts1;
166
base = numtabp[ST].val = numtabp[ST].val = wid = numtabp[CT].val = 0;
167
if (ismot(i = getch()))
170
savhp = numtabp[HP].val;
179
while (cbits(i = getch()) != delim && !nlflg) {
182
numtabp[HP].val += k;
184
emsz = (INCH * pts + 36) / 72;
185
} else if (isvmot(i)) {
193
if (base < numtabp[SB].val)
194
numtabp[SB].val = base;
195
if ((k = base + emsz) > numtabp[ST].val)
198
setn1(wid, 0, (Tchar) 0);
199
numtabp[HP].val = savhp;
232
getch(); /*eat delim*/
236
i = makem(quant(n, j));
285
if ((i = cbits(getch()) - '0') < 0 || i > nfonts)
287
if (skip() || !(j = getrq()))
300
if (skip() || !(i = getrq()) || (j = findft(i)) == -1) {
328
dfact = INCH; /*default scaling is points!*/
335
i = VERT; /* was VERT */
345
/* stores \x'...' into
346
/* two successive Tchars.
347
/* the first contains HX, the second the value,
348
/* encoded as a vertical motion.
349
/* decoding is done in n2.c by pchar().
355
i = quant(atoi0(), VERT);
359
*pbp++ = MOT | VMOT | i;
361
*pbp++ = MOT | VMOT | NMOT | -i;