Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #2569
| Newsgroups | comp.lang.postscript |
|---|---|
| From | Peter Billam <peter@www.pjb.com.au> |
| Subject | Re: wanted: kcharpath ... |
| References | <slrnnjfrfs.2bk.peter@box8.pjb.com.au> <6c745d14-747c-4cda-884d-b86509a3f455@googlegroups.com> <slrnnjirg5.3au.peter@box8.pjb.com.au> |
| Message-ID | <slrnnjnj75.24n.peter@box8.pjb.com.au> (permalink) |
| Date | 2016-05-18 02:01 +0000 |
| Organization | Unlimited download news at news.astraweb.com |
On 2016-05-15, luser- -droog <mijoryx@yahoo.com> wrote:
> Here's a first-draft. ...
> % proc string bool . -
> /kcharpath { ... } def
That continues to work well :-) I was motivated by
http://www.pjb.com.au/art/posters/babylon_howl.jpg
(a sketch for a poster for a local band) where I wanted to kern
the ZapfChancery-MediumItalic letters closer so they joined up
and looked like handwriting, then fill them with a color-gradient.
And I built on it, after reading The Art Deco Poster (William
Crowse, Thames and Hudson) p.7 where the word CONTENTS is
kerned close so the letters overlap, and with each letter
getting its own left-to-right gray-to-white gradient. So :
/kcharbychar { % usage: kernproc paintproc string bool kcharbychar
% kernproc is called _between_ characters (as in kshow) ;
% paintproc is called _on_ each character, with its path set, eg:
% { clip clippath pathbbox 2 index sub exch 3 index sub exch
% black white false 0.5 rectgradientfill }
{ bool str paintproc kernproc }{exch def} forall
str length 0 gt {
currentpoint
str 0 1 getinterval dup
bool charpath
gsave paintproc grestore
stringwidth newpath
4 2 roll moveto rmoveto
1 1 str length 1 sub { /idx exch def
str idx 1 sub get
str idx get
kernproc
currentpoint
str idx 1 getinterval dup
bool charpath
gsave paintproc grestore
stringwidth newpath
4 2 roll moveto rmoveto
} for
} if
} bind def
/Helvetica-Bold 150 selectfont
20 400 moveto
{ pop pop -40 0 rmoveto }
{ clip clippath pathbbox 2 index sub exch 3 index sub exch
[ black red blue ] randomrgb white false 0.5 rectgradientfill }
(DUBONNET) true kcharbychar
randomrgb and rectgradientfill come from
http://www.pjb.com.au/comp/colours.html
The regrettable "2 index sub exch 3 index sub exch" bit
converts llx lly urx ury to llx lly width height
That gives eg: http://www.pjb.com.au/art/posters/malsanulejo.jpg
PS has suddenly opened up for me in the last few months, since I cut
down on line-drawing and started path-constructing and clipping :-)
Peter
--
Peter Billam www.pjb.com.au www.pjb.com.au/comp/contact.html
Back to comp.lang.postscript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
wanted: kcharpath ... Peter Billam <peter@www.pjb.com.au> - 2016-05-15 03:33 +0000
Re: wanted: kcharpath ... luser- -droog <mijoryx@yahoo.com> - 2016-05-15 14:16 -0700
Re: wanted: kcharpath ... Peter Billam <peter@www.pjb.com.au> - 2016-05-16 06:51 +0000
Re: wanted: kcharpath ... Peter Billam <peter@www.pjb.com.au> - 2016-05-18 02:01 +0000
Re: wanted: kcharpath ... luser- -droog <mijoryx@yahoo.com> - 2016-05-17 20:41 -0700
Re: wanted: kcharpath ... luser- -droog <mijoryx@yahoo.com> - 2016-05-17 20:44 -0700
Re: wanted: kcharpath ... Peter Billam <peter@www.pjb.com.au> - 2016-05-18 06:59 +0000
Re: wanted: kcharpath ... luser- -droog <mijoryx@yahoo.com> - 2016-05-18 22:29 -0700
Re: wanted: kcharpath ... Carlos <angus@quovadis.com.ar> - 2016-05-18 23:00 +0200
Re: wanted: kcharpath ... Peter Billam <peter@www.pjb.com.au> - 2016-05-21 02:09 +0000
Re: wanted: kcharpath ... Peter Billam <peter@www.pjb.com.au> - 2016-05-21 03:13 +0000
Re: wanted: kcharpath ... Carlos <angus@quovadis.com.ar> - 2016-05-22 14:20 +0200
Re: wanted: kcharpath ... Peter Billam <peter@www.pjb.com.au> - 2016-05-29 06:24 +0000
Re: wanted: kcharpath ... luser- -droog <mijoryx@yahoo.com> - 2016-05-28 23:43 -0700
Re: wanted: kcharpath ... luser- -droog <mijoryx@yahoo.com> - 2016-05-29 01:10 -0700
from image to imagemask Peter Billam <peter@www.pjb.com.au> - 2016-05-31 08:51 +0000
Re: from image to imagemask luser- -droog <mijoryx@yahoo.com> - 2016-06-01 00:53 -0700
Re: from image to imagemask luser- -droog <mijoryx@yahoo.com> - 2016-06-01 01:10 -0700
Re: from image to imagemask Peter Billam <peter@www.pjb.com.au> - 2016-06-02 01:26 +0000
Re: from image to imagemask Peter Billam <peter@www.pjb.com.au> - 2016-06-03 07:53 +0000
Re: wanted: kcharpath ... Carlos <angus@quovadis.com.ar> - 2016-06-03 14:38 +0200
Re: wanted: kcharpath ... Peter Billam <peter@www.pjb.com.au> - 2016-06-06 02:43 +0000
Re: wanted: kcharpath ... Carlos <angus@quovadis.com.ar> - 2016-06-06 07:53 +0200
csiph-web