<> <> <> <> <<>> DIRECTORY RefText USING [Append, New], Rope USING [ROPE], RopeInline USING [InlineFlatten], Font USING [CreateScaled], VFonts; VFontsImpl: CEDAR MONITOR IMPORTS Font, RefText, RopeInline EXPORTS VFonts = BEGIN prefix: REF TEXT = "Xerox/PressFonts/"; postfix: REF TEXT _ "/MRR"; scratch: REF TEXT _ RefText.New[100]; EstablishFont: PUBLIC ENTRY PROC [family: Rope.ROPE, size: CARDINAL, bold, italic: BOOL _ FALSE, defaultOnFailure: BOOL _ TRUE] RETURNS [VFonts.FONT] = BEGIN scratch.length _ prefix.length; TRUSTED {RefText.Append[scratch, LOOPHOLE[RopeInline.InlineFlatten[family]]]}; postfix[1] _ IF bold THEN 'B ELSE 'M; postfix[2] _ IF italic THEN 'I ELSE 'R; RefText.Append[scratch, postfix]; RETURN[Font.CreateScaled[scratch, size, $Screen]]; END; defaultFont: PUBLIC VFonts.FONT; RefText.Append[scratch, prefix]; defaultFont _ EstablishFont["Tioga", 10]; END.