home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / g / gs241j11.zip / INCLUDE.SNF / FONTSTRU.H < prev    next >
C/C++ Source or Header  |  1992-04-07  |  4KB  |  96 lines

  1. /***********************************************************
  2. Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
  3. and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
  4.  
  5.                         All Rights Reserved
  6.  
  7. Permission to use, copy, modify, and distribute this software and its 
  8. documentation for any purpose and without fee is hereby granted, 
  9. provided that the above copyright notice appear in all copies and that
  10. both that copyright notice and this permission notice appear in 
  11. supporting documentation, and that the names of Digital or MIT not be
  12. used in advertising or publicity pertaining to distribution of the
  13. software without specific, written prior permission.  
  14.  
  15. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  16. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  17. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  18. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  19. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  20. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  21. SOFTWARE.
  22.  
  23. ******************************************************************/
  24. #ifndef FONTSTRUCT_H
  25. #define FONTSTRUCT_H 1
  26. #include "font.h"
  27. #include "misc.h"
  28.  
  29. typedef struct _CharInfo {
  30.     xCharInfo    metrics;    /* info preformatted for Queries */
  31.     unsigned    byteOffset:24;    /* byte offset of the raster from pGlyphs */
  32.     Bool    exists:1;    /* true iff glyph exists for this char */
  33.     unsigned    pad:7;        /* must be zero for now */
  34. } CharInfoRec;
  35.  
  36. typedef struct _FontInfo {
  37.     unsigned int    version1;   /* version stamp */
  38.     unsigned int    allExist;
  39.     unsigned int    drawDirection;
  40.     unsigned int    noOverlap;    /* true if:
  41.                      * max(rightSideBearing-characterWidth)
  42.                      * <= minbounds->metrics.leftSideBearing
  43.                      */
  44.     unsigned int    constantMetrics;
  45.     unsigned int    terminalFont;    /* Should be deprecated!  true if:
  46.                        constant metrics &&
  47.                        leftSideBearing == 0 &&
  48.                        rightSideBearing == characterWidth &&
  49.                        ascent == fontAscent &&
  50.                        descent == fontDescent
  51.                     */
  52.     unsigned int    linear:1;    /* true if firstRow == lastRow */
  53.     unsigned int    constantWidth:1;  /* true if minbounds->metrics.characterWidth
  54.                        *      == maxbounds->metrics.characterWidth
  55.                        */
  56.     unsigned int    inkInside:1;    /* true if for all defined glyphs:
  57.                      * leftSideBearing >= 0 &&
  58.                      * rightSideBearing <= characterWidth &&
  59.                      * -fontDescent <= ascent <= fontAscent &&
  60.                      * -fontAscent <= descent <= fontDescent
  61.                      */
  62.     unsigned int    inkMetrics:1;    /* ink metrics != bitmap metrics */
  63.                     /* used with terminalFont */
  64.                     /* see font's pInk{CI,Min,Max} */
  65.     unsigned int    padding:28;
  66.     unsigned int    firstCol;
  67.     unsigned int    lastCol;
  68.     unsigned int    firstRow;
  69.     unsigned int    lastRow;
  70.     unsigned int    nProps;
  71.     unsigned int    lenStrings; /* length in bytes of string table */
  72.     unsigned int    chDefault;  /* default character */ 
  73.     int            fontDescent; /* minimum for quality typography */
  74.     int            fontAscent;  /* minimum for quality typography */
  75.     CharInfoRec        minbounds;  /* MIN of glyph metrics over all chars */
  76.     CharInfoRec        maxbounds;  /* MAX of glyph metrics over all chars */
  77.     unsigned int    pixDepth;   /* intensity bits per pixel */
  78.     unsigned int    glyphSets;  /* number of sets of glyphs, for
  79.                         sub-pixel positioning */
  80.     unsigned int    version2;   /* version stamp double-check */
  81. } FontInfoRec;
  82.  
  83. typedef struct _ExtentInfo {
  84.     DrawDirection    drawDirection;
  85.     int            fontAscent;
  86.     int            fontDescent;
  87.     int            overallAscent;
  88.     int            overallDescent;
  89.     int            overallWidth;
  90.     int            overallLeft;
  91.     int            overallRight;
  92. } ExtentInfoRec;
  93.  
  94. #endif /* FONTSTRUCT_H */
  95.  
  96.