DEFINITION MODULE DiskFont{"diskfont.library",33};

FROM SYSTEM IMPORT
 ADDRESS,BPTR;
FROM Exec IMPORT
 Node;
FROM Graphics IMPORT
 FontFlagSet,FontStyleSet,TextAttr,TextAttrPtr,TextFont
 ,TextFontPtr;

CONST
 maxFontPath=256;
 maxFontName=32;
 fchId=0F00H;
 dfhId=0F80H;

TYPE
 AvailFontTypes=(
  memory,disk,af2,af3,af4,af5,af6,af7,
  af8,af9,af10,af11,af12,af13,af14,a15
 );
 AvailFontTypeSet=SET OF AvailFontTypes;
 FontContents=RECORD
  fileName: ARRAY [0..maxFontPath-1] OF CHAR;
  ySize: CARDINAL;
  style: FontStyleSet;
  flags: FontFlagSet;
 END;
 FontContentsHeader=RECORD
  fileId: CARDINAL;
  numEntries: CARDINAL;
(*fc: ARRAY [0..numEntries-1] OF FontContents *)
 END;
 FontContentsHeaderPtr=POINTER TO FontContentsHeader;
 DiskFontHeader=RECORD
  df: Node;
  fileId: CARDINAL;
  revision: CARDINAL;
  segment: BPTR;
  name: ARRAY [0..maxFontName-1] OF CHAR;
  tf: TextFont
 END;
 AvailFont=RECORD
  type: AvailFontTypeSet;
  attr: TextAttr;
 END;
 AvailFontHeader=RECORD
  numEntries: CARDINAL;
(*af: ARRAY [0..numEntries-1] OF AvailFont;*)
 END;
 AvailFontHeaderPtr=POINTER TO AvailFontHeader;

PROCEDURE AvailFonts(
           buffer{8}: ADDRESS;
           bufBytes{0}: LONGINT;
           types{1}: AvailFontTypeSet):LONGINT; CODE -36;
PROCEDURE OpenDiskFont(
           textAttr{8}: TextAttrPtr): TextFontPtr; CODE -30;

END DiskFont.
