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