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