|
|
1.1 root 1: /*
2: * fonts.h
3: * Nroff/Troff.
4: * Font handling header.
5: */
6:
7: #define NFNAMES 100 /* max number of font names */
8: #define NWIDTH 256 /* number of width entries */
9:
10: /*
11: * The font table contains the user name and font index of each font.
12: */
13: typedef struct {
14: char f_name[2];
15: int f_font;
16: } FTB;
17:
18: /*
19: * A font width table defines the widths of characters in a font.
20: * The entries in f_width * f_psz * f_num / f_den should
21: * be the widths in troff units; e.g., if the f_width table values are
22: * in 300ths of an inch, then f_psz * f_num / f_den should be 12/5.
23: * fwtable.c knows how to write one of these for PCL,
24: * fwtableps.c knows how to write one of these for PostScript, and
25: * fonts.c/load_font knows how to read one; they had better all agree.
26: * fonts.c also defines the three default troff FWTABs.
27: * Many of the members could be chars.
28: */
29: typedef struct fwtab {
30: char *f_descr; /* descriptive name for font */
31: char *f_PSname; /* PostScript font name */
32: short f_flags; /* flag bits */
33: short f_fonttype; /* font type */
34: short f_orientation; /* portrait=0, landscape=1 */
35: short f_spacing; /* fixed=0, variable=1 */
36: short f_symset; /* symbol set */
37: short f_pitch; /* pitch */
38: short f_psz; /* point size (internal units) */
39: short f_style; /* upright=0, italic=1 */
40: short f_weight; /* stroke weight */
41: short f_face; /* typeface */
42: short f_num; /* width table numerator */
43: short f_den; /* width table denominator */
44: unsigned char f_width[NWIDTH]; /* width table */
45: } FWTAB;
46:
47: /* FWTAB f_flags bits */
48: #define F_PCL 1 /* PCL font width table */
49: #define F_PS 2 /* PostScript font width table */
50: #define F_USED 4 /* Font has been used */
51: #define F_FIXED 8 /* Font has fixed pointsize */
52:
53: /* Globals in fonts.c. */
54: extern FTB fontab[]; /* Font table */
55: extern FWTAB *fwptab[]; /* Font width table pointers */
56: extern int nfonts; /* Number of fonts */
57:
58: /* end of fonts.h */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.