% AMSMODES.MF % This file can be loaded after PLAIN.MF. % It introduces conventions that were commonly used at WAITS and % may still be commonly used at AMS. % (I combined two files on AMS's public directory --- don.) base_version:=base_version&"/AMS"; % We make the following modification of "mode_def" from PLAIN in order % to accommodate modes not preloaded in MF. Even though mode had been % set dependently on the command line (as with mode=talaris), when % mode_def came along to define "talaris" the assignment operator % (:=) wiped out that dependency and left mode hanging and undefined % when mode_setup was called. We simply add a test to see whether % "mode" has been set to the mode being defined. % Furthermore, if mode was set to a mode which was preloaded and % that mode was re-defined at run-time, the value of mode would % only pick up the old definition. So, for the other case, % that the mode being defined already has a numeric realization, % we avoid redefining that mode's (behind-the-scenes) value. % We also add the following macros to enable conditional "and" % and "or". See The METAFONTbook, pp.288--289. def cand(text q) = startif true q else: false fi enddef; def cor(text q) = startif true true else: q fi enddef; tertiarydef p startif true = if p: enddef; def mode_def suffix $ = if known($) cand (numeric $ cand ($=n: n-1 else: length(s) fi: l for k:=1 upto l: , substring (k-1,k) of s endfor for k:=l+2 upto n: , 0 endfor endfor enddef; Xerox_world:=1; % users can say `if known Xerox_world:...fi' inner end; def bye= if fontmaking>0: font_family font_identifier_; coding_scheme font_coding_scheme_; font_face_byte max(0,254-round 2designsize); fi tracingstats:=1; % at least for now we want this end enddef; outer bye,end;