|
|
1.1 root 1: /* Copyright (c) 1987 AT&T */
2: /* All Rights Reserved */
3:
4: /* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
5: /* The copyright notice above does not evidence any */
6: /* actual or intended publication of such source code. */
7:
8: #include <sccsid.h>
9: HVERSION(font, @(#)font.h 1.1.1.4 (5/10/87));
10:
11: /*
12: * <font.h> - Jerq font format
13: *
14: * given char c, Font *f, Fontchar *i, and Point p, one says
15: * i = f->info+c;
16: * bitblt(f->bits,Rect(i->x,i->top,(i+1)->x,i->bottom),
17: * b,Pt(p.x+left,p.y),fc);
18: * p.x += i->width;
19: *
20: */
21:
22: #ifndef FONT_H
23: #define FONT_H
24:
25: #define FONTWIDTH(font) ((int)(font.info[' '].width))
26: #define FONTHEIGHT(font) ((int)(font.height))
27:
28: typedef struct Fontchar
29: {
30: short x; /* left edge of bits */
31: unsigned char top; /* first non-zero scan-line */
32: unsigned char bottom; /* last non-zero scan-line */
33: char left; /* offset of baseline */
34: unsigned char width; /* width of baseline */
35: } Fontchar;
36:
37: typedef struct Font
38: {
39: short n; /* number of chars in font */
40: char height; /* height of bitmap */
41: char ascent; /* top of bitmap to baseline */
42: long unused; /* in case we think of more stuff */
43: Bitmap *bits; /* where the characters are */
44: Fontchar info[1]; /* n+1 character descriptors */
45: } Font;
46:
47: #define ISIZE(n) ((n+1)*sizeof(Fontchar))
48: #define FCHARSIZE 8
49: Font * getfont(); /* (fname) reads in a font file */
50: Font * infont(); /* (func) makes a font */
51: Font * fontsave(); /* (name,f) copy a font into the available list */
52: Font * fontrequest(); /* (name) request a font from the available list */
53: Font * fontavail(); /* (name) test if a font is available */
54:
55: #endif FONT_H
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.