Skip to content

Instantly share code, notes, and snippets.

@skoji
Last active March 17, 2016 04:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skoji/0fe9feaec2830bdc58d7 to your computer and use it in GitHub Desktop.
Save skoji/0fe9feaec2830bdc58d7 to your computer and use it in GitHub Desktop.
ズンドコキヨシ (PostScript版、Ghostscript 9.18で動作確認)
% zundoko-kiyoshi in postscript
/Palatino-Italic findfont 40 scalefont setfont
/height 50 def
clippath pathbbox /top exch def pop pop pop newpath
10 top moveto
/zd {
rand 2 mod 0 eq
{ (zun) }
{ (doko) }
ifelse
} def
(%Calendar%) currentdevparams
dup /Second get
exch dup /Minute get 60 mul
exch /Hour get 60 60 mul mul
add add srand
/zunct 0 def
/kiyoshi false def
{
currentpoint exch pop height lt {
showpage 10 top moveto
} if
kiyoshi {
(kiyoshi) show
showpage
exit
} if
zd
dup (zun) eq zunct 4 lt and
{
/zunct zunct 1 add def
} if
dup (doko) eq
{
zunct 4 eq {
/kiyoshi true def
}
{
/zunct 0 def
} ifelse
} if
gsave
show
grestore
0 height neg rmoveto
} loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment