home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / gnu / os-include / diskfont / diskfont.h next >
C/C++ Source or Header  |  1993-10-15  |  3KB  |  112 lines

  1. #ifndef    DISKFONT_DISKFONT_H
  2. #define    DISKFONT_DISKFONT_H
  3. /*
  4. **    $VER: diskfont.h 38.0 (18.6.92)
  5. **    Includes Release 40.15
  6. **
  7. **    diskfont library definitions
  8. **
  9. **    (C) Copyright 1990 Robert R. Burns
  10. **        All Rights Reserved
  11. **    (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  12. **        All Rights Reserved
  13. */
  14.  
  15. #ifndef     EXEC_NODES_H
  16. #include "exec/nodes.h"
  17. #endif
  18. #ifndef     EXEC_LISTS_H
  19. #include "exec/lists.h"
  20. #endif
  21. #ifndef     GRAPHICS_TEXT_H
  22. #include "graphics/text.h"
  23. #endif
  24.  
  25. #define     MAXFONTPATH 256   /* including null terminator */
  26.  
  27. struct FontContents {
  28.     char    fc_FileName[MAXFONTPATH];
  29.     UWORD   fc_YSize;
  30.     UBYTE   fc_Style;
  31.     UBYTE   fc_Flags;
  32. };
  33.  
  34. struct TFontContents {
  35.     char    tfc_FileName[MAXFONTPATH-2];
  36.     UWORD   tfc_TagCount;    /* including the TAG_DONE tag */
  37.     /*
  38.      *    if tfc_TagCount is non-zero, tfc_FileName is overlayed with
  39.      *    Text Tags starting at:    (struct TagItem *)
  40.      *        &tfc_FileName[MAXFONTPATH-(tfc_TagCount*sizeof(struct TagItem))]
  41.      */
  42.     UWORD   tfc_YSize;
  43.     UBYTE   tfc_Style;
  44.     UBYTE   tfc_Flags;
  45. };
  46.  
  47.  
  48. #define  FCH_ID        0x0f00    /* FontContentsHeader, then FontContents */
  49. #define  TFCH_ID    0x0f02    /* FontContentsHeader, then TFontContents */
  50. #define  OFCH_ID    0x0f03    /* FontContentsHeader, then TFontContents,
  51.                  * associated with outline font */
  52.  
  53. struct FontContentsHeader {
  54.     UWORD   fch_FileID;        /* FCH_ID */
  55.     UWORD   fch_NumEntries;    /* the number of FontContents elements */
  56.     /* struct FontContents fch_FC[], or struct TFontContents fch_TFC[]; */
  57. };
  58.  
  59.  
  60. #define  DFH_ID        0x0f80
  61. #define  MAXFONTNAME    32    /* font name including ".font\0" */
  62.  
  63. struct DiskFontHeader {
  64.     /* the following 8 bytes are not actually considered a part of the    */
  65.     /* DiskFontHeader, but immediately preceed it. The NextSegment is    */
  66.     /* supplied by the linker/loader, and the ReturnCode is the code    */
  67.     /* at the beginning of the font in case someone runs it...        */
  68.     /*     ULONG dfh_NextSegment;            \* actually a BPTR    */
  69.     /*     ULONG dfh_ReturnCode;            \* MOVEQ #0,D0 : RTS    */
  70.     /* here then is the official start of the DiskFontHeader...        */
  71.     struct Node dfh_DF;        /* node to link disk fonts */
  72.     UWORD   dfh_FileID;        /* DFH_ID */
  73.     UWORD   dfh_Revision;    /* the font revision */
  74.     LONG    dfh_Segment;    /* the segment address when loaded */
  75.     char    dfh_Name[MAXFONTNAME]; /* the font name (null terminated) */
  76.     struct TextFont dfh_TF;    /* loaded TextFont structure */
  77. };
  78.  
  79. /* unfortunately, this needs to be explicitly typed */
  80. /* used only if dfh_TF.tf_Style FSB_TAGGED bit is set */
  81. #define    dfh_TagList    dfh_Segment    /* destroyed during loading */
  82.  
  83.  
  84. #define     AFB_MEMORY    0
  85. #define     AFF_MEMORY    0x0001
  86. #define     AFB_DISK    1
  87. #define     AFF_DISK    0x0002
  88. #define     AFB_SCALED    2
  89. #define     AFF_SCALED    0x0004
  90. #define     AFB_BITMAP    3
  91. #define     AFF_BITMAP    0x0008
  92.  
  93. #define     AFB_TAGGED    16    /* return TAvailFonts */
  94. #define     AFF_TAGGED    0x10000L
  95.  
  96. struct AvailFonts {
  97.     UWORD   af_Type;        /* MEMORY, DISK, or SCALED */
  98.     struct TextAttr af_Attr;    /* text attributes for font */
  99. };
  100.  
  101. struct TAvailFonts {
  102.     UWORD   taf_Type;        /* MEMORY, DISK, or SCALED */
  103.     struct TTextAttr taf_Attr;    /* text attributes for font */
  104. };
  105.  
  106. struct AvailFontsHeader {
  107.     UWORD   afh_NumEntries;     /* number of AvailFonts elements */
  108.     /* struct AvailFonts afh_AF[], or struct TAvailFonts afh_TAF[]; */
  109. };
  110.  
  111. #endif    /* DISKFONT_DISKFONT_H */
  112.