home *** CD-ROM | disk | FTP | other *** search
- /* lemfont.c - routines to create and access binary level strike fonts
- *
- * copywrite (c) 1985, by Alan W. Paeth. All rights reserved
- *
- * Programmed by Alan Paeth, University of Waterloo, February, 1984
- *
- * NOTE: these fonts began life as 16-bit integers, with opposite byte-
- * order conventions of the VAX. This explains the appearance of short
- * integers, and size counts done in terms of shorts.
- *
- * Also, fonts are represented as a pointer to a contiguous, variable-
- * length structure. Because the actual bitmap is the only data part
- * which varies from font to font, its declaration is ultimate in the
- * structure declaration. FONTHEADERSIZE is the short word offset to it.
- *
- * patched by Alan Paeth, May 1985, to deal with null print strings
- */
-
- /* MAX WIDTH */
-
- #define LEFT 0
- #define RIGHT screenw
- #define TOP screenh
- #define BOTTOM 0
-
- #define MAXWIDTH 1024
-
- /* BFont structure - returned by BFontload() */
-
- typedef struct BFont_type
- {
- short ascent;
- short descent;
- short mwidth;
- short rasterx; /* strike scan line length expressed in short ints */
- short widths[257]; /* 257 boundaries between a strike of 256 chars */
- short glyphs[1]; /* var len glyphs starts after FONTHEADSIZE shorts */
- } *BFont;
-
- BFont fontload();
-
- /* offset to beginning of the glyphs */
-
- #define FONTHEADERSIZE 261
-
-
- extern BFont bfont[];
-