
DEFINITION MODULE FontReader;

(* 
   Author:         Andrew Trevorrow
   Implementation: University of Hamburg Modula-2 under VAX/VMS version 4
   Date Started:   November, 1986

   Description:
   Routines for reading font files in a variety of formats.
*)

  FROM SYSTEM IMPORT 
                     	ADDRESS;

  FROM DVIReader IMPORT 
                        	fontinfoptr;

  EXPORT QUALIFIED
         	InitFontReader, BuildFontSpec, OpenFontFile, CloseFontFile;


  PROCEDURE InitFontReader;
(* Use the /FONT_DIRECTORY and /DUMMY_FONT values to assign appropriate
   routines to the above procedure variables, and to decide on the format
   of file specifications created by BuildFontSpec.
*)

  PROCEDURE BuildFontSpec (fontptr : fontinfoptr);
(* Build a complete file specification in fontptr^.fontspec.
   This will only be done once per font; fontspeclen will no longer be 0.
   fontptr^.fontexists becomes TRUE if the file can be found.
*)

  PROCEDURE PKBuildFontSpec (fontptr : fontinfoptr);
(* Build a complete PK font file specification in fontptr^.fontspec.
   This will only be done once per font; fontspeclen will no longer be 0.
   fontptr^.fontexists becomes TRUE if the file can be found.
*)

  PROCEDURE PXLBuildFontSpec (fontptr : fontinfoptr);
(* Build a complete PXL font file specification in fontptr^.fontspec.
   This will only be done once per font; fontspeclen will no longer be 0.
   fontptr^.fontexists becomes TRUE if the file can be found.
*)

  PROCEDURE OpenFontFile (VAR filespec : ARRAY OF CHAR) : BOOLEAN;
(* Return TRUE if given font file is successfully opened.
   The value of filespec is not changed; it is declared a VAR parameter
   for efficiency reasons.
*)

  PROCEDURE CloseFontFile;
(* Close the currently open font file. *)

END FontReader.
