1*15194Sslatteng /* rst.h 1.2 (Berkeley) 83/10/09 214679Sslatteng * 314679Sslatteng * Definitions for imagen RST files. 414679Sslatteng */ 514679Sslatteng 614679Sslatteng #define FMARK 8 /* number of bytes in the filemark */ 714679Sslatteng #define RES 240 /* number of dots/inch on imagen */ 814679Sslatteng #define FIX (1.0 / (1 << 20)) /* points per fix */ 914679Sslatteng #define POINT (1.0 / 72.27) /* inches per point */ 1014679Sslatteng #define FIXIN (POINT * FIX) /* inches per fix */ 1114679Sslatteng #define FIXPIX (FIXIN * RES) /* pixels per fix */ 12*15194Sslatteng #define DIRSIZ 128 /* max size of a glyph directory */ 1314679Sslatteng 1414679Sslatteng 1514679Sslatteng char filemark[FMARK]; /* string to test beginning of file */ 1614679Sslatteng 1714679Sslatteng typedef struct { /* glyph directory entry */ 1814679Sslatteng short g_height; /* height (pixels) of glyph */ 1914679Sslatteng short g_width; /* width of glyph */ 2014679Sslatteng short g_up; /* distance from top to reference point */ 2114679Sslatteng short g_left; /* distance from left to reference point */ 2214679Sslatteng int g_pwidth; /* printing width of character (troff width) */ 2314679Sslatteng int g_bitp; /* pointer to raster data (index to file) */ 2414679Sslatteng } glyph_dir; 2514679Sslatteng 2614679Sslatteng typedef struct { /* preamble information entries */ 2714679Sslatteng short p_size; /* size of preamble (not including this) */ 2814679Sslatteng char p_version; /* rst format version number (hopefully 0) */ 2914679Sslatteng int p_glyph; /* pointer to glyph directory */ 3014679Sslatteng short p_first; /* first glyph in directory */ 3114679Sslatteng short p_last; /* last glyph in directory */ 3214679Sslatteng int p_mag; /* magnification (in 1/1000ths) */ 3314679Sslatteng int p_desiz; /* design size (in FIX units) */ 3414679Sslatteng int p_linesp; /* spacing 'tween lines (FIX) */ 3514679Sslatteng int p_wordsp; /* word spacing (FIX) = troff's spacewidth */ 3614679Sslatteng short p_rot; /* rotation (degrees) */ 3714679Sslatteng char p_cadv; /* character advance direction (0,1,2,3) = 0 */ 3814679Sslatteng char p_ladv; /* line advance direction (0,1,2,3) = 1 */ 3914679Sslatteng int p_id; /* identifying mark */ 4014679Sslatteng short p_res; /* resolution of font (pixels/inch) = 240 */ 4114679Sslatteng } preamble; 42