|
|
1.1 ! root 1: /* ! 2: * Written by Eric C. Cooper, CMU ! 3: * ! 4: */ ! 5: /* $Header: pxl.h,v 10.5 86/02/01 15:45:03 tony Rel $ */ ! 6: ! 7: #define BITS_PER_LONG 32 ! 8: #define BITS_PER_SHORT 16 ! 9: #define BITS_PER_BYTE 8 ! 10: ! 11: #define BYTES_PER_LONG (BITS_PER_LONG/BITS_PER_BYTE) ! 12: #define BYTES_PER_SHORT (BITS_PER_SHORT/BITS_PER_BYTE) ! 13: ! 14: #define SHORTS_PER_LONG (BITS_PER_LONG/BITS_PER_SHORT) ! 15: ! 16: #define ROUNDUP(x,y) (((x)+(y)-1)/(y)) ! 17: ! 18: /* ! 19: * Raster ops. ! 20: */ ! 21: #define ROP_CLEAR 0 ! 22: #define ROP_ERASE 2 ! 23: #define ROP_COPYREV 3 ! 24: #define ROP_COPY 12 ! 25: #define ROP_PAINT 14 ! 26: #define ROP_FILL 15 ! 27: ! 28: /* ! 29: * Bitmap structure for raster ops. ! 30: */ ! 31: struct bitmap{ ! 32: short h, w; /* height and width in pixels */ ! 33: short bytes_wide; /* scan-line width in bytes */ ! 34: char *bits; /* pointer to the bits */ ! 35: }; ! 36: ! 37: #define MAXCHARS 128 /* make 256 for 8 bit characters */ ! 38: ! 39: /* ! 40: * Per-character information. ! 41: * There is one of these for each character in a font. ! 42: * All fields are filled in at font definition time, ! 43: * except for the bitmap, which is "faulted in" ! 44: * when the character is first referenced. ! 45: */ ! 46: struct glyph { ! 47: long addr; /* address of bitmap in PXL file */ ! 48: long dvi_adv; /* DVI units to move reference point */ ! 49: short x, y; /* x and y offset in pixels */ ! 50: struct bitmap bitmap; /* bitmap for character */ ! 51: short pxl_adv; /* pixels to move reference point */ ! 52: }; ! 53: ! 54: /* ! 55: * The layout of a font information block. ! 56: * There is one of these for every loaded font or ! 57: * magnification thereof. ! 58: * ! 59: * Also note the strange units. The design size is in 1/2^20 point ! 60: * units (also called micro-points), and the individual character widths ! 61: * are in the TFM file in 1/2^20 ems units, i.e. relative to the design size. ! 62: */ ! 63: ! 64: struct font { ! 65: struct font *next; /* link to next font info block */ ! 66: struct font *prev; /* link to previous font info block */ ! 67: int TeXnumber; /* font number (in DVI file) */ ! 68: int scale; /* scaled size in DVI units */ ! 69: int design; /* design size in DVI units */ ! 70: char *fontname; /* PXL file name */ ! 71: FILE *file; /* open PXL file or NULL */ ! 72: struct glyph glyph[MAXCHARS]; ! 73: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.