DIRECTORY UFont USING [Key], ImagerPath USING [PathProc], ImagerPixelArrays USING [PixelArray], Rope USING [ROPE]; UFPressFontReader: CEDAR DEFINITIONS = BEGIN ROPE: TYPE = Rope.ROPE; Key: TYPE = UFont.Key; FontKey: TYPE = RECORD [fileKey: Key, fontIndex: NAT _ 0]; CharShapeRepresentation: TYPE = {raster, outline, widthsOnly}; Error: SIGNAL[errorCode: ErrorCode, fontFileWordOffset: INT]; ErrorCode: TYPE = {fileNotFound, fontIndexTooLong, cantHappen, dataSegmentTooLong, invalidPointerInFile, consistencyCheck, fileHasBeenClosed, wrongFontFormatForThisOperation, invalidCodeInFile}; NumberOfFontsInFile: PROCEDURE [fileKey: Key] RETURNS [NAT]; Family: PROCEDURE [fontKey: FontKey] RETURNS [family: ROPE]; Face: PROCEDURE [fontKey: FontKey] RETURNS [face: [0..256)]; Range: PROCEDURE [fontKey: FontKey] RETURNS [bc, ec: CHAR]; Size: PROCEDURE [fontKey: FontKey] RETURNS [size: REAL]; Rotation: PROCEDURE [fontKey: FontKey] RETURNS [degrees: REAL]; Representation: PROCEDURE [fontKey: FontKey] RETURNS [representation: CharShapeRepresentation]; Resolution: PROCEDURE [fontKey: FontKey] RETURNS [xRes, yRes: REAL]; GetCharInfo: PROCEDURE [fontKey: FontKey, char: CHAR] RETURNS [info: CharInfo]; CharInfo: TYPE = RECORD [ widthX, widthY: REAL, -- the width vector minX, minY: REAL, -- the lower left corner of the bounding box maxX, maxY: REAL -- the upper right corner of the bounding box ]; MoveToProc: TYPE = PROCEDURE [x, y: REAL]; LineToProc: TYPE = PROCEDURE [x, y: REAL]; CurveToProc: TYPE = PROCEDURE [x1, y1, x2, y2, x3, y3: REAL]; DrawAreaProc: TYPE = PROCEDURE; GetCharRaster: PROCEDURE [fontKey: FontKey, char: CHAR] RETURNS [ImagerPixelArrays.PixelArray]; GetCharOutline: PROCEDURE [ fontKey: FontKey, char: CHAR, moveToProc: MoveToProc, lineToProc: LineToProc, curveToProc: CurveToProc, drawAreaProc: DrawAreaProc ]; GetCharPath: PROCEDURE [ fontKey: FontKey, char: CHAR ] RETURNS [pathProc: ImagerPath.PathProc, pathData: REF]; END. TUFPressFontReader.mesa Copyright c 1983, 1984, Xerox Corporation. All rights reserved. Created January 17, 1983 2:07 pm Last edit by Michael Plass on February 14, 1984 2:19:03 pm PST Doug Wyatt, August 12, 1984 5:34:01 pm PDT in meters, or 0 for a scalable font in bits per inch; only useful for raster fonts All of the above dimensions are relative to the point size of the character, and are measured from the reference point of the character, with y increasing upwards and x increasing to the right. ERROR if Representation[fontKey] # raster ERROR if Representation[fontKey] # outline. ÊÞ˜šœ™Jšœ Ïmœ5™@Jšœ ™ Jšœ>™>Jšœ*™*—J˜šÏk ˜ Jšœžœ˜Jšœ žœ ˜Jšœžœ˜%Jšœžœžœ˜—Iunitšœžœž œ˜&Jšž˜Kšžœžœžœ˜Kšœžœ ˜Kšœ žœžœžœ˜:Kšœžœ!˜>Kšœžœ+žœ˜=Kšœ žœ³˜ÂKšÏnœž œžœžœ˜