🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #2961

Re: Q: nroff character sizes

#2961
From: Chris Lewis
Date: Sun, 09 Jun 1991 01:26
51 lines
2812 bytes
In article <1889@vidiot.UUCP> brown@vidiot.UUCP (Vidiot) writes:
>In article <Jun.6.18.37.50.1991.13440@romulus.rutgers.edu> plona@romulus.rutgers.edu (Lawrence Plona) writes:

><   For kicks I have been trying to get nroff on my Xenix box
><to handle the proportional character mode on my dot-matrix
><printer.  I haven't had much luck in figuring out the nroff
><term variables.  I know what the documentation says but
><when does nroff use Char, Adj, Em, Hor, Ver and plot mode?

>You have to create a new nroff printer driver and set up all of the width
>tables for each and every character.  Believe me, it just isn't worth the
>trouble.

No kidding.  It can't be done, because nroff won't use them no matter
what you do.  Troff will, but then the big problem is that troff doesn't
emit ASCII.  There are ways of getting C/A/T troff, ditroff or groff to
talk to dot matrix printers (via a conversion to TeX's DVI and using
epson drivers f'r instance) but it's kinda yucky.  I know the pieces exist,
but I don't know the sources for some of them.

One way of getting nroff to use proportional fonts, is to write a shell
script like this:

    echo MC
    nroff $*
    echo MC2

Where MC is the escape sequence required to get the printer to select
a proportional font on the printer, and MC2 is a reset sequence of some kind.
On system V, you'll should use the octal escapes, perhaps like this:

	echo "\033...\c"

On BSD/V7 style echos, generating the octal sequences are hard, but suppressing
the newline is done with -n (instead of trailing \c)

	echo -n "....."

And finally, the result will be very ugly because nroff is assuming
that all characters are constant width.  Tables won't line up.  Right
justification won't work.

Or, you could go whole hog and get ghostscript so that you could use
a troff to postscript converter to drive your printer.  Then you'd
have pretty sexy output limited only by the resolution of your printer.
But that may be extreme overkill for what you really want to do.
-- 
Chris Lewis, Phone: (613) 832-0541, Domain: clewis@ferret.ocunix.on.ca
UUCP: ...!cunews!latour!ecicrl!clewis; Ferret Mailing List:
ferret-request@eci386; Psroff (not Adobe Transcript) enquiries:
psroff-request@eci386 or Canada 416-832-0541.  Psroff 3.0 in c.s.u soon!
Technical Details
Message-ID: <2133@ecicrl.ocunix.on.ca>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!apple!mauxci!eci386!ecicrl!clewis
References: <Jun.6.18.37.50.1991.13440@romulus.rutgers.edu> <1889@vidiot.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!apple!mauxci!eci386!ecicrl!clewis
From: clewis@ferret.ocunix.on.ca (Chris Lewis)
Newsgroups: comp.text
Subject: Re: Q: nroff character sizes
Keywords: nroff term
Message-ID: <2133@ecicrl.ocunix.on.ca>
Date: 9 Jun 91 01:26:40 GMT
References: <Jun.6.18.37.50.1991.13440@romulus.rutgers.edu> <1889@vidiot.UUCP>
Distribution: na
Organization: Elegant Communications Inc., Ottawa, Canada
Lines: 51