home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1999 March B / SCO_CASTOR4RRT.iso / uccs / root.14 / udk / usr / add-on / include / sys / font.h next >
Encoding:
C/C++ Source or Header  |  1998-08-19  |  2.5 KB  |  85 lines

  1. /*
  2.  * Copyright (c) 1998 The Santa Cruz Operation, Inc.. All Rights Reserved. 
  3.  *                                                                         
  4.  *        THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE               
  5.  *                   SANTA CRUZ OPERATION INC.                             
  6.  *                                                                         
  7.  *   The copyright notice above does not evidence any actual or intended   
  8.  *   publication of such source code.                                      
  9.  */
  10.  
  11. #ident    "@(#)libetitam:sys/font.h    1.1"
  12. /*
  13.     Unix Window System
  14.     Font/Icon Defintions
  15.  
  16.  */
  17.  
  18. #ifndef FONT_H
  19. #define FONT_H
  20.  
  21. #include "sys/types.h"
  22. #include "sys/iohw.h"
  23.  
  24. #define FMAGIC        0616        /* font file magic number    */
  25. #define NSFONTS        16        /* More system font slots than 
  26.                     per- window slots */
  27. #define FNTSIZE        96        /* size of a font        */
  28. #define FNTBASE        32        /* first character        */
  29. #define FNSIZE        60        /* maximum font name size    */
  30.  
  31. #define ICONSIZE    64        /* shorts in icon raster area     */
  32.  
  33. #ifdef KERNEL
  34. /***** BEWARE:                                */
  35. /*****        the fntdef and fcdef structures should not be changed    */
  36. /*****        without changing the raster text function (io/rastex.s)    */
  37. #endif
  38.  
  39. struct fcdef                /* font character definition    */
  40. {
  41.     char        fc_hs;        /* horizontal size in bits    */
  42.     char        fc_vs;        /* vertical size        */
  43.     char        fc_ha;        /* horizontal adjust (signed)    */
  44.     char        fc_va;        /* vertical adjust (signed)    */
  45.     char        fc_hi;        /* horizontal increment        */
  46.     char        fc_vi;        /* vertical increment (optional)*/
  47.     short        fc_mr;        /* relative mini-raster pointer    */
  48. };
  49.  
  50. struct fntdef
  51. {
  52.     long        ff_magic;    /* magic number            */
  53.     unsigned char    ff_flags;    /* flags            */
  54.     char        ff_hs;        /* nominal horizontal spacing    */
  55.     char        ff_vs;        /* nominal vertical spacing    */
  56.     char        ff_baseline;    /* pixel offset to baseline    */
  57.     char        ff_dummy[24];    /* round to 32 bytes        */
  58.     struct    fcdef     ff_fc[FNTSIZE];    /* font control            */
  59.     unsigned short     ff_raster;    /* raster data begins here    */
  60. };
  61.  
  62. struct ufdata                /* user font data        */
  63. {
  64.     short        uf_slot;    /* slot number            */
  65.     char        uf_name[FNSIZE];/* font name (file name)    */
  66. };
  67.  
  68. struct icon                /* an icon            */
  69. {
  70.     char        ic_flags;    /* flags            */
  71.     struct fcdef    ic_fc;        /* font def            */
  72.     unsigned short    ic_raster[ICONSIZE]; /* raster data        */
  73. };
  74.  
  75. struct wfont                /* Loaded fonts bookkeeping    */
  76. {
  77.     struct    fntdef    *wf_ff;        /* ptr to font file header    */
  78.     short    wf_usecnt;        /* use count of font, 0=free    */
  79.     ino_t    wf_ino;            /* inode number of font file    */
  80.     time_t    wf_mtime;        /* modified time of font file    */
  81.     long    wf_size;        /* size of font file        */
  82. };
  83.  
  84. #endif FONT_H
  85.