DIRECTORY BasicTime USING [GMT, nullGMT], IO USING [STREAM], Imager USING [Context], ImagerFont USING [CorrectionType, Extents, Font, Substitution, XChar], ImagerFontWorks USING [MapCharProc], ImagerMaskCache USING [CharMask, MakeCharMaskProc], ImagerTransformation USING [Transformation], Prop USING [PropList], Rope USING [ROPE], Vector2 USING [VEC]; ImagerTypeface: CEDAR DEFINITIONS ~ BEGIN VEC: TYPE ~ Vector2.VEC; ROPE: TYPE ~ Rope.ROPE; XChar: TYPE ~ ImagerFont.XChar; CorrectionType: TYPE ~ ImagerFont.CorrectionType; Extents: TYPE ~ ImagerFont.Extents; Font: TYPE ~ ImagerFont.Font; Transformation: TYPE ~ ImagerTransformation.Transformation; Typeface: TYPE ~ REF TypefaceRep; TypefaceRep: TYPE ~ RECORD [ class: TypefaceClass, data: REF, name: ROPE ¬ NIL, alternateMetrics: ROPE ¬ NIL, created: BasicTime.GMT ¬ BasicTime.nullGMT, info: InfoTable ¬ NIL, -- for character set 0 fontExtents: REF Extents ¬ NIL, propList: Prop.PropList ¬ NIL ]; TypefaceClass: TYPE ~ REF TypefaceClassRep; TypefaceClassRep: TYPE ~ RECORD [ type: ATOM, AlternateMetrics: PROC [self: Typeface, alternateMetrics: ROPE] RETURNS [Typeface], 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], MakeCharMask: ImagerMaskCache.MakeCharMaskProc ¬ NIL, MapChar: ImagerFontWorks.MapCharProc ¬ NIL, propList: Prop.PropList ¬ NIL ]; InfoTable: TYPE ~ REF InfoTableRep; InfoTableRep: TYPE ~ PACKED ARRAY BYTE OF Info; Info: TYPE ~ PACKED RECORD [ exists: BOOL ¬ FALSE, amplified: BOOL ¬ FALSE, correction: CorrectionType ¬ none, hasKerns: BOOL ¬ FALSE, hasLigatures: BOOL ¬ FALSE, spare1, spare2: BOOL ¬ FALSE ]; Version: TYPE ~ REF VersionRep; VersionRep: TYPE ~ RECORD [ createDate: BasicTime.GMT, -- for version checking against typeface.created type: ATOM -- for version checking against typeface.class.type ]; FindTypeface: PROC [name: ROPE, substitution: ImagerFont.Substitution, versionHint: Version ¬ NIL] RETURNS [Typeface]; SelectAlternateTypefaceMetrics: PROC [typeface: Typeface, alternateMetrics: ROPE] RETURNS [Typeface]; ReverseMetrics: PROC [typeface: Typeface] RETURNS [Typeface]; TypefaceFromFont: PROC [font: Font] RETURNS [Typeface]; MakeFont: PROC [typeface: Typeface, m: Transformation] RETURNS [Font]; MaskChar: PROC [font: Font, char: XChar, context: Imager.Context]; GeneralCaptureCharMask: ImagerMaskCache.MakeCharMaskProc; Creator: TYPE ~ REF CreatorRep; CreatorRep: TYPE ~ RECORD [proc: CreatorProc, data: REF]; CreatorProc: TYPE ~ PROC [self: Creator, name: ROPE, substitute: BOOL] RETURNS [Typeface]; RegisterCreator: PROC [creator: Creator, before: BOOL ¬ FALSE]; CreatorFromFileExtension: PROC [extension: ROPE, createProc: PROC [stream: IO.STREAM] RETURNS [Typeface]] RETURNS [Creator]; FlushTypefaceCaches: PROC; FlushFontCaches: PROC; SetSubstitutionFont: PROC [defaultFont: ROPE]; END. φ ImagerTypeface.mesa Copyright Σ 1985, 1986, 1987, 1989, 1990, 1991 by Xerox Corporation. All rights reserved. Michael Plass, June 5, 1991 5:23 pm PDT Doug Wyatt, January 19, 1987 6:03:30 pm PST This is considered to be a private interface, although it will be useful for certain clients that need to create new flavors of fonts and/or to get at the insides of fonts. Finds the typeface with the specified universal name. The versionHint is used by the FD typeface implementation to find a particular version. Makes a new Typeface with the named alternate metrics Makes a new Typeface with metrics for ShowBackward; there is no name, so it will not externalize properly. Pulls the Typeface from the font. Makes a font from the Typeface and a Transformation MaskChar: Moved to ImagerFontWorks Also provided here for compatibility; clients should migrate to ImagerFontWorks CaptureChar: Moved to ImagerFontWorks Implements typeface.class.MakeCharMask in terms of typeface.class.Mask; does not fill in font, char, escapement or flags (this is done in CaptureChar, which also selects the appropriate MakeCharMaskProc to use). The registered creators are called in order until one of them responds with a non-NIL typeface. They are each called with substitute~FALSE first, and if they all fail and if font substitution was requested, they are called again with substitute~TRUE. If before~TRUE, the creator is added to the front of the list of registered creators; otherwise it is added to the end. An aid for typeface implementations that are based on files with a particular extension. Flushes the caches held by the typeface implementation. Flushes the caches held by the font implementation. Sets the font to be used for substitution calls. Initialized to Modern in ImagerTypefaceImpl. Michael Plass, October 5, 1988 Incorporated changes from MasterBlaster Added: SetSubstitutionFont, MapCharWithHints, MapChar, HasMapChar Michael Plass, August 21, 1989 Removed: MapCharWithHints, MapChar, HasMapChar Added: MakeCharMask Κ%•NewlineDelimiter –(cedarcode) style™codešœ™Kšœ ΟeœO™ZK™'™+K™—KšœΟbœŠ™¬K™—šΟk ˜ Kšœ ŸœŸœ ˜KšŸœŸœŸœ˜KšœŸœ ˜Kšœ Ÿœ6˜FKšœŸœ˜$KšœŸœ˜3KšœŸœ˜,KšœŸœ ˜KšœŸœŸœ˜KšœŸœŸœ˜—K˜KšΠblœŸœŸ ˜!KšœŸ˜˜KšŸœŸœ Ÿœ˜KšŸœŸœŸœ˜K˜KšœŸœ˜KšœŸœ˜1Kšœ Ÿœ˜#KšœŸœ˜KšœŸœ'˜;K˜Kšœ ŸœŸœ ˜!šœ ŸœŸœ˜K˜KšœŸœ˜ KšœŸœŸœ˜KšœŸœŸœ˜KšœŸœ˜+KšœŸœΟc˜-Kšœ Ÿœ Ÿœ˜KšœŸ˜K˜K˜—KšœŸœŸœ˜+šœŸœŸœ˜"KšœŸœ˜ KšΟnœŸœ$ŸœŸœ ˜SKš’œŸœŸœŸœ˜Kšœ˜K˜—š ’ œŸœŸœ@ŸœŸœ ˜vK™5KšœW™WK™—š’œŸœ(ŸœŸœ ˜eKšœ5™5K™—š’œŸœŸœ ˜=Kšœj™jK˜—š’œŸœŸœ ˜7Kšœ!™!K™—š’œŸœ)Ÿœ˜FKšœ3™3K™—Kš’œ ’™"š’œŸœ4˜BKšœ@’™OK˜—š’ œ ’™%K™—š’œ#˜9KšœŠ’ œ>™ΣK˜—Kšœ ŸœŸœ ˜šœ ŸœŸœŸœ˜9K˜—š œ ŸœŸœŸœŸœŸœ ˜ZK˜—š’œŸœŸœŸœ˜?Kšœτ™τK˜—š’œŸœ ŸœŸœ Ÿ œŸœ Ÿœ ˜|K™XK˜—š’œŸœ˜K™7K˜—š’œŸœ˜K™3K˜—š’œŸœŸœ˜.Kšœ^™^—K˜—KšŸœ˜™K™'Kšœ’œ’œ’œ’ ™A—K™šœ™Kšœ ’œ’œ’ ™.Kšœ’ ™——…— τ