|
|
1.1 root 1: /*
2: *
3: * Characteristics of a font - for postprocessors. Differs some from the troff
4: * version.
5: *
6: */
7:
8: #define MAXCH 512
9: #define MAXFONTS 99
10:
11: /*
12: *
13: * State of a table entry in fonts[].
14: *
15: */
16:
17: #define NEWFONT 0
18: #define RELEASED 1
19: #define INMEMORY 2
20:
21: /*
22: *
23: * Flags - for setting bits in a font's flag field.
24: *
25: */
26:
27: #define USED 1
28: #define NAMED 2
29:
30: #define skipline(f) while ( getc(f) != '\n' )
31:
32: /*
33: *
34: * Data about each character on a font. Omitted the ascender/descender field.
35: * An unsigned char is good enough for the code field on PostScript printers.
36: *
37: */
38:
39: typedef struct {
40: short num; /* 0 means not on this font */
41: unsigned char wid; /* width */
42: unsigned char code; /* code for actual device. */
43: } Chwid;
44:
45: /*
46: *
47: * Font header - one for each available position.
48: *
49: */
50:
51: typedef struct {
52: char *path; /* where it came from */
53: char *name; /* as known to troff */
54: char *fontname; /* real name (e.g. Times-Roman) */
55: char state; /* NEWFONT, RELEASED, or INMEMORY */
56: char flags; /* for now just USED and NAMED */
57: char mounted; /* mounted on this many positions */
58: char specfont; /* 1 == special font */
59: short nchars; /* number of width entries for this font */
60: Chwid *wp; /* widths, etc., of the real characters */
61: } TrFont;
62:
63: extern TrFont *mount[];
64: /*
65: *
66: * Non-integer functions.
67: *
68: */
69:
70: extern char *chname();
71: extern char *strsave();
72: extern char *allocate();
73:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.