home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / DC-POS24.LZX / pOS / IncPOS.lzx / pGFX / Text.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-03-18  |  4.0 KB  |  130 lines

  1. #ifndef __INC_POS_PGFX_TEXT_H
  2. #define __INC_POS_PGFX_TEXT_H
  3. /*******************************************************************
  4.  Includes Release 24
  5.  (C) Copyright 1995-1997 proDAD
  6.      All Rights Reserved
  7.  
  8.  $AUT Holger Burkarth
  9.  $DAT >>Text.h<<   05 Oct 1996    08:48:20 - (C) ProDAD
  10. *******************************************************************/
  11. #ifndef __INC_POS_PEXEC_LIST_H
  12. #include <pExec/List.h>
  13. #endif
  14.  
  15.  
  16. /*----------------------------------
  17. -----------------------------------*/
  18. struct pOS_TextAttr
  19. {
  20.   const CHAR               *ta_Name;   /* name of the font */
  21.         UWORD               ta_YSize;  /* height of the font */
  22.         UWORD               ta_Style;  /* (enum pOS_FontStyles) */
  23.         UWORD               ta_Flags;  /* (enum pOS_FontFlags) */
  24.   const struct pOS_TagItem *ta_Tags;   /* extended attributes */
  25. };
  26.  
  27.  
  28. /*----------------------------------
  29. -----------------------------------*/
  30. struct pOS_TextFont
  31. {
  32.   struct pOS_ExNode tf_Node;  /* */
  33.                             /* font name in ln_Name  */
  34.   UWORD           tf_YSize; /* font height           */
  35.   UWORD           tf_Style; /* (enum pOS_FontStyles) */
  36.   UWORD           tf_Flags; /* (enum pOS_FontFlags)  */
  37.  
  38.   UWORD           tf_XSize;       /* nominal font width */
  39.   UWORD           tf_Baseline;    /* distance from the top of char to baseline */
  40.   UWORD           tf_BoldSmear;   /* smear to affect a bold enhancement */
  41.  
  42.   UWORD           tf_Accessors;   /* access count */
  43.  
  44.   UBYTE           tf_LoChar;      /* the first character described here */
  45.   UBYTE           tf_HiChar;      /* the last character described here */
  46.   const UBYTE    *tf_CharData;    /* the bit character data */
  47.  
  48.   UWORD           tf_Modulo;      /* the row modulo for the strike font data */
  49.   const struct pOS_FontGlyphLoc *tf_CharLoc; /* ptr to location data for the strike font */
  50.                                   /*   2 words: bit offset then size */
  51.   const SWORD    *tf_CharSpace;   /* ptr to words of proportional spacing data */
  52.   const SWORD    *tf_CharKern;    /* ptr to words of kerning data */
  53.  
  54.   struct pOS_GfxLibrary *tf_Base;        /* Optional: private Fonts */
  55.   ULONG                  tf_BaseUse[2];  /* Private for tf_Base     */
  56.  
  57.   UBYTE tf_Reserved[16];
  58. };
  59.  
  60.  
  61.  
  62. /*----------------------------------
  63. -----------------------------------*/
  64. struct pOS_FontGlyphLoc
  65. {
  66.   UWORD fgl_BitOffset;
  67.   UWORD fgl_BitSize;
  68. };
  69.  
  70.  
  71.  
  72. enum pOS_FontStyles
  73. {
  74.   FNTSTY_Normal=     0x00, /* normal text (no style bits set) */
  75.   FNTSTYB_Underline= 0,    /* underlined (under baseline) */
  76.   FNTSTYF_Underline= 0x01,
  77.   FNTSTYB_Bold=      1,    /* bold face text (ORed w/ shifted) */
  78.   FNTSTYF_Bold=      0x02,
  79.   FNTSTYB_Italic=    2,    /* italic (slanted 1:2 right) */
  80.   FNTSTYF_Italic=    0x04,
  81.   FNTSTYB_Extended=  3,    /* extended face (wider than normal) */
  82.   FNTSTYF_Extended=  0x08,
  83.   FNTSTYB_Colorfont= 6,    /* this uses ColorTextFont structure */
  84.   FNTSTYF_Colorfont= 0x40,
  85.  
  86.   FNTSTYF_HorzMirr=  0x0100, /* horizontal gespiegelt */
  87.   FNTSTYF_VertMirr=  0x0200, /* vertikal gespiegelt */
  88. };
  89.  
  90.  
  91. enum pOS_FontFlags
  92. {
  93.   FNTFLGB_RomFont=       0,     /* font is in rom */
  94.   FNTFLGF_RomFont=       0x01,
  95.   FNTFLGB_DiskFont=      1,     /* font is from disk */
  96.   FNTFLGF_DiskFont=      0x02,
  97.   FNTFLGB_RevPath=       2,     /* designed path is reversed (e.g. left) */
  98.   FNTFLGF_RevPath=       0x04,
  99.   FNTFLGB_TallDot=       3,     /* designed for hires non-interlaced */
  100.   FNTFLGF_TallDot=       0x08,
  101.   FNTFLGB_WideDot=       4,     /* designed for lores interlaced */
  102.   FNTFLGF_WideDot=       0x10,
  103.   FNTFLGB_Proportional=  5,     /* character sizes can vary from nominal */
  104.   FNTFLGF_Proportional=  0x20,
  105.   FNTFLGB_Designed=      6,
  106.   FNTFLGF_Designed=      0x40,
  107.  
  108.   FNTFLGB_Removed=       7,     /* the font has been removed */
  109.   FNTFLGF_Removed=       0x80,
  110. };
  111.  
  112.  
  113.  
  114.  
  115.  
  116. /*----------------------------------
  117. -----------------------------------*/
  118. struct pOS_TextDim
  119. {
  120.   UWORD td_MaxWidth;     /* maximale Pixel-Width */
  121.   UWORD td_UsedNumChars; /* Anzahl der Chars */
  122.   UWORD td_UsedWidth;
  123.  
  124.   UBYTE td_Reserved[32];
  125. };
  126.  
  127.  
  128.  
  129. #endif
  130.