🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #7444

Re: Postscript Underlining

#7444
From: Jos Vos
Date: Thu, 25 Aug 1988 07:22
27 lines
1688 bytes
In article <259@tahoma.UUCP> wam6186@tahoma.UUCP (Warren A. Murray) writes:
>Is there anyone out there who knows how to do underlining in
>Postscript?  I need an algorithm that will work with any of
>the Apple LaserWriter Plus fonts at any size.

Here's the algorithm, which can be used as show, but it shows the
string including underlining.
I made it a while ago, and I still don't find the result very satisfying
(lines are too thick and too close on the characters themselves...),
but it is according the specifications in the Red Book, I think.

/showu {
	dup show gsave
	currentfont dup /FontMatrix get 3 get exch
	/FontInfo get dup /UnderlineThickness get 2 index
	mul setlinewidth /UnderlinePosition get mul
	0 exch rmoveto stringwidth pop neg 0 rlineto stroke
	grestore
} def

I hope this is what you asked for...

-- 
#  Jos Vos                             #  Internet  jos@idca.tds.philips.nl  #
#  Philips TDS, Dept SSP               #                                     #
#  P.O. Box 245                        #  UUCP        ...!mcvax!philapd!jos  #
#  7300 AE Apeldoorn, The Netherlands  #  Phone               +31 55 433181  #
Technical Details
Message-ID: <514@ssp15.idca.tds.philips.nl>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!ll-xn!ames!amdcad!sun!pitstop!sundc!seismo!uunet!mcvax!hp4nl!philapd!ssp15!jos
References: <259@tahoma.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!ll-xn!ames!amdcad!sun!pitstop!sundc!seismo!uunet!mcvax!hp4nl!philapd!ssp15!jos
From: jos@idca.tds.PHILIPS.nl (Jos Vos)
Newsgroups: comp.lang.postscript
Subject: Re: Postscript Underlining
Keywords: Postscript, Underline
Message-ID: <514@ssp15.idca.tds.philips.nl>
Date: 25 Aug 88 07:22:01 GMT
References: <259@tahoma.UUCP>
Organization: Philips TDS, P.O. Box 245, 7300 AE Apeldoorn, The Netherlands
Lines: 27