| 1 |
% Font inspired by Gerard and Marjan Unger's lectures, Feb 1985 |
| 2 |
mode_setup; |
| 3 |
|
| 4 |
randomseed:=seed; |
| 5 |
|
| 6 |
define_pixels(u,dev); |
| 7 |
define_blacker_pixels(px,py,dot); |
| 8 |
define_whole_pixels(s); |
| 9 |
xoffset:=s; |
| 10 |
pickup pencircle xscaled px yscaled py; punk_pen:=savepen; |
| 11 |
pickup pencircle scaled dot; def_pen_path_; |
| 12 |
path dot_pen_path; dot_pen_path:=currentpen_path; |
| 13 |
currenttransform:=identity slanted slant yscaled aspect_ratio; |
| 14 |
|
| 15 |
def beginpunkchar(expr c,n,h,v) = % code $c$; width is $n$ units |
| 16 |
hdev:=h*dev; vdev:=v*dev;% modify horizontal and vertical amounts of deviation |
| 17 |
beginchar(c,n*u#,ht#,0); italcorr ht#*slant; pickup punk_pen enddef; |
| 18 |
extra_endchar:=extra_endchar&"w:=w+2s;charwd:=charwd+2s#"; |
| 19 |
|
| 20 |
def ^ = transformed currenttransform enddef; |
| 21 |
def makebox(text rule) = |
| 22 |
for y=0,h: |
| 23 |
rule((-s,y)^,(w-s,y)^); endfor % horizontals |
| 24 |
for x=-s,0,w-2s,w-s: rule((x,0)^,(x,h)^); endfor % verticals |
| 25 |
enddef; |
| 26 |
rulepen:=pensquare; |
| 27 |
|
| 28 |
vardef pp expr z = z+(hdev*normaldeviate,vdev*normaldeviate) enddef; |
| 29 |
|
| 30 |
def pd expr z = addto_currentpicture contour |
| 31 |
dot_pen_path shifted z.t_ withpen penspeck enddef; % {\bf drawdot} |
| 32 |
|
| 33 |
input punkl % uppercase letters |
| 34 |
input punkae % uppercase \AE, \OE, \O |
| 35 |
input punkg % uppercase greek |
| 36 |
input punkp % punctuation |
| 37 |
input punkd % digits |
| 38 |
input punka % accents |
| 39 |
|
| 40 |
ht#:=.6ht#; dev:=.7dev; |
| 41 |
input punksl % special lowercase |
| 42 |
extra_beginchar:=extra_beginchar&"charcode:=charcode+32;"; |
| 43 |
input punkl % lowercase letters |
| 44 |
extra_beginchar:=extra_beginchar&"charcode:=charcode-35;"; |
| 45 |
input punkae % lowercase \ae, \oe, \o |
| 46 |
|
| 47 |
font_slant:=slant; |
| 48 |
font_quad:=18u#+2s#; |
| 49 |
font_normal_space:=9u#+2s#; |
| 50 |
font_normal_stretch:=6u#; |
| 51 |
font_normal_shrink:=4u#; |
| 52 |
font_x_height:=ht#; |
| 53 |
font_coding_scheme:="TeX text without f-ligatures"; |
| 54 |
|
| 55 |
|
| 56 |
bye |