DEFINITION MODULE DiskFontD; (*$Implementation:=FALSE*)
(* 16-May-1992/cn *)

FROM SYSTEM IMPORT ADDRESS,BPTR;

FROM ExecD IMPORT
 Node;

FROM GraphicsD IMPORT
 FontFlagSet,FontStyleSet,TextAttr,TTextAttr,TextAttrPtr,TextFont
 ,TextFontPtr;

FROM UtilityD IMPORT
 TagItem,TagItemPtr;

CONST
 diskfontName="diskfont.library";

 maxFontPath=256;
 maxFontName=32;

 fchId=0F00H;
 tfhId=0F02H;
 dfhId=0F80H;

TYPE
 AvailFontTypes=(
  memory,disk,scaled,af3,af4,af5,af6,af7,af8
  ,af9,af10,af11,af12,af13,af14,a15,tagged
 );
 AvailFontTypeSet=SET OF [memory..a15];
 AvailFontsSet=SET OF AvailFontTypes;

 FontContents=RECORD
  fileName:ARRAY [0..maxFontPath-1] OF CHAR;
  ySize:CARDINAL;
  style:FontStyleSet;
  flags:FontFlagSet;
 END;

 (*36*)TFontContents=RECORD
        fileName:ARRAY [0..maxFontPath-3] OF CHAR;
        tagCount:CARDINAL;
        ySize:CARDINAL;
        style:FontStyleSet;
        flags:FontFlagSet;
       END;

 FontContentsHeader=RECORD
  fileId:CARDINAL;
  numEntries:CARDINAL;
  (* fc:ARRAY [0..numEntries-1] OF (T)FontContents *)
 END;
 FontContentsHeaderPtr=POINTER TO FontContentsHeader;

 DiskFontHeader=RECORD
  df:Node;
  fileId:CARDINAL;
  revision:CARDINAL;
  CASE :INTEGER OF
  |0: segment:BPTR;
  |1: tagList:TagItemPtr;
  END;
  name:ARRAY [0..maxFontName-1] OF CHAR;
  tf:TextFont
 END;
 DiskFontHeaderPtr=POINTER TO DiskFontHeader;

 AvailFont=RECORD
  type:AvailFontTypeSet;
  attr:TextAttr;
 END;

 TAvailFont=RECORD
  type:AvailFontTypeSet;
  attr:TTextAttr;
 END;

 AvailFontHeader=RECORD
  numEntries:CARDINAL;
  (*af:ARRAY [0..numEntries-1] OF (T)AvailFont;*)
 END;
 AvailFontHeaderPtr=POINTER TO AvailFontHeader;

END DiskFontD.noimp
