blob: 43806cb203be52dfc2d3ae12a25d4e50d1f7f134 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
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.
|