🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #7676

Christmas cards

#7676
From: anw
Date: Fri, 02 Dec 1988 19:21
119 lines
4874 bytes
	We're thinking of doing our Christmas cards on the LW this year.
("We" == family, not department!)  Give-or-take, the idea is to print an
A4 sheet so that it can be folded into 4 to make an A6 front picture
(snowman, tree, robin, pretty stars or whatever, possibly randomised) and
an inside greeting, possibly personalised.  This can't be an original idea!
Anyone already done any good designs, or got any other ideas?

	As a counter-bargain, here is a script I wrote last year to do
little name-plates for Christmas Dinner.  Needs a LW+ with Z-Dingbats,
and it's *very* slow the first time while all the stars get cached (at
least, I assume that's the problem);  second pages & re-runs run OK.
Do with it as you will.

----------------------------- [cut here] --------------------------------------
#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  Nameplates.PS
# Wrapped by anw@tuck on Fri Dec  2 19:17:13 1988
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f Nameplates.PS -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Nameplates.PS\"
else
echo shar: Extracting \"Nameplates.PS\" \(2396 characters\)
sed "s/^X//" >Nameplates.PS <<'END_OF_Nameplates.PS'
X%	Nameplates script.  This is *not* a conforming document, if it matters.
X
X/names [	(Samantha)	(Anne)		(Andy)
X		(Frances)	(Colin)		(Dacia)
X		(Joy)		(Martyn)	(Lynne)
X		(David)
X	] def
X/fontsize 20 def
X/nlength names length def
X
X%	"names" is the list of names for which plates are required.
X%	Re-define ad lib.  Nothing else should need changing unless
X%	very long names are used, in which case "fontsize" should
X%	be reduced.  There should probably be some dotted lines showing
X%	where to cut and fold, but users are assumed to be intelligent).
X%	Warning:  the *first* page is usually *sloooooowwww*;  subsequent
X%	pages, or re-runs, are much faster once all the stars are cached.
X
X/inch { 72 mul } def
X
X%	for A4 ...
X/xmax 8.25 inch cvi def
X/ymax 11.75 inch cvi def
X
X/stars [ (a) (b) (c) (d) (e) (f) (g) (h) (i)
X	 (j) (k) (A) (B) (C) (D) (E) (F) (G)
X	 (H) (I) (J) (K) (L) (M) (N) (O) (P)
X	 (Q) (R) (S) (T) (U) (V) (W) (X) (Y) (Z) ] def
X/nn stars length def
X
X/plonk { rand xmax mod rand ymax mod moveto stars rand nn mod get show } def
X/radius fontsize 80 div inch def
X/baseline fontsize -4 div def
X
X{	nlength 0 le { exit } if
X
X	0 setgray
X	0 0 moveto xmax 0 rlineto 0 ymax rlineto xmax neg 0 rlineto
X	closepath fill
X	1 setgray
X
X	/ZapfDingbats findfont  6 scalefont setfont 300 { plonk } repeat
X	/ZapfDingbats findfont  8 scalefont setfont 300 { plonk } repeat
X	/ZapfDingbats findfont 10 scalefont setfont 300 { plonk } repeat
X	/ZapfDingbats findfont 12 scalefont setfont 300 { plonk } repeat
X	/ZapfDingbats findfont 14 scalefont setfont 300 { plonk } repeat
X	/ZapfDingbats findfont 16 scalefont setfont 150 { plonk } repeat
X	/ZapfDingbats findfont 20 scalefont setfont  75 { plonk } repeat
X
X	0.5 inch setlinewidth xmax 2 div 0 moveto 0 ymax rlineto stroke
X
X	ymax 10 div setlinewidth
X	3 4 19 { ymax 20 div mul 0.35 inch add 0 exch moveto xmax 0 rlineto
X			stroke } for
X
X	/ZapfChancery-MediumItalic findfont fontsize scalefont setfont
X
X	1 4 19 { /j exch def
X	    1 2 3 { /i exch def
X		gsave	xmax 4 div i mul ymax 20 div j mul 0.35 inch add
X			translate
X			/nlength nlength 1 sub def
X			nlength 0 ge {
X				/aname names nlength get def
X				/offset aname stringwidth pop 2 div def
X				1 setgray
X				offset neg radius neg moveto
X				offset 0 radius -90 90 arc
X				offset neg 0 radius 90 -90 arc fill
X				0 setgray
X				offset neg baseline moveto aname show } if
X		grestore } for } for
X
X	showpage } loop
X
X
END_OF_Nameplates.PS
echo shar: 1 control character may be missing from \"Nameplates.PS\"
if test 2396 -ne `wc -c <Nameplates.PS`; then
    echo shar: \"Nameplates.PS\" unpacked with wrong size!
fi
# end of overwriting check
fi
echo shar: End of shell archive.
exit 0

-- 
Andy Walker, Maths Dept., Nott'm Univ., UK.
anw@maths.nott.ac.uk
Technical Details
Message-ID: <597@tuck.nott-cs.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!clyde!att!pacbell!ames!amdahl!uunet!mcvax!ukc!dcl-cs!nott-cs!anw

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!clyde!att!pacbell!ames!amdahl!uunet!mcvax!ukc!dcl-cs!nott-cs!anw
From: anw@nott-cs.UUCP
Newsgroups: comp.lang.postscript
Subject: Christmas cards
Summary: Any ideas?
Message-ID: <597@tuck.nott-cs.UUCP>
Date: 2 Dec 88 19:21:03 GMT
Reply-To: anw@maths.nott.ac.uk (Dr A. N. Walker)
Organization: Department of Mathematics, The University, NOTTINGHAM, NG7 2RD, UK.
Lines: 119