laser-lovers@uw-beaver (03/29/85)
From: Brian Reid <reid@Glacier>
Well, it is spring break here at Stanford, and it's the first chance
I've had to do any programming in a long time. I've occupied myself by
getting my LaserWriter printing Press files, and hacking up the Scribe
database to take advantage of things that the LaserWriter can do.
[Note: Unilogic tells me that there is now LaserWriter support in Scribe
available directly from them, but in the past it has taken about two
years to get new releases of Scribe to Stanford from Unilogic, and I don't
really feel like waiting two years. So I've hacked it up another way.]
I will happily make this code available to anybody who wants it, but it
won't do you any good unless you both have TranScript (from Adobe) and
also have some way of making Press files.
I won't go into gory details about how it all works, but here are the
key ingredients. This is all 4.2BSD mechanism, but it could be made to
work (with a lot less automation) on any machine with a C compiler.
* I modified the Adobe-provided "psif" filter (part of Transcript) to
recognize that a file it has been asked to print is a press file
(by checking the press password at the end of the file). If it is
a press file, then psif forks the "pps" program (see below), and
then diddles its file descriptors so that it reads its input from pps
instead of from its original input file. The output of psif is still
the LaserWriter.
* We (Andy and I) hacked up a version of the press "fonts.widths" file
that uses Adobe font metrics (distributed in the *.afm files as part
of TranScript) instead of Xerox font metrics.
* I took the "pps" program (which Andy Shore wrote as a programming
project at Stanford), and modified it somewhat to make it work as a
print filter. I also modified pps to recognize that an incoming
press file has Xerox font metrics instead of Adobe font metrics,
and to do a limited amount of conversion and adjustment.
With those changes, I can now spool press files directly to my
LaserWriter, using the Unix "lpr" command (or the Tops-20 "LPR" program
that Greg Satz wrote to emulate it). It also gives me a VASTLY larger
array of font sizes for my Scribe files, allowing tricks like shrinking
the size of a subscript in X sub Y sub Z to keep working indefinitely,
and also making regular font families from 6 point through 36 point
available with the Scribe @Style command.
I am still working on the following changes:
* Merge the Adobe-metric version of fonts.widths into Stanford's
master version, so that there will be only one fonts.widths version
floating around campus. In anticipation of this, I have renamed the
Adobe-metric font.widths entries "cymbal" (for symbol) and
"helvetika" (for helvetica) (Xerox press printers have a font that
looks a lot like real Helvetica, but they use the actual name
"Helvetica" for it, even though the font is not quite the same.
Since I don't want to break any of the existing programs that use
the Xerox-metric version of Helvetica, I have renamed the real
version (Adobe's is licensed from Allied) instead of the fake version.
* Hack up the Unix "eftp" program, originally written by John Seamons,
to listen for PUP RFC's on the appropriate Ethernet socket, and
fork "lpr" when it receives a file. This will allow the Xerox PUP
printing protocols, such as that used to print on Dovers, to print
on the LaserWriter. I am running (very experimentally--Stanford
people who read this, please don't try it!!!) an EFTP server daemon
on Glacier (my 4.2BSD Vax), which essentially emulates a Press
printer whose name is "Glacier".
When these things are in place, it will allow the following games:
- Use the Bravo "h" (hardcopy) command to print a Bravo-generated file
on the LaserWriter.
- Use the "dover" command on our non-Unix computers to print Scribe-
generated Press files.
- Print press files generated by Alto Draw.
I don't yet have a mechanism for handling the raster-encoded fonts that
TeX uses, so I can't print TeX-generated press files this way. I also
don't yet have Bruce Lucas' ReDraw fonts or the Arrows font,
so I can't print TOPS-20 PLOT-generated press files or SIL files.
My next LaserWriter programming project (it might have to wait until
summer) will be to write another print filter that performs this same
trick with Imagen ImPress-format files. At this point, people will be
able to just say
lpr -Pdelicious file.name
to print "file.name" on my printer (named "delicious") without knowing
or caring what print format the file is in. I like that.
Brian Reid decwrl!glacier!reid
Stanford reid@SU-Glacier.ARPA