UFFontDirReader:
CEDAR DEFINITIONS =
BEGIN
Key: TYPE = UnifiedFonts.Key;
GraphicsType: TYPE = {none, press, sd, strike};
DeviceType: TYPE = UnifiedFonts.DeviceType;
ROPE: TYPE = Rope.ROPE;
ExamineProc:
TYPE =
PROCEDURE [
candidateFontName: REF READONLY TEXT,
candidateSize, candidateMaxSize, candidateMinSize: REAL,
candidateRotation: REAL,
candidateDeviceType: DeviceType
] RETURNS [match: BOOLEAN ← FALSE];
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: BOOLEAN ← TRUE];
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.