Annotation of researchv9/jerq/include/font.h, revision 1.1.1.1

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: #endif
                     36: 
                     37: extern Font *infont();         /* takes an argument char (*inchar)() */
                     38: extern Font *getfont();                /* takes the font name char *name */
                     39: #ifndef                DEFONT
                     40: #ifdef         MUX
                     41: #define        defont  (*((Font *)Sys[1]))
                     42: #else
                     43: extern Font defont;
                     44: #endif         DEFONT
                     45: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.