<> <> <> <> <<>> DIRECTORY Basics USING [BYTE], IIBox USING [Extents], IITransformation USING [Transformation], Rope USING [ROPE], Vector2 USING [VEC]; IIFont: CEDAR DEFINITIONS ~ BEGIN BYTE: TYPE ~ Basics.BYTE; ROPE: TYPE ~ Rope.ROPE; VEC: TYPE ~ Vector2.VEC; Transformation: TYPE ~ IITransformation.Transformation; <> XChar: TYPE ~ MACHINE DEPENDENT RECORD [set: BYTE, code: BYTE]; nullXChar: XChar ~ [377B, 377B]; <> <<>> XCharProc: TYPE ~ PROC [char: XChar]; XStringProc: TYPE ~ PROC [charAction: XCharProc]; MapRope: PROC [rope: ROPE, start: INT _ 0, len: INT _ INT.LAST, charAction: XCharProc]; MapText: PROC [text: REF READONLY TEXT, start: NAT _ 0, len: NAT _ NAT.LAST, charAction: XCharProc]; <> <> <> <> <<>> Font: TYPE ~ REF FontRep; FontRep: TYPE ~ RECORD [ charToClient: Transformation, -- transforms from character to client coordinates typeface: Typeface -- the data and class for the untransformed font ]; Typeface: TYPE ~ REF TypefaceRep; TypefaceRep: TYPE; -- see IITypeface Find: PROC [name: ROPE] RETURNS [Font]; <> <> <<>> Modify: PROC [font: Font, m: Transformation] RETURNS [Font]; <> Scale: PROC [font: Font, s: REAL] RETURNS [Font]; <> <<>> FindScaled: PROC [name: ROPE, s: REAL] RETURNS [Font]; <> <<>> <> Extents: TYPE ~ IIBox.Extents; -- RECORD [leftExtent, rightExtent, descent, ascent: REAL] CorrectionType: TYPE ~ MACHINE DEPENDENT {mask(0), space(1), none(2), (3)}; Contains: PROC [font: Font, char: XChar] RETURNS [BOOL]; <> NextChar: PROC [font: Font, char: XChar] RETURNS [next: XChar]; <> <> Escapement: PROC [font: Font, char: XChar] RETURNS [VEC]; <> Amplified: PROC [font: Font, char: XChar] RETURNS [BOOL]; <> Correction: PROC [font: Font, char: XChar] RETURNS [CorrectionType]; <> BoundingBox: PROC [font: Font, char: XChar] RETURNS [Extents]; <> FontBoundingBox: PROC [font: Font] RETURNS [Extents]; <> Name: PROC [font: Font] RETURNS [ROPE]; <> Kern: PROC [font: Font, char, successor: XChar] RETURNS [VEC]; <> NextKern: PROC [font: Font, char, successor: XChar] RETURNS [XChar]; <> <> Ligature: PROC [font: Font, char, successor: XChar] RETURNS [XChar]; <> NextLigature: PROC [font: Font, char, successor: XChar] RETURNS [XChar]; <> <> StringEscapement: PROC [font: Font, string: XStringProc] RETURNS [VEC]; RopeEscapement: PROC [font: Font, rope: ROPE, start: INT _ 0, len: INT _ INT.LAST] RETURNS [VEC]; TextEscapement: PROC [font: Font, text: REF READONLY TEXT, start: NAT _ 0, len: NAT _ NAT.LAST] RETURNS [VEC]; StringBoundingBox: PROC [font: Font, string: XStringProc] RETURNS [Extents]; RopeBoundingBox: PROC [font: Font, rope: ROPE, start: INT _ 0, len: INT _ INT.LAST] RETURNS [Extents]; TextBoundingBox: PROC [font: Font, text: REF READONLY TEXT, start: NAT _ 0, len: NAT _ NAT.LAST] RETURNS [Extents]; END.