DIRECTORY Imager USING [Context], ImagerFont USING [XChar], IO USING [STREAM], Rope USING [ROPE], SymTab USING [Ref]; ImagerXCMap: CEDAR DEFINITIONS ~ BEGIN Map: TYPE ~ REF MapRep; MapRep: TYPE ~ ARRAY CHAR OF ImagerFont.XChar; Set: TYPE ~ MACHINE DEPENDENT { CS0 (0B), -- ASCII/ISO/CCITT Roman Alphabet and Punctuation JIS1 (041B), -- JIS Symbols 1 - Punctuation and Symbols not in CS0 JIS2 (042B), -- JIS Symbols 2 - Punctuation and Symbols not in CS0 ELA (043B), -- Extended Latin Alphabets JHS (044B), -- Japanese Hiragana Syllabary and Bo-po-mo-fo JKS (045B), -- Japanese Katakana Syllabary GR (046B), -- Greek Alphabet CY (047B), -- Cyrillic Alphabet FMC (050B), -- Form and Mosaic Characters MJS3 (164B), -- Symbols 3: Miscellaneous Japanese Symbols MJS4 (166B), -- Symbols 4: Miscellaneous Japanese Symbols AR (340B), -- Arabic Alphabet HE (341B), -- Hebrew Alphabet KH (343B), -- Korean Hangul GTS2 (356B), -- General and Technical Symbols 2 GTS1 (357B), -- General and Technical Symbols 1 LIG (360B), -- Ligatures and Field Format Symbols ALC (361B), -- Accented Latin Characters ARX (365B), -- Initial, Medial and Final Arabic Characters VRG (375B), -- Variant representations for Graphic Characters (377B)}; -- reserve 8 bits BPMF: Set = JHS; -- Chinese Bo-po-mo-fo (same as Japanese Hiragana Syllabary) XC: TYPE ~ RECORD [c: CHAR, set: Set, code: BYTE]; PartialMap: TYPE ~ LIST OF XC; PartialMaps: TYPE ~ LIST OF PartialMap; cs0Map: Map; -- defines the identity mapping CHAR -> [CS0, CHAR] maps: SymTab.Ref; -- holds the maps accessed through GetMap/GetFontMap FontMap: TYPE ~ LIST OF FontMapEntry; FontMapEntry: TYPE ~ RECORD [ inputName: Rope.ROPE, outputName: Rope.ROPE, map: Map, scale: REAL ¬ 1.0, -- necessary because Tioga fonts do not have the scale factor properly set warn: BOOL ¬ FALSE ]; ControlCharacterBug: SIGNAL [code: CHAR]; MakeMap: PROC [entriesList: PartialMaps, default: Map ¬ cs0Map] RETURNS [map: Map]; AddMap: PROC [family: Rope.ROPE, entriesList: PartialMaps, default: Map ¬ cs0Map]; GetFamilyMap: PROC [family: Rope.ROPE] RETURNS [map: Map]; GetFontMap: PROC [fontName: Rope.ROPE] RETURNS [map: Map]; tiogaToXC: FontMap; -- maps Tioga fonts to XC equivalents pressToXC: FontMap; -- maps Press fonts to XC equivalents tiogaAndPressToXC: FontMap; -- maps Tioga & Press fonts to XC equivalents FilterFonts: PROC [c: Imager.Context, fontMap: FontMap, msg: IO.STREAM, verbose: BOOL] RETURNS [context: Imager.Context]; END. : ImagerXCMap.mesa Copyright Σ 1987, 1992 by Xerox Corporation. All rights reserved. Jean-Marc Frailong February 1, 1988 1:45:25 pm PST Defines mappings from standard (???) Tioga character codes to XC1-2-2 codes. Provides a special font-mapping context. Building a map Build a map from partial maps. Raises ControlCharacterBug is one of the basic control characters is assigned in one of the partial maps. Access to map table Build a map from partial maps and add it to the table under the family name. Retrieve the mapping for specified family. If not found, return identity map to set 0 Retrieve the mapping for specified font. If not found, return identity map to set 0. All fonts of a same family have the same Map pointer Filtering imager context Create a new context that will do the specified font filtering ΚΈ•NewlineDelimiter –(cedarcode) style™codešœ™Kšœ Οeœ7™BK™2K™KšœL™LK™(K™—šΟk ˜ Kšœžœ ˜Kšœ žœ ˜Kšžœžœžœ˜Kšœžœžœ˜Kšœžœ˜—K˜KšΠbl œžœž ˜šœž˜K˜Kšœžœžœ˜š œžœžœžœžœ˜.K˜—šœžœžœž œ˜KšžœΟc1˜;Kšžœ  5˜BKšžœ  5˜BKšžœ  ˜'Kšžœ  .˜:Kšžœ  ˜*Kšžœ  ˜Kšžœ  ˜Kšžœ  ˜)Kšžœ  ,˜9Kšžœ  ,˜9Kšžœ  ˜Kšžœ  ˜Kšžœ  ˜Kšžœ  "˜/Kšžœ  "˜/Kšžœ  %˜1Kšžœ  ˜(Kšžœ  .˜:Kšžœ  1˜=Kšœ  ˜K˜—šžœžœ <˜MK˜—Kš žœžœžœžœžœ˜2Kš œ žœžœžœžœ˜šœ žœžœžœ ˜'K˜—šœ  3˜@K˜—šœ 4˜FK˜—Kšœ žœžœžœ˜%šœžœžœ˜Kšœžœ˜Kšœžœ˜Kšœ ˜ Kšœžœ J˜]Kšœžœž˜Kšœ˜——head™šΟnœžœžœ˜)K˜—š‘œžœ3žœ ˜SKšœˆ™ˆ——™š‘œžœžœ3˜RK™LK™—š‘ œžœžœžœ ˜:K™UK™—š‘ œžœžœžœ ˜:Kšœ‚Οb™‰——™Kšœ %˜9Kšœ %˜9šœ -˜IK˜—š ‘ œžœ,žœžœ žœžœ˜yK™>——K˜Kšžœ˜—…— €–