🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #5894

Re: How to make fixed width fonts with non-fixed width fonts

#5894
From: peter da silva
Date: Fri, 11 Dec 1992 16:56
49 lines
2441 bytes
In article <mick.724008993@picus> mick@dcs.bbk.ac.uk (Mick Farmer) writes:
> I've found the easiest way to do this is to use kshow.

Not good enough, because words like "summer" come out as:

	*****
     **********
    ***      ***   ****    ***   ****   ***   ***    ***   ***    ******
    ***             ***    ***    *****************************  ***  ***
     ********       ***    ***    ***   ***   ****   ***    ***  ********
	*******     ***    ***    ***   ***   ****   ***    ***  ***
	     ***    ***    ***    ***   ***   ****   ***    ***  ***
    ***      ***    ***    ***    ***   ***   ****   ***    ***  ***   **
     **********      ***   ***    ***   ***   ****   ***    ***   *** ***
	*****         *********  ****  ***** ****** *****  *****   *****

I have a "CWSHOW" routine I was using with mp23. Maybe I can dig it up
and post it. If the character is less then 90% of the spacing, it prints
it, otherwise it scales it to fit in 90% of the intercharacter space.
The result is like the fixed-width "Roman" or "Prestige" fonts in dot
matrix printers.

Let's see...

	/c2s { %% code -- string
	  1 string exch 1 index % string code string
	    0 put % Can't recall order of args ?value string index put?
	} def
	/cwshow { %% spacing text --
	  { % spacing code
	    gsave % We're scaling and showing so SAVE
	      c2s
	      dup stringwidth pop % spacing char width
		dup 3 index 0.9 div gt { % spacing char width
		  2 index 0.9 div % spacing char width maxwidth
		    exch div 1 scale
	        } if
	      show
	    grestore
	    dup 0 rmoveto % move by spacing...
	  } forall pop
	} def

Something like that...
-- 
%Peter da Silva/77487-5012 USA/+1 713 274 5180/Have you hugged your wolf today?
/L{lineto}def/C{curveto}def/F{0 562 moveto 180 576 324 648 396 736 C 432 736 L
482 670 518 634 612 612 C}def/G{setgray}def .75 G F 612 792 L 0 792 L fill 1 G
324 720 24 0 360 arc fill 0 G 3 setlinewidth F stroke showpage % "Peerless"
Technical Details
Message-ID: <id.JVQV.VJE@ferranti.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!udel!intercon!psinntp!ficc!peter
References: <1992Dec8.203206.17023@frmug.fr.mugnet.org> <mick.724008993@picus>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.postscript
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!udel!intercon!psinntp!ficc!peter
From: peter@ferranti.com (peter da silva)
Subject: Re: How to make fixed width fonts with non-fixed width fonts
Message-ID: <id.JVQV.VJE@ferranti.com>
Keywords: postscript
Organization: Xenix Support, FICC
References: <1992Dec8.203206.17023@frmug.fr.mugnet.org> <mick.724008993@picus>
Date: Fri, 11 Dec 1992 16:56:03 GMT
Lines: 49