[comp.text] Need Ditroff for Matrix Printers

jantypas@hope.UUCP (John Antypas) (05/31/88)

I know we've all seen this before, but I still need a ditroff post
processor for a matrix printer (Epson Fx8{0/5} type.) I know -- why would 
anyone want a matrix printer for this!  (People keep asking it over and over!)
Well:

	o While I have access to a laser printer, it's not hooked to my
          my computer and doesn't understand ditroff anyway.
	o Pic and neqn are much happier with Ditroff than nroff anyway.
	o My printer just happens to have (along with nearly every other
	  one these days) more than just bold, italics, and underline.

I know the printted output will look slightly rough but it makes a good
preview device before it goes to the laser printer.  Besides, how hard could
it be?  Simply make a bitmap (186k) of the page and print it.  (I already 
have the graphics routines.)  It won't be hard if:

	o I can get ahold of makedev code.
	o Someone can explain some font standard I can use freely like
	  hershey or something.

Anyone have any ideas at least?


John Antypas -- Soft21 --21st Century Software:

UUCP: {buita|garp|killer|pyramid|reed|sdeggo|ucsd!ucrmath|uport}!soft21!jantypas
Internet: jantypas%soft21.uucp@{garp.MIT.EDU, ucsd.EDU} BITNET: jantypas@ucrvms

mikew@foobar.hf.intel.com (Mike Wright) (06/02/88)

From article <281@ucrmath.UUCP>, by jantypas@hope.UUCP (John Antypas):
> I know we've all seen this before, but I still need a ditroff post
> processor for a matrix printer (Epson Fx8{0/5} type.) I know -- why would 
> anyone want a matrix printer for this!  (People keep asking it over and over!)
> Well:
[ much stuff deleted]
> 
> John Antypas -- Soft21 --21st Century Software:
> 
> UUCP: {buita|garp|killer|pyramid|reed|sdeggo|ucsd!ucrmath|uport}!soft21!jantypas
> Internet: jantypas%soft21.uucp@{garp.MIT.EDU, ucsd.EDU} BITNET: jantypas@ucrvms

If you are interested, I have written just such a beast.

It takes ditroff output and makes page images for an Epson [RF]X-80. It
could probably be changed quite easily for other dot-matrix printers.

If anyone wants a copy - please let me know and I can arrange to send it
to you. Please be aware that it is quite slow and produces ENOURMOUS 
amounts of output - but it does look amazingly nice if I say so myself.


-- 
-mikew (Mike Wright, (503)696-7281, Intel Corp; Hillsboro OR)
 ...tektronix!psu-cs!                 \
 ...uunet!vrdxhq!verdix!omepd!littlei! > foobar!semike!mikew
 ...reed!littlei!                     /

littauer@amdahl.uts.amdahl.com (Tom Littauer) (06/04/88)

In article <196@semike.foobar.hf.intel.com> mikew@foobar.hf.intel.com (Mike Wright) writes:
 >From article <281@ucrmath.UUCP>, by jantypas@hope.UUCP (John Antypas):
 >> I know we've all seen this before, but I still need a ditroff post
 >> processor for a matrix printer (Epson Fx8{0/5} type.)uld
 >[ much stuff deleted]

 >If you are interested, I have written just such a beast.

I have one too, but I suggest trying Mike's first. It's not that I know
anything about his, but I don't think mine has been shaken down enough
yet. Details follow.

 >It takes ditroff output and makes page images for an Epson [RF]X-80. It
 >could probably be changed quite easily for other dot-matrix printers.
 >
 >If anyone wants a copy - please let me know and I can arrange to send it
 >to you. Please be aware that it is quite slow and produces ENOURMOUS 
 >amounts of output - but it does look amazingly nice if I say so myself.
 >
 >
 >-- 
 >-mikew (Mike Wright, (503)696-7281, Intel Corp; Hillsboro OR)
 > ...tektronix!psu-cs!                 \
 > ...uunet!vrdxhq!verdix!omepd!littlei! > foobar!semike!mikew
 > ...reed!littlei!                     /

From article <281@ucrmath.UUCP>, by jantypas@hope.UUCP (John Antypas):
> I know we've all seen this before, but I still need a ditroff post
> processor for a matrix printer (Epson Fx8{0/5} type.)uld

I have one for the Fujitsu DL2600 (said to be compatible with these,
but with a few quirks), *BUT* it's not really in postable form.
When I started work on it I intended to create a generalized facility
but when I got my printer working I got distracted by other tasks.

 >I know the printted output will look slightly rough but it makes a good
 >preview device before it goes to the laser printer.  Besides, how hard could
 >it be?  Simply make a bitmap (186k) of the page and print it.  (I already 
 >have the graphics routines.)  It won't be hard if:

At 180 dpi it looks OK and is fine for overhead foils - I've used it
to produce theatre programs by reduction in a copier. A full-size
bitmap is closer to 375K at 180 dpi, so you need to cope with
segmentation. Font tables eat space, and Hershey-vector to bitmap
algorithms (scaled) take time so optimizations are needed there, too.

 >	o I can get ahold of makedev code.

Somebody just posted this.

 >	o Someone can explain some font standard I can use freely like
 >	  hershey or something.

Hershey format is, uh, quaint. There are several sizes of character and
differing conventions about where the baseline is. I ended up rescaling
all of them and putting in an index so I could seek to the character I
needed.

As I implemented it, my ditroff filter supports as many fonts as you
can talk ditroff into taking, in as many sizes as you can talk ditroff
into taking. Drawing codes for lines and circles are supported, but
I didn't get around to ellipses or splines. I also built a program to
build the tables used as input to makedev. All the basic character
sets in the Occidental Hershey fonts have descriptor tables built
(2 flavors of script, Bold, Italic, Greek, Roman, Swiss, Old English,
Fractur aka Old German, Old Italian, etc.) as well as a start on the
Special Character font.

The more complicated your pages are, the more memory you need
(allocated dynamically) and a hard disk is a practical requirement.
I've put in a few optimizations but it's still not fast. More
optimizations are left, including pseudo-virtual memory for the
page buffer, support of printer fonts, and font cacheing (I don't
think I've put that in yet - I'm not posting from the machine I have
the code on). By the way, don't trust my speed judgements... when you
run UNIX on a mainframe your time sense gets warped.

If there's someone out there who needs this in alpha-test mode
(guaranteed to be buggy) and is interested in carrying the
project forward, please send email.
-- 
UUCP:  littauer@amdahl.amdahl.com
  or:  {sun,decwrl,hplabs,pyramid,ihnp4,ames,uunet,cbosgd}!amdahl!littauer
DDD:   (408) 737-5056 [after 5/1 - until then, (408) 982-0880]
USPS:  Amdahl Corp.  M/S 330,  1250 E. Arques Av,  Sunnyvale, CA 94086

I'll tell you when I'm giving you the party line. The rest of the time
it's my very own ravings (accept no substitutes).