1 /* rst.h 1.2 (Berkeley) 83/10/09 2 * 3 * Definitions for imagen RST files. 4 */ 5 6 #define FMARK 8 /* number of bytes in the filemark */ 7 #define RES 240 /* number of dots/inch on imagen */ 8 #define FIX (1.0 / (1 << 20)) /* points per fix */ 9 #define POINT (1.0 / 72.27) /* inches per point */ 10 #define FIXIN (POINT * FIX) /* inches per fix */ 11 #define FIXPIX (FIXIN * RES) /* pixels per fix */ 12 #define DIRSIZ 128 /* max size of a glyph directory */ 13 14 15 char filemark[FMARK]; /* string to test beginning of file */ 16 17 typedef struct { /* glyph directory entry */ 18 short g_height; /* height (pixels) of glyph */ 19 short g_width; /* width of glyph */ 20 short g_up; /* distance from top to reference point */ 21 short g_left; /* distance from left to reference point */ 22 int g_pwidth; /* printing width of character (troff width) */ 23 int g_bitp; /* pointer to raster data (index to file) */ 24 } glyph_dir; 25 26 typedef struct { /* preamble information entries */ 27 short p_size; /* size of preamble (not including this) */ 28 char p_version; /* rst format version number (hopefully 0) */ 29 int p_glyph; /* pointer to glyph directory */ 30 short p_first; /* first glyph in directory */ 31 short p_last; /* last glyph in directory */ 32 int p_mag; /* magnification (in 1/1000ths) */ 33 int p_desiz; /* design size (in FIX units) */ 34 int p_linesp; /* spacing 'tween lines (FIX) */ 35 int p_wordsp; /* word spacing (FIX) = troff's spacewidth */ 36 short p_rot; /* rotation (degrees) */ 37 char p_cadv; /* character advance direction (0,1,2,3) = 0 */ 38 char p_ladv; /* line advance direction (0,1,2,3) = 1 */ 39 int p_id; /* identifying mark */ 40 short p_res; /* resolution of font (pixels/inch) = 240 */ 41 } preamble; 42