(* PSWriter routines are used by PSDVI to create the PostScript output file. The following calling sequence is largely determined by the PostScript definitions that must be prepended to the output: OpenOutput if -h used then OutputHeader for each page selected do BeginPage if not conserving VM then for each new bitmap font do NewBitmapFont for each bitmap font used on this page do BeginBitmapFont for each new character do LoadBitmap end end OutputPage for each \special on this page do OutputSpecial for each font used on this page do if (conserving VM) and (not PostScript font) then SaveVM if PostScript font then BeginPostScriptFont else BeginBitmapFont if (conserving VM) and (not PostScript font) then for each character used do LoadBitmap end if PostScript font then for each character used do SetPostScriptChar else for each character used do SetBitmapChar end EndFont if (conserving VM) and (not PostScript font) then RestoreVM end for each rule on this page do SetRule EndPage end CloseOutput *) VAR PSfile : text; (* LoadBitmap routine in FontReader requires access to output file to write out PostScript char definitions. *) FUNCTION OpenOutput (name : string) : BOOLEAN; EXTERNAL; FUNCTION OutputHeader (name : string) : BOOLEAN; EXTERNAL; PROCEDURE BeginPage (DVIpage : INTEGER); EXTERNAL; PROCEDURE NewBitmapFont (VAR fontid : string); EXTERNAL; PROCEDURE OutputPage (DVIpage : INTEGER); EXTERNAL; FUNCTION OutputSpecial (VAR name : string; hpos, vpos : INTEGER) : BOOLEAN; EXTERNAL; PROCEDURE SaveVM (VAR fontid : string); EXTERNAL; PROCEDURE BeginBitmapFont (VAR fontid : string); EXTERNAL; PROCEDURE BeginPostScriptFont (VAR fontname : string; scaledsize, mag : INTEGER); EXTERNAL; PROCEDURE SetBitmapChar (ch : CHAR; hpos, vpos, pwidth : INTEGER); EXTERNAL; PROCEDURE SetPostScriptChar (ch : CHAR; hpos, vpos, pwidth : INTEGER); EXTERNAL; PROCEDURE EndFont; EXTERNAL; PROCEDURE RestoreVM; EXTERNAL; PROCEDURE SetRule (wd, ht, hpos, vpos : INTEGER); EXTERNAL; PROCEDURE EndPage (DVIpage : INTEGER); EXTERNAL; PROCEDURE CloseOutput; EXTERNAL;