<> <> <> <> <<>> DIRECTORY ImagerTransformation USING [Transformation], Prop USING [PropList], Rope USING [ROPE], Vector2 USING [VEC]; ImagerFont: CEDAR DEFINITIONS ~ BEGIN ROPE: TYPE ~ Rope.ROPE; VEC: TYPE ~ Vector2.VEC; Transformation: TYPE ~ ImagerTransformation.Transformation; Font: TYPE ~ REF FontRep; FontRep: TYPE ~ RECORD[ class: Class, data: REF, name: ROPE, charToClient: Transformation, props: Prop.PropList ]; Class: TYPE ~ REF ClassRep; ClassRep: TYPE ~ RECORD[ Modify: PROC[font: Font, m: Transformation] RETURNS[Font], Contains: PROC[font: Font, char: Char] RETURNS[BOOL], NextChar: PROC[font: Font, char: Char] RETURNS[next: Char], Width: PROC[font: Font, char: Char] RETURNS[VEC], Amplified: PROC[font: Font, char: Char] RETURNS[BOOL], Correction: PROC[font: Font, char: Char] RETURNS[CorrectionType], BoundingBox: PROC[font: Font, char: Char] RETURNS[Extents], Ligature: PROC[font: Font, char, successor: Char] RETURNS[Char], NextLigature: PROC[font: Font, char, successor: Char] RETURNS[Char], Kern: PROC[font: Font, char, successor: Char] RETURNS[VEC], NextKern: PROC[font: Font, char, successor: Char] RETURNS[Char], CharInfo: PROC[font: Font, char: Char, key: ATOM] RETURNS[OptionalReal], MaskChar: PROC[font: Font, char: Char, imager: REF -- Imager.Context --] ]; Char: TYPE ~ CARDINAL; nullChar: Char ~ CARDINAL.LAST; CharSet: TYPE ~ [0..377B]; CorrectionType: TYPE ~ {none, space, mask}; Extents: TYPE ~ RECORD[leftExtent, rightExtent, descent, ascent: REAL]; OptionalReal: TYPE ~ RECORD[exists: BOOL, value: REAL]; Find: PROC[name: ROPE] RETURNS[Font]; <> <> <<>> Modify: PROC[font: Font, m: Transformation] RETURNS[Font]; <> Scale: PROC[font: Font, s: REAL] RETURNS[Font]; <> Contains: PROC[font: Font, char: Char] RETURNS[BOOL]; <> NextChar: PROC[font: Font, char: Char] RETURNS[next: Char]; <> <> BoundingBox: PROC[font: Font, char: Char] RETURNS[Extents]; <> Width: PROC[font: Font, char: Char] RETURNS[VEC]; Amplified: PROC[font: Font, char: Char] RETURNS[BOOL]; Correction: PROC[font: Font, char: Char] RETURNS[CorrectionType]; Kern: PROC[font: Font, char, successor: Char] RETURNS[VEC]; <> NextKern: PROC[font: Font, char, successor: Char] RETURNS[Char]; <> <> Ligature: PROC[font: Font, char, successor: Char] RETURNS[Char]; <> NextLigature: PROC[font: Font, char, successor: Char] RETURNS[Char]; <> <> CharInfo: PROC[font: Font, char: Char, key: ATOM] RETURNS[OptionalReal]; <> <<>> MaskChar: PROC[font: Font, char: Char, imager: REF -- Imager.Context --]; <> <<>> PutProp: PROC[font: Font, key: REF, value: REF]; GetProp: PROC[font: Font, key: REF] RETURNS[value: REF]; <> MapRope: PROC[action: PROC[Char], rope: ROPE, start: INT _ 0, len: INT _ INT.LAST, set: CharSet _ 0]; MapText: PROC[action: PROC[Char], text: REF READONLY TEXT, start: NAT _ 0, len: NAT _ NAT.LAST, set: CharSet _ 0]; CharWidth: PROC[font: Font, char: CHAR, set: CharSet _ 0] RETURNS[VEC]; RopeWidth: PROC[font: Font, rope: ROPE, start: INT _ 0, len: INT _ INT.LAST, set: CharSet _ 0] RETURNS[VEC]; TextWidth: PROC[font: Font, text: REF READONLY TEXT, start: NAT _ 0, len: NAT _ NAT.LAST, set: CharSet _ 0] RETURNS[VEC]; <> <<>> CharBoundingBox: PROC[font: Font, char: CHAR, set: CharSet _ 0] RETURNS[Extents]; RopeBoundingBox: PROC[font: Font, rope: ROPE, start: INT _ 0, len: INT _ INT.LAST, set: CharSet _ 0] RETURNS[Extents]; TextBoundingBox: PROC[font: Font, text: REF READONLY TEXT, start: NAT _ 0, len: NAT _ NAT.LAST, set: CharSet _ 0] RETURNS[Extents]; <<>> Register: PROC[name: ROPE, file: ROPE, create: PROC[ROPE] RETURNS[Font]]; <> <<>> Alias: PROC[alias: ROPE, for: ROPE]; <> <<>> END.