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. Revised: December, 1986 - GetBitmap is now called LoadBitmap and is used by PSDVI to send the PostScript code representing the bitmap and metric information for a given character from a given font. *) FROM DVIReader IMPORT fontinfoptr; VAR FillPixelTable : PROC; (* Fill currfont^.pixelptr with info from the currently open font file. *) LoadBitmap : PROCEDURE (fontinfoptr, (* for currently open font *) CARDINAL); (* char code *) (* Download PostScript bitmap and metrics for the given character using raster info at mapadr in the currently open font file. *) 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; VAR firstn, lastn : CARDINAL); (* Build a complete file specification in fontptr^.fontspec and return the starting and ending positions of the font size substring. 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.