#ifndef __INC_POS_PGFX_TEXT_H
#define __INC_POS_PGFX_TEXT_H
/*******************************************************************
 Includes Release 24
 (C) Copyright 1995-1997 proDAD
     All Rights Reserved

 $AUT Holger Burkarth
 $DAT >>Text.h<<   05 Oct 1996    08:48:20 - (C) ProDAD
*******************************************************************/
#ifndef __INC_POS_PEXEC_LIST_H
#include <pExec/List.h>
#endif


/*----------------------------------
-----------------------------------*/
struct pOS_TextAttr
{
  const CHAR               *ta_Name;   /* name of the font */
        UWORD               ta_YSize;  /* height of the font */
        UWORD               ta_Style;  /* (enum pOS_FontStyles) */
        UWORD               ta_Flags;  /* (enum pOS_FontFlags) */
  const struct pOS_TagItem *ta_Tags;   /* extended attributes */
};


/*----------------------------------
-----------------------------------*/
struct pOS_TextFont
{
  struct pOS_ExNode tf_Node;  /* */
                            /* font name in ln_Name  */
  UWORD           tf_YSize; /* font height           */
  UWORD           tf_Style; /* (enum pOS_FontStyles) */
  UWORD           tf_Flags; /* (enum pOS_FontFlags)  */

  UWORD           tf_XSize;       /* nominal font width */
  UWORD           tf_Baseline;    /* distance from the top of char to baseline */
  UWORD           tf_BoldSmear;   /* smear to affect a bold enhancement */

  UWORD           tf_Accessors;   /* access count */

  UBYTE           tf_LoChar;      /* the first character described here */
  UBYTE           tf_HiChar;      /* the last character described here */
  const UBYTE    *tf_CharData;    /* the bit character data */

  UWORD           tf_Modulo;      /* the row modulo for the strike font data */
  const struct pOS_FontGlyphLoc *tf_CharLoc; /* ptr to location data for the strike font */
                                  /*   2 words: bit offset then size */
  const SWORD    *tf_CharSpace;   /* ptr to words of proportional spacing data */
  const SWORD    *tf_CharKern;    /* ptr to words of kerning data */

  struct pOS_GfxLibrary *tf_Base;        /* Optional: private Fonts */
  ULONG                  tf_BaseUse[2];  /* Private for tf_Base     */

  UBYTE tf_Reserved[16];
};



/*----------------------------------
-----------------------------------*/
struct pOS_FontGlyphLoc
{
  UWORD fgl_BitOffset;
  UWORD fgl_BitSize;
};



enum pOS_FontStyles
{
  FNTSTY_Normal=     0x00, /* normal text (no style bits set) */
  FNTSTYB_Underline= 0,    /* underlined (under baseline) */
  FNTSTYF_Underline= 0x01,
  FNTSTYB_Bold=      1,    /* bold face text (ORed w/ shifted) */
  FNTSTYF_Bold=      0x02,
  FNTSTYB_Italic=    2,    /* italic (slanted 1:2 right) */
  FNTSTYF_Italic=    0x04,
  FNTSTYB_Extended=  3,    /* extended face (wider than normal) */
  FNTSTYF_Extended=  0x08,
  FNTSTYB_Colorfont= 6,    /* this uses ColorTextFont structure */
  FNTSTYF_Colorfont= 0x40,

  FNTSTYF_HorzMirr=  0x0100, /* horizontal gespiegelt */
  FNTSTYF_VertMirr=  0x0200  /* vertikal gespiegelt */
};


enum pOS_FontFlags
{
  FNTFLGB_RomFont=       0,     /* font is in rom */
  FNTFLGF_RomFont=       0x01,
  FNTFLGB_DiskFont=      1,     /* font is from disk */
  FNTFLGF_DiskFont=      0x02,
  FNTFLGB_RevPath=       2,     /* designed path is reversed (e.g. left) */
  FNTFLGF_RevPath=       0x04,
  FNTFLGB_TallDot=       3,     /* designed for hires non-interlaced */
  FNTFLGF_TallDot=       0x08,
  FNTFLGB_WideDot=       4,     /* designed for lores interlaced */
  FNTFLGF_WideDot=       0x10,
  FNTFLGB_Proportional=  5,     /* character sizes can vary from nominal */
  FNTFLGF_Proportional=  0x20,
  FNTFLGB_Designed=      6,
  FNTFLGF_Designed=      0x40,

  FNTFLGB_Removed=       7,     /* the font has been removed */
  FNTFLGF_Removed=       0x80
};





/*----------------------------------
-----------------------------------*/
struct pOS_TextDim
{
  UWORD td_MaxWidth;     /* maximale Pixel-Width */
  UWORD td_UsedNumChars; /* Anzahl der Chars */
  UWORD td_UsedWidth;

  UBYTE td_Reserved[32];
};



#endif
