DIRECTORY Basics, Imager USING [Context], ImagerFont, Rope USING [ROPE], Vector2 USING [VEC]; ImagerTypeface: CEDAR DEFINITIONS ~ BEGIN VEC: TYPE ~ Vector2.VEC; ROPE: TYPE ~ Rope.ROPE; BYTE: TYPE ~ Basics.BYTE; XChar: TYPE ~ ImagerFont.XChar; Version: TYPE ~ ImagerFont.Version; CorrectionType: TYPE ~ ImagerFont.CorrectionType; Extents: TYPE ~ ImagerFont.Extents; Typeface: TYPE ~ REF TypefaceRep; TypefaceRep: TYPE ~ RECORD [ class: TypefaceClass, data: REF ]; TypefaceClass: TYPE ~ REF TypefaceClassRep; TypefaceClassRep: TYPE ~ RECORD [ FullName: PROC [self: Typeface] RETURNS [ROPE], Contains: PROC [self: Typeface, char: XChar] RETURNS [BOOL], NextChar: PROC [self: Typeface, char: XChar] RETURNS [next: XChar], Escapement: PROC [self: Typeface, char: XChar] RETURNS [VEC], Amplified: PROC [self: Typeface, char: XChar] RETURNS [BOOL], Correction: PROC [self: Typeface, char: XChar] RETURNS [CorrectionType], BoundingBox: PROC [self: Typeface, char: XChar] RETURNS [Extents], FontBoundingBox: PROC [self: Typeface] RETURNS [Extents], Ligature: PROC [self: Typeface, char, successor: XChar] RETURNS [XChar], NextLigature: PROC [self: Typeface, char, successor: XChar] RETURNS [XChar], Kern: PROC [self: Typeface, char, successor: XChar] RETURNS [VEC], NextKern: PROC [self: Typeface, char, successor: XChar] RETURNS [XChar], Mask: PROC [self: Typeface, char: XChar, context: Imager.Context] ]; Masks: TYPE ~ REF MasksRep; MasksRep: TYPE ~ RECORD [ class: MasksClass, data: REF, name: ROPE, version: Version ]; MasksClass: TYPE ~ REF MasksClassRep; MasksClassRep: TYPE ~ RECORD [ type: ATOM, Mask: PROC [self: Masks, char: XChar, context: Imager.Context] ]; Creator: TYPE ~ REF CreatorRep; CreatorRep: TYPE ~ RECORD [ type: ATOM, -- $KS, $SD, etc.; matches version.representation MetricVersion: PROC [self: Creator, name: ROPE] RETURNS [Version], MaskVersion: PROC [self: Creator, name: ROPE] RETURNS [Version], NewTypeface: PROC [self: Creator, name: ROPE, version: Version] RETURNS [Typeface], NewMasks: PROC [self: Creator, name: ROPE, version: Version, typeface: Typeface] RETURNS [Masks], priority: INTEGER _ 0, data: REF ]; RegisterCreator: PROC [creator: Creator]; LookupVersions: PROC [name: ROPE] RETURNS [metricVersion, maskVersion: Version]; NewMetrics: PROC [name: ROPE, version: Version] RETURNS [Metrics]; NewMasks: PROC [name: ROPE, version: Version, metrics: Metrics] RETURNS [Masks]; END. ώImagerTypeface.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Doug Wyatt, November 11, 1985 4:47:33 pm PST Michael Plass, February 25, 1986 3:33:26 pm PST Path: PROC [self: Masks, char: XChar, moveTo: ImagerPath.MoveToProc, lineTo: ImagerPath.LineToProc, curveTo: ImagerPath.CurveToProc, conicTo: ImagerPath.ConicToProc, arcTo: ImagerPath.ArcToProc], The MetricVersion and MaskVersion procs of the registered creators are called in priority order, each getting a chance to claim the typeface by returning a non-null Version. In case of a priority clash, the last one registered is tried first. Only one creator of a given type is registered at any given time. Finds the version stamps for the metrics and masks with the given name. Κθ˜codešœ™Kšœ Οmœ1™K˜K˜—Kšœ žœžœ ˜šœ žœžœ˜JšœžœΟc1˜=Jšœžœžœžœ ˜BJšœ žœžœžœ ˜@Jšœ žœžœžœ ˜SJšœ žœžœ(žœ ˜aJšœ žœ˜Jšœž˜ Kšœ˜K˜—š œžœ˜)KšœΆ™ΆK™—š œžœžœžœ'˜PKšœG™GK™—š  œžœžœžœ ˜BK™—š œžœžœ&žœ ˜PK™—K˜Kšžœ˜—…— x^