🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #2153

Re: reverse video

#2153
From: Woody Baker Eagle Signal
Date: Thu, 03 May 1990 00:48
62 lines
2325 bytes
In article <1331@ziggy.EDU>, card@ziggy.EDU (James Card) writes:
> I just started using Postscript (playing around with it)
> and was wondering if there is anyway to print out reverse
> video characters without having to define my own font.
> 
> Also, is there a public domain screen version of postscript
> so that I may view my files before I print them?  I recently

Ghostscript (GNU stuff) runs on an EGA on a PC.  I just got a copy
of it, but am having trouble getting it to run.  It probably does not
have a good mix of fonts, so may not help you.  Reverse video characters
can certainly be done many ways.  If you can live with using a procedure
to print the characters, here is a little tidbit from Don Lancaster.
It boxes each letter.  Another way, (if you want the entire page black)
is to draw a box, fill it with black, then pick white for your color and
render the font normaly.

% from Don Lancasters Laserwriter Secrets #18

/belowbase 8 def
/leftofchar 5 def
/abovebase 36 def
/rightofchar 5 def
/tweenchars 18 def
/str (X) def
/boxitproc
	{
	/msg exch def save
	/bsnap exch def
	xpos ypos translate msg
		{
		/char exch def str 0 char put
		str ( ) ne
			{
			gsave currentpoint
			belowbase sub exch
			leftofchar sub exch moveto
			0 belowbase abovebase add rlineto
			leftofchar str stringwidth pop add
			rightofchar add 0 rlineto
			belowbase abovebase add neg rlineto closepath
			gsave fill grestore gsave clip 
				gsave 3 setlinewidth 1 setgray stroke
				grestore 1 setlinewidth 0 setgray stroke
			grestore newpath grestore
			} if

		1 setgray str show 0 setgray currentpoint exch
		tweenchars add exch moveto
		} forall

	clear bsnap restore
	} def

	/Helvetica-Bold findfont [40 0 0 40 0 0] makefont
	setfont 100 200 moveto (FREE FONT) boxitproc showpage quit


I hope there are no typos here...

Cheers
Woody
Technical Details
Message-ID: <1211@chinacat.Unicom.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!chinacat!woody
References: <1331@ziggy.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!chinacat!woody
From: woody@chinacat.Unicom.COM (Woody Baker @ Eagle Signal)
Newsgroups: comp.lang.postscript
Subject: Re: reverse video
Summary: info
Message-ID: <1211@chinacat.Unicom.COM>
Date: 3 May 90 00:48:28 GMT
References: <1331@ziggy.EDU>
Distribution: usa
Organization: a guest of Unicom Systems Development, Austin
Lines: 62