|
|
1.1 root 1: /*
2: * <font.h> - Jerq font format
3: *
4: * given char c, Font *f, Fontchar *i, and Point p, one says
5: * i = f->info+c;
6: * bitblt(f->bits,Rect(i->x,i->top,(i+1)->x,i->bottom),
7: * b,Pt(p.x+left,p.y),fc);
8: * p.x += i->width;
9: *
10: * BEWARE: if you change Font or Fontchar, look very carefully at
11: * /usr/jerq/src/lib/defont.c
12: */
13: #ifndef FONT_H
14: #define FONT_H
15:
16: typedef struct Fontchar
17: {
18: short x; /* left edge of bits */
19: unsigned char top; /* first non-zero scan-line */
20: unsigned char bottom; /* last non-zero scan-line */
21: char left; /* offset of baseline */
22: unsigned char width; /* width of baseline */
23: } Fontchar;
24:
25: typedef struct Font
26: {
27: short n; /* number of chars in font */
28: char height; /* height of bitmap */
29: char ascent; /* top of bitmap to baseline */
30: long unused; /* in case we think of more stuff */
31: Bitmap *bits; /* where the characters are */
32: Fontchar info[1]; /* n+1 character descriptors */
33: } Font;
34:
35: extern Font *infont(); /* takes an argument char (*inchar)() */
36: extern Font *getfont(); /* takes the font name char *name */
37: #ifndef DEFONT
38: #ifdef MUX
1.1.1.2 ! root 39: #define defont (*P->defaultfont)
1.1 root 40: #else
41: extern Font defont;
1.1.1.2 ! root 42: #endif /* MUX */
! 43: #endif /* DEFONT */
! 44: #endif /* FONT_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.