home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / TRSICAT.LZX / CATS_CD2_TRSI / Inc&AD1.3 / Includes / libraries / diskfont.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-12  |  2.1 KB  |  76 lines

  1. #ifndef LIBRARIES_DISKFONT_H
  2. #define LIBRARIES_DISKFONT_H
  3. /*
  4. **    $Filename: libraries/diskfont.h $
  5. **    $Release: 1.3 $
  6. **
  7. **    diskfont library definitions 
  8. **
  9. **    (C) Copyright 1985,1986,1987,1988 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13. #ifndef        EXEC_NODES_H
  14. #include "exec/nodes.h"
  15. #endif
  16. #ifndef        EXEC_LISTS_H
  17. #include "exec/lists.h"
  18. #endif
  19. #ifndef        GRAPHICS_TEXT_H
  20. #include "graphics/text.h"
  21. #endif
  22.  
  23. #define        MAXFONTPATH 256   /* including null terminator */
  24.  
  25. struct FontContents {
  26.    char     fc_FileName[MAXFONTPATH];
  27.    UWORD fc_YSize;
  28.    UBYTE fc_Style;
  29.    UBYTE fc_Flags;
  30. };
  31.  
  32. #define        FCH_ID    0x0f00
  33.  
  34. struct FontContentsHeader {
  35.    UWORD fch_FileID; /* FCH_ID */
  36.    UWORD fch_NumEntries;   /* the number of FontContents elements */
  37.     /*     struct FontContents fch_FC[]; */
  38. };
  39.  
  40. #define        DFH_ID    0x0f80
  41. #define        MAXFONTNAME 32 /* font name including ".font\0" */
  42.  
  43. struct DiskFontHeader {
  44.     /* the following 8 bytes are not actually considered a part of the */
  45.     /* DiskFontHeader, but immediately preceed it. The NextSegment is  */
  46.     /* supplied by the linker/loader, and the ReturnCode is the code   */
  47.     /* at the beginning of the font in case someone runs it...           */
  48.     /*     ULONG dfh_NextSegment;/* actually a BPTR */
  49.     /*     ULONG dfh_ReturnCode;     /* MOVEQ #0,D0 : RTS */
  50.     /* here then is the official start of the DiskFontHeader...         */
  51.    struct   Node dfh_DF;   /* node to link disk fonts */
  52.    UWORD dfh_FileID; /* DFH_ID */
  53.    UWORD dfh_Revision;    /* the font revision */
  54.    LONG     dfh_Segment;    /* the segment address when loaded */
  55.    char     dfh_Name[MAXFONTNAME];     /* the font name (null terminated) */
  56.    struct   TextFont dfh_TF;/* loaded TextFont structure */
  57. };
  58.  
  59.  
  60. #define        AFB_MEMORY    0
  61. #define        AFF_MEMORY    1
  62. #define        AFB_DISK 1
  63. #define        AFF_DISK 2
  64.  
  65. struct AvailFonts {
  66.    UWORD af_Type;    /* MEMORY or DISK */
  67.    struct   TextAttr af_Attr; /* text attributes for font */
  68. };
  69.  
  70. struct AvailFontsHeader {
  71.    UWORD afh_NumEntries;      /* number of AvailFonts elements */
  72.     /*     struct      AvailFonts afh_AF[]; */
  73. };
  74.  
  75. #endif    /* LIBRARIES_DISKFONT_H */
  76.