diff options
Diffstat (limited to 'fonts/punk/source/punk.mf')
-rw-r--r-- | fonts/punk/source/punk.mf | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/fonts/punk/source/punk.mf b/fonts/punk/source/punk.mf new file mode 100644 index 0000000000..99ea8af653 --- /dev/null +++ b/fonts/punk/source/punk.mf @@ -0,0 +1,56 @@ +% Font inspired by Gerard and Marjan Unger's lectures, Feb 1985 +mode_setup; + +randomseed:=seed; + +define_pixels(u,dev); +define_blacker_pixels(px,py,dot); +define_whole_pixels(s); +xoffset:=s; +pickup pencircle xscaled px yscaled py; punk_pen:=savepen; +pickup pencircle scaled dot; def_pen_path_; +path dot_pen_path; dot_pen_path:=currentpen_path; +currenttransform:=identity slanted slant yscaled aspect_ratio; + +def beginpunkchar(expr c,n,h,v) = % code $c$; width is $n$ units + hdev:=h*dev; vdev:=v*dev;% modify horizontal and vertical amounts of deviation + beginchar(c,n*u#,ht#,0); italcorr ht#*slant; pickup punk_pen enddef; +extra_endchar:=extra_endchar&"w:=w+2s;charwd:=charwd+2s#"; + +def ^ = transformed currenttransform enddef; +def makebox(text rule) = + for y=0,h: + rule((-s,y)^,(w-s,y)^); endfor % horizontals + for x=-s,0,w-2s,w-s: rule((x,0)^,(x,h)^); endfor % verticals + enddef; +rulepen:=pensquare; + +vardef pp expr z = z+(hdev*normaldeviate,vdev*normaldeviate) enddef; + +def pd expr z = addto_currentpicture contour + dot_pen_path shifted z.t_ withpen penspeck enddef; % {\bf drawdot} + +input punkl % uppercase letters +input punkae % uppercase \AE, \OE, \O +input punkg % uppercase greek +input punkp % punctuation +input punkd % digits +input punka % accents + +ht#:=.6ht#; dev:=.7dev; +input punksl % special lowercase +extra_beginchar:=extra_beginchar&"charcode:=charcode+32;"; +input punkl % lowercase letters +extra_beginchar:=extra_beginchar&"charcode:=charcode-35;"; +input punkae % lowercase \ae, \oe, \o + +font_slant:=slant; +font_quad:=18u#+2s#; +font_normal_space:=9u#+2s#; +font_normal_stretch:=6u#; +font_normal_shrink:=4u#; +font_x_height:=ht#; +font_coding_scheme:="TeX text without f-ligatures"; + + +bye |