home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume24 / psroff3.0 / part18 / pk.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-10-09  |  2.4 KB  |  88 lines

  1. /*
  2.     Copyright 1985, 1986, 1987, 1988, 1989, 1990, 1991 Chris Lewis
  3.         All Rights Reserved
  4.  
  5.     See the LICENSE file for a full description of restrictions under which
  6.     this software is provided.
  7.  
  8.     Function:        PK format font file description
  9.  */
  10.  
  11. /* 2.2 91/02/20 */
  12.  
  13. #ifdef    PK
  14.  
  15. #define    int8    unsigned char
  16. #define    PK_ID    89
  17. #define    PK_xxx1    240
  18. #define    PK_xxx2    241
  19. #define    PK_xxx3    242
  20. #define    PK_xxx4    243
  21. #define    PK_yyy    244
  22. #define    PK_post    245
  23. #define    PK_no_op    246
  24. #define    PK_pre    247
  25.  
  26. /*    PK header data */
  27. struct pkp {
  28. #define    PK_PK    01
  29. #define    PK_SFP    02
  30.     long pkp_ds;    /* design size */
  31.     long pkp_npts;    /* pointsize normalized to 300 dpi */
  32.     long pkp_res;    /* resolution of this font */
  33.     long pkp_cs;    /* checksum */
  34.     long pkp_hppp;    /* Horizontal pixel ratio */
  35.     long pkp_vppp;    /* Vertical pixel ratio */
  36.     long pkp_bmax;    /* baseline max */
  37.     long pkp_dmax;    /* descender max */
  38.     long pkp_wmax;    /* width max */
  39.     long pkp_xomax;    /* left offset max */
  40.     long pkp_kh;    /* kern high */
  41.     long pkp_kl;    /* kern low */
  42.     struct pkc *pkp_chars;    /* pointer to character descriptors */
  43.     struct pkc *pkp_last;    /* pointer to last character descriptor */
  44.     struct pkc **pkp_list;    /* pointer to sorted list of descriptors */
  45.     long pkp_num;    /* number of characters */
  46.     int pkp_symset;    /* symbol set */
  47.     char pkp_flags;    /* font format */
  48.     char pkp_style;    /* style */
  49.     char pkp_sw;    /* stroke weight */
  50.     char pkp_typeface;    /* typeface */
  51. };
  52.  
  53. struct pkp *pk_read();
  54.  
  55. struct pkc {
  56.     long pkc_flag;    /* flag byte */
  57.     long pkc_dyn_f;    /* dynamic packing byte */
  58.     long pkc_pl;    /* packet length */
  59.     long pkc_char;    /* character code */
  60.     long pkc_tfm;    /* TeX font metrics */
  61.     long pkc_dx;    /* Horizontal escapement */
  62.     long pkc_dy;    /* Vertical escapement */
  63.     long pkc_width;    /* character width of BB */
  64.     long pkc_height;    /* character height of BB */
  65.     long pkc_x_off;    /* horizontal offset from upper left pixel to ref. */
  66.     long pkc_y_off;    /* vertical offset from upper left pixel to ref. */
  67.     long turnon;    /* used for unravelling bits */
  68.     long pkc_rlen;    /* actual raster length */
  69.     int8 *pkc_pkr;    /* actual PK raster */
  70.     struct ras *pkc_sfpr;    /* SFP raster */
  71.     struct pkc *pkc_next;    /* next character */
  72. };
  73.  
  74. struct ras {
  75.     long ras_width;
  76.     long ras_height;
  77.     long ras_bline;
  78.     long ras_bytes;
  79.     long ras_xcur;
  80.     long ras_ycur;
  81.     int8 *ras_raster;
  82. };
  83.  
  84. #define    pow2(x)    (1L << (x))
  85.  
  86. #define    OUTRES    300
  87. #endif
  88.