-- FontDefs.mesa; edited by Sandman on June 30, 1980  11:00 AM
-- Copyright  Xerox Corporation 1979, 1980

DIRECTORY
  SegmentDefs USING [FileSegmentHandle];

FontDefs: DEFINITIONS =
  BEGIN

  BitmapState: TYPE = RECORD [origin: POINTER, wordsPerLine, x, y: [0..77777B]];

  FontObject: TYPE = RECORD [
    paintChar: PROCEDURE [FontHandle, CHARACTER, POINTER TO BitmapState],
    clearChar: PROCEDURE [FontHandle, CHARACTER, POINTER TO BitmapState],
    charWidth: PROCEDURE [FontHandle, CHARACTER] RETURNS [CARDINAL],
    charHeight: PROCEDURE [FontHandle, CHARACTER] RETURNS [CARDINAL],
    close: PROCEDURE [FontHandle],
    destroy: PROCEDURE [FontHandle],
    lock: PROCEDURE [FontHandle] RETURNS [POINTER],
    unlock: PROCEDURE [FontHandle]];

  FontHandle: TYPE = POINTER TO FontObject;

  CharWidth: PUBLIC PROCEDURE [font: FontHandle, char: CHARACTER]
    RETURNS [CARDINAL];
  CharHeight: PUBLIC PROCEDURE [font: FontHandle, char: CHARACTER]
    RETURNS [CARDINAL];
  CreateFont: PROCEDURE [SegmentDefs.FileSegmentHandle] RETURNS [FontHandle];

  END.