1 /*	xfont.h	1.1	87/02/05
2  *
3  * This file defines the structure that lives at the beginning of the
4  * "strike" format font file - the font format used for the X window system.
5  * The strike bitmap has the following structure.  Characters are layed
6  * out logically right next to each other in consecutive bits in the bitmap.
7  * The "leftArray" contains the bit offset of the character in the stream
8  * of bits.  A sample bitmap and resulting offsets are shown below:
9  *
10  * leftArray:	0     6     12   17    23        33   38    44   49  53   58
11  *		|     |     |    |     |         |    |     |    |   |    |
12  * start:	..@...@@@@...@@@.@@@@...@@...@@..@@@@..@@@@.@..@.@@@.@@@@. . .
13  * each line	.@.@..@...@.@.....@..@.@..@.@..@.@....@.....@..@..@....@..
14  * continues	@...@.@@@@..@.....@..@.@...@...@.@@@..@.@@@.@@@@..@....@... . .
15  * at the next	@@@@@.@...@.@.....@..@..@@...@@..@....@...@.@..@..@..@.@..
16  * short after	@...@.@@@@...@@@.@@@@.....@.@....@.....@@@@.@..@.@@@.@.@.. . .
17  * the last line...........................@..............@...........@...
18  */
19 struct FontData {
20 	int	bitmapPtr;	/* offset to strike bitmap in the file */
21 	short	bmWidth;	/* width of the bitmap (in pixels) */
22 	short	bmHeight;	/* bitmap height (pixels) */
23 	short	bitsPerPixel;	/* for color? */
24 	short	firstChar;	/* first character in the font (usually 0) */
25 	short	lastChar;	/* index of last character (usually 127) */
26 	short	leftArray;	/* offset in file to array of char offsets */
27 	short	waste;
28 	short	baseline;	/* offset from top to baseline (or zero) */
29 	short	spaceIndex;	/* the space character (always 32?) */
30 	short	fixedWidth;	/* the width of each character or zero */
31 };
32