DIRECTORY Atom USING [PropList], Basics USING [BYTE], ImagerTransformation USING [Transformation], Rope USING [ROPE], Vector2 USING [VEC]; ImagerFont: CEDAR DEFINITIONS ~ BEGIN BYTE: TYPE ~ Basics.BYTE; ROPE: TYPE ~ Rope.ROPE; VEC: TYPE ~ Vector2.VEC; Transformation: TYPE ~ ImagerTransformation.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 [ name: ROPE, -- universal name of the font (see Interpress section 4.9.1) charToClient: Transformation, -- transforms from character to client coordinates impl: REF FontImplRep, -- private implementation data propList: Atom.PropList _ NIL ]; FontImplRep: TYPE; -- see ImagerFontPrivate Find: PROC [name: ROPE] RETURNS [Font]; Modify: PROC [font: Font, m: Transformation] RETURNS [Font]; Scale: PROC [font: Font, s: REAL] RETURNS [Font]; Extents: TYPE ~ RECORD [leftExtent, rightExtent, descent, ascent: REAL]; CorrectionType: TYPE ~ MACHINE DEPENDENT {none(0), space(1), mask(2), (3)}; Contains: PROC [font: Font, char: XChar] RETURNS [BOOL]; NextChar: PROC [font: Font, char: XChar] RETURNS [next: XChar]; Width: 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]; 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]; StringWidth: PROC [font: Font, string: XStringProc] RETURNS [VEC]; RopeWidth: PROC [font: Font, rope: ROPE, start: INT _ 0, len: INT _ INT.LAST] RETURNS [VEC]; TextWidth: 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. ΜImagerFont.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Michael Plass, July 31, 1984 10:58:40 am PDT Doug Wyatt, April 15, 1985 1:55:09 pm PST Xerox characters and strings An XChar is a 16-bit Xerox character code. See the Xerox Character Code Standard. These assume the Xerox string encoding; they treat '\377 as an escape code. See the Xerox Character Code Standard, section 6, and the Interpress Standard, section 2.5.3. Fonts Find the font with the given hierarchical name. It's safe to use RefText.TrustTextAsRope for the name. Modify a font by post-concatenating the given transformation. Equivalent to Modify[font, ImagerTransformation.Scale[s]]. Metrics Returns TRUE iff the character exists in the font. Returns next char in the font, or nullXChar. Call with nullXChar to get first char in font. Returns width vector for the character. Returns TRUE iff the character is an 'amplifying' character. Returns the type of correction, if any, for the character. Returns a true bounding box for the character mask (not necessarily as tight as possible). Returns a bounding box for all character bounding boxes superimposed. Returns kerning adjustment between char and successor, or [0, 0]. Returns next successor that kerns with char. Call with successor=nullXChar to get first one. Returns a ligature formed from char and successor, or nullXChar. Returns next successor that has a ligature with char, Call with successor=nullXChar to get first one. Κτ˜codešœ™Kšœ Οmœ1™KšœZ™ZK˜—š œžœžœ ˜5KšœE™EK˜—K˜š œžœ&žœžœ˜>K™AK˜—š œžœ&žœ ˜DKšœ,™,Kšœ/™/K˜—š œžœ&žœ ˜DKšœ@™@K˜—š  œžœ&žœ ˜HKšœ5™5Kšœ/™/K˜—K˜š  œžœ#žœžœ˜BK˜—š  œžœžœ žœ žœžœžœžœžœ˜]K˜—š  œžœžœžœžœ žœ žœžœžœžœžœ˜jK˜—K˜š œžœ#žœ ˜LK˜—š œžœžœ žœ žœžœžœžœ ˜gK˜—š œžœžœžœžœ žœ žœžœžœžœ ˜tK˜——K˜Kšžœ˜—…— @