home *** CD-ROM | disk | FTP | other *** search
/ Atari FTP / ATARI_FTP_0693.zip / ATARI_FTP_0693 / Mint / Mgr / Sparcmgr / src.zoo / src / font.h < prev    next >
C/C++ Source or Header  |  1989-09-27  |  2KB  |  48 lines

  1. /*                        Copyright (c) 1987 Bellcore
  2.  *                            All Rights Reserved
  3.  *       Permission is granted to copy or use this program, EXCEPT that it
  4.  *       may not be sold for profit, the copyright notice must be reproduced
  5.  *       on copies, and credit should be given to Bellcore where it is due.
  6.  *       BELLCORE MAKES NO WARRANTY AND ACCEPTS NO LIABILITY FOR THIS PROGRAM.
  7.  */
  8. /*    $Header: font.h,v 1.2 89/09/27 08:37:22 sau Exp $
  9.     $Source: /m1/mgr.new/src/RCS/font.h,v $
  10. */
  11. static char    h_font_[] = "$Source: /m1/mgr.new/src/RCS/font.h,v $$Revision: 1.2 $";
  12.  
  13. /* Constant spaced font format */
  14.  
  15. #define FONT_A            '\030'    /* fixed width fonts 32 bit alignment*/
  16. #define FONT_X            '\026'    /* fixed width fonts 16 bit alignment (obsolete) */
  17. #define FONT_S            '\027'    /* proportional fonts (not used yet) */
  18.  
  19. struct font_header {
  20.    unsigned char type;        /* font type */
  21.    unsigned char wide;        /* character width */
  22.    unsigned char high;        /* char height */
  23.    unsigned char baseline;    /* pixels from bottom */
  24.    unsigned char count;        /* number of chars in font */
  25.    char          start;        /* starting char in font */
  26.    };
  27.  
  28. #define H_SIZE    499        /* size of hash table for cut/paste */
  29.  
  30. struct entry {
  31.    unsigned char value;        /* character at this location */
  32.    struct entry *next;        /* pntr to next char */
  33.    };
  34.  
  35. #define    MAXGLYPHS    256
  36.  
  37. struct font {
  38.    struct font_header head;    /* font header */
  39.    BITMAP *data;        /* all the glyphs strung together */
  40.    BITMAP *glyph[MAXGLYPHS];    /* pointers to individual glyphs */
  41.    short ident;            /* font id */
  42.    struct entry **table;    /* pointer to hash table for cut/paste */
  43.    };
  44.  
  45. #define HEADER_SIZE    sizeof(struct font_header)
  46.  
  47. struct font *open_font();
  48.