UFFontDirReader.mesa
Written January 14, 1983 1:53 pm
Last edited by Michael Plass, January 20, 1983 3:07 pm
Last edited by Doug Wyatt, September 30, 1983 6:16 pm
DIRECTORY
Font USING [Key],
Rope USING [ROPE];
UFFontDirReader: CEDAR DEFINITIONS =
BEGIN
Key: TYPE = Font.Key;
GraphicsType: TYPE = {none, press, sd, strike};
DeviceType: TYPE = ATOM;
ROPE: TYPE = Rope.ROPE;
ExamineProc: TYPE = PROCEDURE [
candidateFontName: REF READONLY TEXT,
candidateSize, candidateMaxSize, candidateMinSize: REAL,
candidateRotation: REAL,
candidateDeviceType: DeviceType
] RETURNS [match: BOOLEANFALSE];
ResultProc: TYPE = PROCEDURE [
candidateFontName: REF READONLY TEXT,
candidateSize, candidateMaxSize, candidateMinSize: REAL,
candidateRotation: REAL,
candidateDeviceType: DeviceType,
codeScheme: Key,
metricsType: ATOM, metricsName: Key,
graphicsType: ATOM, graphicsName: Key
] RETURNS [quit: BOOLEANTRUE];
EnumerateFontDirectory: PROCEDURE [fontDirectoryName: ROPE, examine: ExamineProc, result: ResultProc];
The examine procedure is called for each entry in the font directory; when a match is found, the result procedure is called, and it has the option of quitting or continuing the search through the font directory. The REF TEXT passed to the examine procedure do not change through the call to the result procedure, so they may be held on to for that long; however they will be subsequently re-used, so don't depend on them after the result proc exits.
END.