% Computer Modern Roman lower case: % These letters were originally coded by D. E. Knuth in November, 1979, % inspired by the Monotype faces used in {\sl The Art of Computer Programming}. % Sans serif designs by Richard Southall were added in April, 1982. % The programs were revised for the new \MF\ conventions in 1985. % Character codes \0141 through \0172 are generated. cmchar "The letter a"; beginchar("a",9u#,x←height#,0); bh#:=min(bar←height#,1.14x←height#-bar←height#); define←pixels(bh); italcorr 1/3[bh#,x←height#]*slant+.5stem#-serif←fit#-2u#; adjust←fit(0,serif←fit# if serifs: if hair#+.5stem#>1.5u#:-.25u# fi\\fi); pickup fine.nib; top y3r=h+vround 1.5oo; if serifs: pos1(flare,180); pos2(hair,180); pos3(vair,90); lft x1r=hround max(u,2.1u-.5flare); x3=.5w-.5u; y1=min(bh+.5flare+2vair+2,.9[bh,h]-.5flare); bulb(3,2,1); % bulb else: pos1(5/7[vair,flare],95); x1l=good.x 1.5u; x1r:=good.x x1r; pos3(1/8[vair,thin←join],90); x3=.5w-.2u; top y1r=vround .82[bh,top y3r]; filldraw stroke term.e(3,1,left,.9,4); fi % terminal pos4(stem,0); rt x4r=hround(w-2.5u+.5stem); y4=1/3[bh,h]; pos5(stem,0); x5=x4; y5=max(.55bh,2vair); filldraw stroke super←arc.e(3,4)&z4e..z5e; % arc and stem pos6(.3[thin←join,vair],90); x6=x4; bot y6=bh; pos7(hround(curve-2stem←corr),180); lft x7r=hround max(.5u,1.5u-.5curve); y7=1/3[top y8l,top y6r]; pos8(vair,270); x8l=.5w-.75u; bot y8r=-oo; pos9(thin←join,360); z9l=z5l; (x,y8r)=whatever[z8l,z9l]; x8r:=max(x,x8-u); {{interim superness:=more←super; filldraw stroke z9e{down}...z8e{left}...{up}z7e&super←arc.e(7,6)}}; % bowl if serifs: numeric shaved←stem; shaved←stem=hround(stem-3stem←corr); if hair#+.5stem#>1.5u#: pickup tiny.nib; pos5'(shaved←stem,0); rt x5'r=fine.rt x5r; y5'=y5; pos10(shaved←stem,0); x10=x5'; y10=.2[.5tiny,bh]; pos11(shaved←stem,0); rt x11r=hround(w-.25u); bot y11=0; filldraw stroke z5'e---z10e...z11e{right}; % foot else: pickup crisp.nib; pos5'(shaved←stem,0); rt x5'r=fine.rt x5r; y5'=y5; pos10(shaved←stem,0); x10=x5'; y10=1/3bh; pos11(.2[vair,stem],90); x11r=.5[x10r,x12r]; bot y11l=-vround .5oo; pos12(hair,180); rt x12l=hround(w-.1u); y12=max(y10,y11+vair); pos13(hair,180); x13=x12; top y13=max(vround .6bh,top y12); (x',y11l)=whatever[z11r,z12r]; x11l:=max(x',x10); filldraw stroke z5'e---z10e...z11e{right}...z12e---z13e; fi % hook else: numeric shaved←stem; shaved←stem=hround(stem-stem←corr); pickup tiny.nib; pos5'(shaved←stem,0); rt x5'r=fine.rt x5r; y5'=y5; pos10(shaved←stem,0); x10=x5'; bot y10=0; filldraw stroke z5'e--z10e; fi % base of stem penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13); endchar; cmchar "The letter b"; beginchar("b",10u#+serif←fit#,asc←height#,0); italcorr .5x←height#*slant+min(.5curve#-u#,-.25u#); adjust←fit(serif←fit#,0); pickup tiny.nib; pos1(stem',0); pos2(stem,0); pos0'(stem',0); pos0(stem,0); z0l=z0'l; x0'=x1; x0=x2; lft x1l=hround(2.5u-.5stem'); top y1=h; numeric edge; edge=rt x2r; pickup fine.nib; pos3(if hefty:thin←join else: hair fi,180); pos4(vair,90); pos5(curve,0); pos6(vair,-90); penpos7(x3l-x3r,-180); rt x3l=1/3[rt x2,edge]; y3=1/8[bar←height,x←height]; x4l=w-.5(w-serif←fit)+.5u; top y4r=x←height+oo; rt x5r=hround min(w-1.35u+.5curve,w-.6u); y5=.5x←height; x6l=x4l-.2u; bot y6r=-oo; x7=x3; y7=min(y3,y6+y4-y3+.6vair); (x,y4r)=whatever[z3l,z4l]; x4r:=min(x,.5[x4,x5r]); (x',y6r)=whatever[z7l,z6l]; x6r:=min(x',.5[x6,x5r]); filldraw stroke z3e{up}...pulled←arc.e(4,5)&pulled←arc.e(5,6)...{up}z7e; % bowl y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{right}z4l)); y2=ypart(((edge,h)--(edge,0))intersectionpoint(z6l{left}...{up}z7l)); pickup tiny.nib; filldraw stroke z1e--z0'e--z0e--z2e; % stem pickup crisp.nib; pos8(hair,0); pos7'(stem,0); z7'=z2; x8l=x7'l; bot y8=0; filldraw stroke z7'e--z8e; % point if serifs: sloped←serif.l(1,0',a,1/3,jut,serif←drop); fi % upper serif penlabels(0,1,2,3,4,5,6,7,8); endchar; cmchar "The letter c"; beginchar("c",8u#,x←height#,0); italcorr x←height#*slant-.2u#; adjust←fit(if monospace: .5u#,.5u# else: 0,0 fi); pickup fine.nib; pos2(vair',90); pos4(vair',270); x2=x4=.5(w+u); top y2r=vround(h+1.5oo); bot y4r=-oo; pos3(curve,180); lft x3r=hround max(.6u,1.35u-.5curve); y3=.5h; if serifs: pos1(hair,0); pos0(flare,0); y1=min(bar←height+.5flare+2vair'+2,.9[bar←height,h]-.5flare); rt x1r=hround(w-.7u); bulb(2,1,0); % bulb pos5(hair,0); rt x5r=hround(w-.5u); y5=max(good.y(.5bar←height-.9),y4l+vair'); (x,y4l)=whatever[z4r,z5l]; x4l:=x; filldraw stroke pulled←super←arc.e(2,3)(.7superpull) & pulled←super←arc.e(3,4)(.5superpull) ..tension .9 and 1..{x5-x4,5(y5-y4)}z5e; % arc and lower terminal else: pos1(4/7[vair',flare],80); rt x1r=hround(w-.6u); top y1r=vround .82[bar←height,top y2r]; filldraw stroke term.e(2,1,right,.8,4); % upper terminal pos5(.6[vair',flare],275); rt x5r=hround(w-.5u); y5r=good.y(y5r+1/3bar←height-y5); y5l:=good.y y5l; x5l:=good.x x5l; filldraw stroke pulled←super←arc.e(2,3)(.7superpull) & pulled←super←arc.e(3,4)(.5superpull) ..tension .9 and 1..z5e; fi % arc and lower terminal penlabels(0,1,2,3,4,5); endchar; cmchar "The letter d"; beginchar("d",10u#+serif←fit#,asc←height#,0); italcorr asc←height#*slant-serif←fit#+.5stem#-2u#; adjust←fit(0,serif←fit#); pickup tiny.nib; pos1(stem',0); pos2(stem,0); pos0'(stem',0); pos0(stem,0); z0r=z0'r; x0'=x1; x0=x2; rt x1r=hround(w-2.5u+.5stem'); top y1=h; numeric edge; edge=lft x2l; pickup fine.nib; pos3(if hefty:thin←join else: hair fi,0); pos4(vair,90); pos5(curve,180); pos6(vair,270); penpos7(x3r-x3l,360); lft x3l=1/3[lft x2,edge]; y3=1/8[bar←height,x←height]; x4l=.5(w-serif←fit)-.3u; top y4r=x←height+oo; lft x5r=hround max(1.35u-.5curve,.6u); y5=.5x←height; x6l=x4l-.2u; bot y6r=-oo; x7=x3; y7=min(y3,y6+y4-y3+.6vair); (x,y4r)=whatever[z3l,z4l]; x4r:=max(x,.5[x5r,x4]); (x',y6r)=whatever[z7l,z6l]; x6r:=max(x',.5[x5r,x6]); filldraw stroke z3e{up}...pulled←arc.e(4,5) & pulled←arc.e(5,6)...{up}z7e; % bowl y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{left}z4l)); pickup tiny.nib; bot y2=if serifs:-min(oo,serif←drop) else: 0 fi; filldraw stroke z1e--z0'e--z0e--z2e; % stem if serifs: sloped←serif.l(1,0',a,1/3,jut,serif←drop); % upper serif sloped←serif.r(2,0,b,1/3,jut,min(oo,serif←drop)); fi % lower serif penlabels(0,1,2,3,4,5,6,7); endchar; cmchar "The letter e"; beginchar("e",7.25u#+max(.75u#,.5curve#),x←height#,0); italcorr .5[bar←height#,x←height#]*slant+.5min(curve#-1.5u#,0); adjust←fit(if monospace: .25u#,.5u# else: 0,0 fi); numeric left←curve,right←curve; left←curve=right←curve+6stem←corr=curve if not serifs: -3stem←corr fi; if right←curve<tiny.breadth: right←curve:=tiny.breadth; fi if left←curve<tiny.breadth: left←curve:=tiny.breadth; fi pickup tiny.nib; pos1(right←curve,0); pos2(vair,90); pos3(left←curve,180); y1=good.y bar←height; top y2r=h+vround 1.5oo; y0l=bot y1; rt x1r=hround min(w-.5u,w-u+.5right←curve); lft x3r=hround max(.5u,1.25u-.5left←curve); x2=.5w+.25u; {{interim superness:=more←super; filldraw stroke super←arc.e(1,2)}}; % right bowl y3=.5[y2,y4]; bot y4r=-oo; x4=x2+.25u; if serifs: pos4(vair',270); pos5(hair,360); y5=max(good.y(.5bar←height-.9),y4l+vair); x5r=x1r; (x,y4l)=whatever[z4r,z5]; x4l:=x; filldraw stroke pulled←arc.e(2,3) & pulled←arc.e(3,4) ...{x5-x4,5(y5-y4)}z5e; % left bowl, arc, and terminal else: pos4(vair,270); filldraw stroke super←arc.e(2,3) & super←arc.e(3,4); % left bowl and arc pickup fine.nib; pos4'(vair,270); z4=z4'; pos5(.5[vair,flare],275); rt x5r=hround(w-.6u); y5r=good.y(y5r+1/3bar←height-y5); y5l:=good.y y5l; x5l:=good.x x5l; filldraw stroke term.e(4',5,right,1,4); fi % terminal path testpath; testpath=super←arc.r(2,3) & super←arc.r(3,4); y1'r=y0r=y0l+.6[thin←join,vair]; y1'l=y0l; x1'l=x1'r=x1; forsuffixes $=l,r: x0$=xpart(((0,y0$)--(x1,y0$)) intersectionpoint testpath); endfor fill stroke z0e--z1'e; % crossbar penlabels(0,1,2,3,4,5); endchar; cmchar "The letter f"; beginchar("f",5.5u#,asc←height#,0); italcorr asc←height#*slant+if serifs:flare#-.25u# else: 1.25u# fi; adjust←fit(stem←shift#,if monospace: .5u# else:-stem←shift# fi); pickup tiny.nib; pos1(stem',0); lft x1l=hround(2.5u-.5stem'); pickup fine.nib; numeric bulb←diam; if serifs: bulb←diam=hround .8[stem,flare]; pos2(bulb←diam,0); y2+.5bulb←diam=.9[x←height,h+oo]; if monospace: rt x2r=hround(w-.5u)+1 else: lft x2l=hround(w-.75u+.5) fi; else: pos2(5/7[vair,flare],90); top y2r=h; rt x2=hround(if monospace:w-.5u else:w+.75u fi); fi f←stroke(1,2,a,b,c,jut,if not monospace:1.25fi\\ jut); % stem, terminal, serif pickup crisp.nib; top y3r=top y4r=x←height; lft x3=hround .5u-1; pos3(bar,90); pos4(bar,90); rt x4=hround(w-if monospace:.75u+1 else:1/3u fi); filldraw stroke z3e--z4e; % bar penlabels(1,2,3,4); endchar; iff not variant←g: cmchar "The letter g"; beginchar("g",9u#,x←height#,desc←depth#); italcorr x←height#*slant+.25u#; adjust←fit(0,0); numeric light←vair,light←curve,loop←top,loop←side; light←vair=Vround(.5[thin←join,vair]+vair←corr); light←curve=max(fine.breadth,hround(curve-3stem←corr)); loop←top=Vround .77[vair,fudged.stem]; loop←side=hround .64[vair,fudged.stem]; pickup fine.nib; pos1(light←vair,90); pos2(light←curve,180); pos3(light←vair,270); pos4(light←curve,360); pos11(loop←top,90); y11r=good.y(y11r+.15bar←height-y11); x1=x3=.5[x2,x4]; y2=y4=.5[y1,y3]; lft x2r=hround(1.75u-.5light←curve); rt x4r=hround(w-2.75u+.5light←curve); top y1r=h+oo; y3r=good.y(y3r+.27[top y11r,bot y1l]-y3); filldraw stroke pulled←arc.e(1,2) & pulled←arc.e(2,3); % left half of bowl filldraw stroke pulled←arc.e(3,4) & pulled←arc.e(4,1); % right half of bowl x0=superness[x1r,x4r]; y0=superness[y4r,y1r]; % NE point on the super bowl x8'=superness[x3r,x2r]; y8'=superness[y2r,y3r]; % SW point on the super bowl x8''=superness[x3,x2]; y8''=superness[y2,y3]; pos0(thin←join,angle(z0-z8')+90); pos8(thin←join,angle(z0-z8')-90); z8=.618[z8',z8'']; if serifs: pos5(vair,90); pos6(hair,0); pos7(.5[hair,flare],0); x5=.75[x0,x6]; top y5r=h+o; rt x6r=hround(w-.25u); y6+(.5[hair,flare])/2=.95[bar←height,h]+oo; filldraw stroke z0e..{right}z5e; bulb(5,6,7); % ear else: pos5(vair',100); top y5r=h+oo; rt x5l=hround(w-.25u); y5l:=good.y y5l; filldraw z0l{z5-z0}..z5l--z5r{left}..{curl 1}z0r--cycle; fi % ear pos10(loop←top,90); x10=x8+.75u; y10=y11; pos12(loop←side,0); pos13(light←vair,-90); pos14(loop←side,-180); pos10'(.5[thin←join,vair],-270); rt x12r=hround max(w-1.25u+.5loop←side,w-.5u); y12=y14=.5[y11,y13]; x11=x13=.5w; bot y13r=-d-oo-1; x14=w-x12; z10'l=z10l; filldraw stroke z8e{z8-z0}..z10e---z11e; % link filldraw stroke {{interim superness:=hein←super; super←arc.e(11,12)}} & super←arc.e(12,13) & super←arc.e(13,14) & super←arc.e(14,10'); % loop penlabels(0,1,2,3,4,5,6,7,8,10,11,12,13,14); labels(8',8''); endchar; iff variant←g: cmchar "Variant letter g"; beginchar("g",10u#+serif←fit#,x←height#,desc←depth#); italcorr x←height#*slant-serif←fit#+.5stem#-2u# if serifs:+.5u# fi; adjust←fit(0,serif←fit# if serifs: -.5u# fi); pickup tiny.nib; pos1(stem',0); pos2(stem,0); pos0'(stem',0); pos0(stem,0); z0r=z0'r; x0'=x1; x0=x2; rt x1r=hround(w-2.5u+.5stem'); numeric edge; edge=lft x2l; path edge←path; edge←path=(edge,h)--(edge,0); pickup fine.nib; pos3(if hefty:thin←join else: hair fi,0); pos4(vair,90); pos5(curve,180); pos6(vair,270); penpos7(x3r-x3l,360); lft x3l=2/3[lft x2,edge]; y3=bar←height; x4l=.5(w-serif←fit)-.3u; top y4r=x←height+oo; lft x5r=hround max(1.35u-.5curve,.6u); y5=.5x←height; x6l=x4l-.2u; bot y6r=vround 1/3vair; lft x7l=edge; y7=min(y3,y6+y4-y3+.6vair); (x,y4r)=whatever[z3l,z4l]; x4r:=max(x,.5[x5r,x4]); (x',y6r)=whatever[z7l,z6l]; x6r:=max(x',.5[x5r,x6]); filldraw stroke z3e{up}...{left}z4e&super←arc.e(4,5) &super←arc.e(5,6)&z6e{right}...{up}z7e; % bowl y1=ypart(edge←path intersectionpoint(z3l{up}...{left}z4l)); y0=ypart(edge←path intersectionpoint(z7l{down}...{left}z6l)); pickup tiny.nib; bot y2=if serifs: -.25d else: 0 fi; filldraw stroke z1e--z0'e--z0e--z2e; % stem pickup crisp.nib; pos8(hround(hair-stem←corr),0); pos7'(stem',0); z7'=z1; x8r=x7'r; top y8=h+oo; filldraw stroke z7'e--z8e; % point if serifs: pickup tiny.nib; pos9(vair,-90); x9=.5[x2,x10]; bot y9r=-d-o-1; pos10(hair,-180); lft x10r=hround u; y10=-.75d+.5flare; pos11(flare,-180); z11r=z10r; bulb(9,10,11); filldraw stroke super←arc.e(2,9); % tail else: pickup fine.nib; pos2'(stem,0); z2'=z2; z2''r=z2'r; z2''=z2'; z2''l=(x2'l,0); pos9(vair,-90); x9=4.5u; bot y9r=-d-o-1; pos10(.5[vair,flare],-90); lft x10=hround 1.25u; y10r=good.y -5/6d; y10l:=good.y y10l; filldraw stroke z2'e..z2''e&super←arc.e(2'',9) & term.e(9,10,left,.9,4); fi % tail penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar; cmchar "The letter h"; beginchar("h",10u#,asc←height#,0); italcorr .5[bar←height#,x←height#]*slant-serif←fit#+.5stem#-2u#; adjust←fit(serif←fit#+stem←shift#,serif←fit#-stem←shift#); pickup tiny.nib; pos1(stem,0); pos2(stem,0); pos1'(stem',0); pos2'(stem',0); pos3(stem,0); lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l; x3=w-x1; top y1=h; bot y2=0; y1=y1'; y2=y2'; filldraw stroke z1'e--z2'e; % left stem h←stroke(2,a,3,4); % arch and right stem if serifs: sloped←serif.l(1',2',b,1/3,jut,serif←drop); % upper left serif numeric inner←jut; pickup tiny.nib; if rt x2r+jut+.5u+1<=lft x4l-jut: inner←jut=jut; else: rt x2r+jut+.5u+1=lft x4l-inner←jut; fi dish←serif(2,1,c,1/3,jut,d,1/3,jut); % lower left serif dish←serif(4,3,e,1/3,inner←jut,f,1/3,jut); fi % lower right serif penlabels(1,2,3,4); endchar; cmchar "The letter i"; numeric dot←diam#; dot←diam#=max(dot←size#,cap←curve#); beginchar("i",5u#,min(asc←height#,10/7x←height#+.5dot←diam#),0); define←whole←blacker←pixels(dot←diam); italcorr h#*slant-serif←fit# + .5dot←diam# -2u#; adjust←fit(serif←fit#+stem←shift# if monospace:+.25u#fi,serif←fit#-stem←shift#); pickup tiny.nib; pos1(stem',0); pos2(stem',0); if odd(w-stem'): change←width; fi lft x1l=hround(.5w-.5stem'); x1=x2; top y1=x←height if serifs: +min(oo,serif←drop) fi; bot y2=0; filldraw stroke z1e--z2e; % stem pos3(dot←diam,0); pos4(dot←diam,90); if serifs: x3r=max(x1r,x1+.5(dot←diam-tiny)-.2jut) else: x3=x1-.5 fi; top y4r=h+1; if bot y4l-top y1<slab: y4l:=min(y4r-eps,y1+tiny+slab); fi x3=x4; y3=.5[y4l,y4r]; dot(3,4); % dot if serifs: sloped←serif.l(1,2,a,1/3,.95jut,serif←drop); % upper serif dish←serif(2,1,b,1/3,jut,c,1/3,.9jut); fi % lower serif penlabels(1,2,3,4); endchar; cmchar "The letter j"; numeric dot←diam#; dot←diam#=max(dot←size#,cap←curve#); beginchar("j",5.5u#,min(asc←height#,10/7x←height#+.5dot←diam#),desc←depth#); define←whole←blacker←pixels(dot←diam); italcorr h#*slant-serif←fit#+.5stem#-2u#; adjust←fit(serif←fit#+2stem←shift# if monospace:+\\.5u# fi, serif←fit#-2stem←shift# if monospace:-.5u# fi); pickup tiny.nib; pos1(stem',0); pos2(stem',0); rt x1r=hround(.5w+.25u+.5stem'); x1=x2; top y1=x←height if serifs: +min(oo,serif←drop) fi; bot y2=-1/3d; filldraw stroke z1e--z2e; % stem pos3(dot←diam,0); pos4(dot←diam,90); x3r=x1r; top y4r=h+1; if bot y4l-top y1<slab: y4l:=min(y4r-eps,y1+tiny+slab); fi x3=x4; y3=.5[y4l,y4r]; dot(3,4); % dot if serifs: sloped←serif.l(1,2,a,1/3,1.1jut,serif←drop); % upper serif pickup tiny.nib; pos5(vair,-90); pos6(hair,-180); pos7(flare,-180); x5=.5[x2,x6r]; bot y5r=-d-oo; y6-.5flare=-.88d; if monospace: lft x6r=0 else: z6r=z7r; rt x7l=floor .75u fi; (x,y5r)=whatever[z5l,z2l]; x5r:=max(x,.5[x6r,x5]); filldraw stroke z2e{down}...z5e{left}; bulb(5,6,7); % arc and bulb else: pickup fine.nib; pos2'(stem',0); z2'=z2; pos6(.2[vair,stem'],-90); pos7(vair,-90); lft x7r=hround -.75u; bot y7r=vround 5/6(-d-oo); (x,y7l)=whatever[z7r,z3]; x7l:=x; z5r=z2'r; (x2'l,y5l)=whatever[z7l,z5r]; x5l=x2'l; y5=y5r; x6r=.5[x7r,x5r]; x6l:=.5[x7l,x5l]; bot y6r=-d-oo; filldraw stroke z2'e..{down}z5e & super←arc.e(5,6) & z6e{left}..z7e; fi % arc and terminal penlabels(1,2,3,4,5,6,7); endchar; cmchar "The letter k"; beginchar("k",9.5u#,asc←height#,0); italcorr x←height#*slant-.2u#; adjust←fit(serif←fit#,serif←fit#); pickup tiny.nib; numeric right←jut,stem[],alpha[]; stem1=max(tiny.breadth,hround(fudged.stem-stem←corr)); stem2=max(tiny.breadth,hround(fudged.stem-2stem←corr)); stem3=max(tiny.breadth,hround(fudged.hair if hefty:-\\4stem←corr fi)); stem4=max(tiny.breadth,hround(fudged.stem-3stem←corr)); if serifs: right←jut=.6jut; else: right←jut=.4tiny; fi pos1(stem1,0); pos2(stem2,0); top y1=h; bot y2=0; lft x1l=lft x2l=hround(2.5u-.5stem1); top y3=x←height; rt x3r=hround(r-letter←fit-.7u-right←jut); bot y6=0; rt x6r=hround(r-letter←fit-.3u-right←jut); x4=x11=x1; y4=.7bar←height; y11=y3; alpha1=diag←ratio(1,.5(stem3-tiny),y3-y4,x3r-x4); alpha2=diag←ratio(1,.5(stem4-tiny),y11-y6,x6r-x1); penpos3(alpha1*(stem3-tiny),0); penpos4(whatever,-90); z5=.5[z5l,z5r]; penpos6(alpha2*(stem4-tiny),0); forsuffixes $=l,r: y3'$=x←height; y6'$=0; z4$=z3'$+whatever*(z3-z4); z5$=z6'$+whatever*(z11-z6)=whatever[z3,z4]; endfor z3'r=z3r+penoffset z3-z4 of currentpen+whatever*(z3-z4); % we have also |z3'l=z3l+penoffset z4-z3 of currentpen+whatever*(z3-z4)|;\] z6'r=z6r+penoffset z11-z6 of currentpen+whatever*(z11-z6); z6'l=z6l+penoffset z6-z11 of currentpen+whatever*(z11-z6); fill z4r--diag←end(4r,3'r,1,.5,3'l,4l)--z4l--cycle; % upper diagonal fill z5l--diag←end(5l,6'l,.5,1,6'r,5r)--z5r--cycle; % lower diagonal pos0(stem1,0); pos0'(stem2,0); y0=y0'; x0=x1; x0'=x2; rt z0r=whatever[z3,z4]; filldraw stroke z1e..z0e--z0'e..z2e; % stem if serifs: numeric inner←jut; if rt x2r+jut+.5u+1<=lft x6l-jut: inner←jut=jut; else: rt x2r+inner←jut+.5u+1=lft x6l-inner←jut; fi sloped←serif.l(1,0,a,1/3,jut,serif←drop); % upper stem serif dish←serif(2,0',b,1/3,jut,c,1/3,inner←jut); % lower stem serif dish←serif(3,4,d,2/3,1.4jut,e,1/2,right←jut)(dark); % upper diagonal serif dish←serif(6,5,f,1/2,inner←jut,g,1/3,right←jut)(dark);fi % lower diagonal serif penlabels(0,1,2,3,4,5,6,11); endchar; cmchar "The letter l"; beginchar("l",5u#,asc←height#,0); l←width#:=5u#+2serif←fit#; italcorr asc←height#*slant-serif←fit#+.5stem#-2u#; adjust←fit(serif←fit#+stem←shift#,serif←fit#-stem←shift#); pickup tiny.nib; pos1(stem',0); pos2(stem',0); if odd(w-stem'): change←width; fi lft x1l=hround(.5w-.5stem'); x1=x2; top y1=h; bot y2=0; filldraw stroke z1e--z2e; % stem if serifs: sloped←serif.l(1,2,a,1/3,jut,serif←drop); % upper serif dish←serif(2,1,b,1/3,jut,c,1/3,jut); fi % lower serif penlabels(1,2); endchar; cmchar "The letter m"; beginchar("m",15u#,x←height#,0); italcorr .5[bar←height#,x←height#]*slant-serif←fit#+.5stem#-2u#; adjust←fit(serif←fit#+stem←shift#,serif←fit#-stem←shift#); numeric shaved←stem; shaved←stem=hround(mfudged.stem-2stem←corr); pickup tiny.nib; pos1(mfudged.stem,0); pos2(mfudged.stem,0); pos1'(shaved←stem,0); pos2'(shaved←stem,0); pos3(mfudged.stem,0); pos5(mfudged.stem,0); lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l; lft x3l=hround(.5w-.5stem); x5-x3=x3-x1; if not monospace: r:=hround(x5+x1)-l; fi % change width for better fit top y1=h+min(oo,serif←drop); bot y2=0; y1=y1'; y2=y2'; filldraw stroke z1'e--z2'e; % left stem h←stroke(2,a,3,4); % left arch and middle stem h←stroke(4,b,5,6); % right arch and right stem if serifs: sloped←serif.l(1',2',c,1/3,jut,serif←drop); % upper left serif numeric inner←jut; pickup tiny.nib; if rt x2r+jut+.5u+1<=lft x4l-jut: inner←jut=jut; else: rt x2r+jut+.5u+1=lft x4l-inner←jut; fi dish←serif(2,1,d,1/3,jut,e,1/3,jut); % lower left serif dish←serif(4,3,f,1/3,inner←jut,g,1/3,jut); % lower middle serif dish←serif(6,5,h,1/3,inner←jut,i,1/3,jut); fi % lower right serif penlabels(1,2,3,4,5,6); endchar; cmchar "The letter n"; beginchar("n",10u#,x←height#,0); italcorr .5[bar←height#,x←height#]*slant-serif←fit#+.5stem#-2u#; adjust←fit(serif←fit#+stem←shift#,serif←fit#-stem←shift#); pickup tiny.nib; pos1(stem,0); pos2(stem,0); numeric shaved←stem; shaved←stem=hround(stem-2stem←corr); pos1'(shaved←stem,0); pos2'(shaved←stem,0); pos3(stem,0); lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l; x3=w-x1; top y1=h+min(oo,serif←drop); bot y2=0; y1=y1'; y2=y2'; filldraw stroke z1'e--z2'e; % left stem h←stroke(2,a,3,4); % arch and right stem if serifs: sloped←serif.l(1',2',b,1/3,jut,serif←drop); % upper left serif numeric inner←jut; pickup tiny.nib; if rt x2r+jut+.5u+1<=lft x4l-jut: inner←jut=jut; else: rt x2r+jut+.5u+1=lft x4l-inner←jut; fi dish←serif(2,1,c,1/3,jut,d,1/3,jut); % lower left serif dish←serif(4,3,e,1/3,inner←jut,f,1/3,jut); fi % lower right serif penlabels(1,2,3,4); endchar; cmchar "The letter o"; beginchar("o",9u#,x←height#,0); italcorr .7x←height#*slant; adjust←fit(if monospace: .5u#,.5u# else: 0,0 fi); penpos1(vair,90); penpos3(vair',-90); penpos2(curve,180); penpos4(curve,0); x2r=hround max(.5u,1.25u-.5curve); x4r=w-x2r; x1=x3=.5w; y1r=h+vround 1.5oo; y3r=-oo; y2=y4=.5h-vair←corr; y2l:=y4l:=.52h; penstroke pulled←arc.e(1,2) & pulled←arc.e(2,3) & pulled←arc.e(3,4) & pulled←arc.e(4,1) & cycle; % bowl penlabels(1,2,3,4); endchar; cmchar "The letter p"; beginchar("p",10u#+serif←fit#,x←height#,desc←depth#); italcorr .5x←height#*slant+min(.5curve#-.85u#,-.1u#); adjust←fit(serif←fit#,0); pickup tiny.nib; pos1(stem',0); pos2(stem,0); pos0'(stem',0); pos0(stem,0); z0l=z0'l; x0'=x1; x0=x2; lft x1l=hround(2.5u-.5stem'); top y1=h if serifs: +min(oo,serif←drop) fi; numeric edge; edge=rt x2r; pickup fine.nib; pos3(if hefty:thin←join else: hair fi,180); pos4(vair',90); pos5(curve,0); pos6(vair,-90); penpos7(x3l-x3r,-180); rt x3l=1/3[rt x2,edge]; y3=1/8[bar←height,x←height]; x4l=w-.5(w-serif←fit)+.5u; top y4r=x←height+oo; rt x5r=hround min(w-1.35u+.5curve,w-.6u); y5=.5x←height; x6l=x4l-.2u; bot y6r=-oo; x7=x3; y7=min(y3,y6+y4-y3+.6vair); (x,y4r)=whatever[z3l,z4l]; x4r:=min(x,.5[x5r,x4]); (x',y6r)=whatever[z7l,z6l]; x6r:=min(x',.5[x5r,x6]); filldraw stroke z3e{up}...{right}z4e&super←arc.e(4,5) &super←arc.e(5,6)&z6e{left}...{up}z7e; % bowl y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{right}z4l)); pickup tiny.nib; bot y2=-d; filldraw stroke z1e--z0'e--z0e--z2e; % stem pickup crisp.nib; pos8(hair,0); pos7'(stem,0); z7'=z2; x8l=x7'l; bot y8=0; filldraw stroke z7'e--z8e; % point if serifs: sloped←serif.l(1,0',a,1/3,jut,serif←drop); % upper serif dish←serif(2,0,b,1/3,jut,c,1/3,jut); fi % lower serif penlabels(0,1,2,3,4,5,6,7,8); endchar; cmchar "The letter q"; beginchar("q",10u#+serif←fit#,x←height#,desc←depth#); italcorr x←height#*slant-serif←fit#+.5stem#-2u# if serifs:+.5u# fi; adjust←fit(0,serif←fit# if serifs: -.5u# fi); pickup tiny.nib; pos1(stem',0); pos2(stem,0); pos0'(stem',0); pos0(stem,0); z0r=z0'r; x0'=x1; x0=x2; rt x1r=hround(w-2.5u+.5stem'); numeric edge; edge=lft x2l; pickup fine.nib; pos3(if hefty:thin←join else: hair fi,0); pos4(vair',90); pos5(curve,180); pos6(vair,270); penpos7(x3r-x3l,360); lft x3l=2/3[lft x2,edge]; y3=bar←height; x4l=.5(w-serif←fit)-.3u; top y4r=x←height+oo; lft x5r=hround max(1.35u-.5curve,.6u); y5=.5x←height; x6l=x4l-.2u; bot y6r=-oo; lft x7l=1/3[lft x2,edge]; y7=min(y3,y6+y4-y3+.6vair); (x,y4r)=whatever[z3l,z4l]; x4r:=max(x,.5[x5r,x4]); (x',y6r)=whatever[z7l,z6l]; x6r:=max(x',.5[x5r,x6]); filldraw stroke z3e{up}...{left}z4e&super←arc.e(4,5) &super←arc.e(5,6)&z6e{right}...{up}z7e; % bowl y1=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{left}z4l)); y0=ypart(((edge,h)--(edge,0))intersectionpoint(z6l{right}...{up}z7l)); pickup tiny.nib; bot y2=-d; filldraw stroke z1e--z0'e--z0e--z2e; % stem pickup crisp.nib; pos8(hround(hair-stem←corr),0); pos7'(stem',0); z7'=z1; x8r=x7'r; top y8=h+oo; filldraw stroke z7'e--z8e; % point if serifs: dish←serif(2,0,b,1/3,jut,c,1/3,jut); fi % lower serif penlabels(0,1,2,3,4,5,6,7,8); endchar; cmchar "The letter r"; numeric r←flare#; r←flare#=.75[if serifs: stem# else: vair# fi,flare#]; define←whole←blacker←pixels(r←flare); beginchar("r",if serifs:max(7u#,5.5u#+r←flare#) else:6.5u# fi,x←height#,0); italcorr x←height#*slant if not serifs: +.25u# fi; adjust←fit(serif←fit#,0); pickup fine.nib; top y4r=h+oo; if serifs: pos4(vair,90); pos5(hair,0); x4=w-max(1.75u,.25u+r←flare); rt x5r=hround(w-.5u+.5); y5+.5r←flare=.9[bar←height,h]+oo; pos6(r←flare,0); bulb(4,5,6); % bulb else: pos4(r←flare,90); rt x4=hround(w-.25u); fi pos3(thin←join,180); rt x3l=hround(2.5u-.5stem')+stem'; top y3=bar←height; filldraw stroke z3e{up}...{right}z4e; % arc pickup tiny.nib; pos0(stem',0); pos2(stem',0); pos1(hround(stem-3stem←corr),0); top y1=h+min(oo,serif←drop); pos0'(hround(stem-3stem←corr),0); y0=y0'=y3; x1l=x0l=x0'l=x2l; lft x1l=hround(2.5u-.5stem'); bot y2=0; filldraw stroke z1e--z0'e--z0e--z2e; % stem if serifs: sloped←serif.l(1,0',a,1/3,jut,serif←drop); % upper serif dish←serif(2,0,b,1/3,jut,c,1/3,1.25jut); fi % lower serif penlabels(1,2,3,4,5,6); endchar; cmchar "The letter s"; beginchar("s",7.1u#,x←height#,0); italcorr x←height#*slant-if serifs:.55u# else:.3u# fi; adjust←fit(if monospace: .5u#,.4u# else: 0,if serifs:0 else:-.2u# fi fi); numeric theta; theta=90-angle(40u,h); slope:=-h/40u; % angle at middle numeric s←slab; s←slab=if serifs:vair else:Vround .1[vair,stem] fi; numeric ess'; ess'=max(fine.breadth,ess); pickup fine.nib; pos2(max(fine.breadth,s←slab-vround vair←corr),-100); pos0(ess',theta); pos7(s←slab,-90); x2l=x0=x7=.5w; top y2l=h+vround 1.5oo; bot y7r=-oo; y0-.5ess'=y7l+if serifs:.54 else: .52 fi\\(y2r-y7l-ess'); lft x3l=hround .6u; rt x6r=hround(w-.6u); x3r-x3l=x6r-x6l=hround .5[s←slab,ess']-fine; ellipse←set(2l,3l,4l,0l); ellipse←set(2r,3r,4r,0r); y3=y3r; ellipse←set(7l,6l,5l,0l); ellipse←set(7r,6r,5r,0r); y6=y6r; interim superness:=more←super; filldraw stroke super←arc.e(2,3) & z3e{down} ..z4e---z5e..z6e{down} & super←arc.e(6,7); % main stroke if serifs: pos1(hair,180); pos8(hair,180); rt x1l=hround(w-1.05u); lft x8r=hround .6u; bot y1=min(bot y2r,vround 1/5[top y5r,h]); top y8=max(top y7l,vround 5/6 bot y4l); filldraw stroke z1e{up}....{left}z2e; % upper arc filldraw stroke z7e{left}....{x8-x7,5(y8-y7)}z8e; % lower arc path upper←arc, lower←arc; upper←arc=z1{up}....{left}z2; lower←arc=z7{left}....{x8-x7,5(y8-y7)}z8; x10=x1l; top y10=top y2l; x9=x8r; bot y9=bot y7r; x1l-x1'=x8'-x8r=1.6curve-fine; y1'=y1; y8'=y8; numeric t; t=xpart(upper←arc intersectiontimes(z10--z1')); filldraw z1l--z10--subpath(t,0) of upper←arc--cycle; % upper barb t:=xpart(lower←arc intersectiontimes(z9--z8')); filldraw z8r--z9--subpath(t,1) of lower←arc--cycle; % lower barb else: pos1(4/7[s←slab,flare],-100); pos8(flare,-100); x1l=good.x(x1l+w-u-rt x1); lft x8r=hround .5u; top y1l=vround(.93h+1.5oo); bot y8r=vround .1h-oo; filldraw stroke z1e..tension.9..{left}z2e; % upper arc and terminal filldraw stroke z7e{left}..z8e; fi % lower arc and terminal penlabels(0,1,1',2,3,4,5,6,7,8,8',9,10); endchar; cmchar "The letter t"; beginchar("t",6u#+max(u#,.5stem#), min(asc←height#,if hefty:9/7 else:10/7 fi\\ x←height#),0); italcorr x←height#*slant if serifs: -.9u# else: -.4u# fi; adjust←fit(0,if serifs: 0 else: -.5u# fi); numeric shaved←stem; shaved←stem=hround(stem if hefty:-\\2stem←corr fi); pickup fine.nib; pos2(shaved←stem,180);pos3(shaved←stem,180); lft x2r=lft x3r=hround(2.5u-.5shaved←stem); y2=y8; y3=max(.5bar←height,2vair); pickup crisp.nib; pos8(bar,90); rt x8=hround(w-1.3u); top y8r=x←height; lft x7=hround 1/3u; y7l=y8l; if hefty: pos7(bar,90); filldraw stroke z7e--z8e; % crossbar pickup tiny.nib; pos1(hround(shaved←stem-stem←corr),0); rt x1r=fine.rt x2l; top y1=h; penpos2'(x1r-x1l,0); x2'=x1; y2'=y2; filldraw stroke z1e--z2'e; % upper terminal else: pos7(vair,90); pos1(hair,0); rt x1r=fine.rt x2l; top y1=h; filldraw z1l{down}...{left}z7r--z7l--z8l --z8r--(x1r,y8r)--z1r--cycle; fi % upper terminal and crossbar pickup fine.nib; interim superness:=more←super; pos4(vair',-90); bot y4r=-oo; rt x5r=hround(w-u); if serifs: pos5(hair,0); y5=y3; x4l=.5[x3l,x5l]; (x,y4r)=whatever[z4l,z5l]; x4r:=max(x,.5[x3r,x4]); filldraw stroke z2e..super←arc.e(3,4)...{up}z5e; % stem and hook pickup crisp.nib; pos6(hair,0); pos5'(hair,0); x6=x5=x5'; top y6=max(vround .75bar←height,top y5); y5=y5'; filldraw stroke z5'e--z6e; % terminal else: pos5(vair,-75); top y5l=vround .2[top y4l,bar←height]; x5l:=good.x x5l; x4l=1/3[x3l,x5l]; x4r:=1/3[x3r,x5r]; y3l:=y3l+.2vair; filldraw stroke z2e..super←arc.e(3,4); % stem and hook path p; p=stroke z4e{right}..tension .9 and atleast 1..z5e; % terminal if (xpart(z5l-precontrol 1 of p)<0) or (xpart(z5r-postcontrol 2 of p)<0): filldraw stroke z4e{right}...{up}z5e; else: filldraw p; fi fi; penlabels(1,2,3,4,5,6,7,8); endchar; cmchar "The letter u"; beginchar("u",10u#,x←height#,0); italcorr x←height#*slant-serif←fit#+.5stem#-2u#; adjust←fit(serif←fit#+stem←shift#,serif←fit#-stem←shift#); numeric light←vair; light←vair=vair if hefty: -vround 2vair←corr fi; if light←vair<fine.breadth: light←vair:=fine.breadth; fi pickup tiny.nib; pos1(stem,0); pos2(stem,0); pos3(stem,0); pos4(stem',0); lft x1l=hround(2.5u-.5stem); x1=x2; x3=w-x1; x3r=x4r; if serifs: top y1=h+min(oo,serif←drop); bot y4=-min(oo,serif←drop); else: top y1=h; bot y4=0; fi pos0(stem,0); pos0'(stem',0); x0=x3; x0'=x4; y0=y0'; penpos2'(stem-fine,-180); z2'=z2; y3=y1; y2=.5bar←height; penpos5(max(eps,light←vair-fine),-90); penpos6(thin←join-fine,0); y6=y0=2/3bar←height; filldraw stroke z1e--z2e; % left stem filldraw stroke z3e..z0e--z0'e..z4e; % right stem pickup fine.nib; bot y5r=-oo; x5l=.5w-.25u; lft x6l=tiny.lft x0l; (x,y5r)=whatever[z5l,z6l]; x5r:=max(x,.5[x5,x2'r]); filldraw stroke {{interim superness:=hein←super; pulled←arc.e(2',5)}} & z5e{right}...{up}z6e; % arc if serifs: sloped←serif.l(1,2,a,1/3,jut,serif←drop); % upper left serif sloped←serif.l(3,0,b,1/3,jut,serif←drop); % upper right serif sloped←serif.r(4,0',c,1/3,jut,min(oo,serif←drop)); fi % lower right serif penlabels(1,2,3,4,5); labels(6); endchar; cmchar "The letter v"; beginchar("v",if serifs: 9.5u# else:9u# fi,x←height#,0); italcorr x←height#*slant+.25u#; adjust←fit(serif←fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ serif←fit#); numeric left←stem,right←stem,outer←jut,alpha; left←stem=fudged.stem-stem←corr; right←stem=min(fudged.hair if hefty:-2stem←corr fi,left←stem); outer←jut=.75jut; x1l=w-x4r=l+letter←fit+outer←jut+.25u; y1=y4=h; x2-x1=x4-x3; x2l+apex←corr=x3l; y2=y3=-apex←oo; alpha=diag←ratio(2,right←stem,y1-y2,x4r-x1l-apex←corr); penpos1(alpha*left←stem,0); penpos2(alpha*left←stem,0); penpos3(alpha*right←stem,0); penpos4(alpha*right←stem,0); z0=whatever[z1r,z2r]=whatever[z3l,z4l]; if y0>notch←cut: y0:=notch←cut; fill z0+.5right{up}...{z4-z3}diag←end(3l,4l,1,1,4r,3r) --diag←end(4r,3r,1,1,2l,1l)--diag←end(2l,1l,1,1,1r,2r){z2-z1} ...{down}z0+.5left--cycle; % left and right diagonals else: fill z0--diag←end(0,4l,1,1,4r,3r)--diag←end(4r,3r,1,1,2l,1l) --diag←end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals if serifs: numeric inner←jut; pickup tiny.nib; prime←points←inside(1,2); prime←points←inside(4,3); if rt x1'r+jut+.5u+1<=lft x4'l-jut: inner←jut=jut; else: rt x1'r+inner←jut+.5u+1=lft x4'l-inner←jut; fi dish←serif(1',2,a,1/3,outer←jut,b,1/2,inner←jut); % left serif dish←serif(4',3,c,.6,inner←jut,d,1/2,outer←jut)(dark); fi % right serif penlabels(0,1,2,3,4); endchar; cmchar "The letter w"; beginchar("w",13u#,x←height#,0); italcorr x←height#*slant+.25u#; adjust←fit(serif←fit#,serif←fit#); numeric stem[],outer←jut,upper←notch,alpha,mid←corr; outer←jut=.7jut; x1l=w-x8r=l+letter←fit+outer←jut+.25u; stem1=fudged.stem-stem←corr; stem4=min(fudged.hair if hefty:-2stem←corr fi,stem1); stem2=if hefty:.1[vair,stem4] else: stem4 fi; stem3=max(stem2,stem1-3stem←corr); x2-x1=x4-x3=x6-x5=x8-x7; x2l+apex←corr=x3l; x6l+apex←corr=x7l; y1=y8=h; y2=y3=y6=y7=-apex←oo; y4=y5=if monospace: vround .6 fi\\ h; upper←notch=y4-notch←cut; mid←corr=if monospace or hefty:-.3apex←corr else: .5jut fi; alpha=diag←ratio(4,stem2-stem3+stem4,y1-y2,x8r-x1l+mid←corr-2apex←corr); penpos1(alpha*stem1,0); penpos2(alpha*stem1,0); penpos3(alpha*stem2,0); penpos4(alpha*stem2,0); penpos5(alpha*stem3,0); penpos6(alpha*stem3,0); penpos7(alpha*stem4,0); penpos8(alpha*stem4,0); x4l-x1l=floor(x4l-x1l+.5(x5r+mid←corr-x4r)); % |x5r| $\approx$ |x4r+mid←corr| z23=whatever[z1r,z2r]=whatever[z3l,z4l]; z45=whatever[z3r,z4r]=whatever[z5l,z6l]; z67=whatever[z5r,z6r]=whatever[z7l,z8l]; fill diag←end(1l,2l,1,1,3r,4r){z4-z3} ...if y45<upper←notch:(x45,upper←notch)+.5left{up} --(x45,upper←notch)+.5right{down} else: z45&z45 fi ...{z6-z5}diag←end(5l,6l,1,1,7r,8r)--diag←end(7r,8r,1,1,8l,7l){z7-z8} ...if y67>notch←cut:(x67,notch←cut)+.5right{down} --(x67,notch←cut)+.5left{up} else: z67&z67 fi ...{z5-z6}special←diag←end(6,5,4,3){z3-z4} ...if y23>notch←cut:(x23,notch←cut)+.5right{down} --(x23,notch←cut)+.5left{up} else: z23&z23 fi ...{z1-z2}diag←end(2r,1r,1,1,1l,2l)--cycle; % diagonals if serifs: numeric inner←jut[]; pickup tiny.nib; prime←points←inside(1,2); prime←points←inside(5,6); prime←points←inside(8,7); if monospace: inner←jut1=inner←jut4=1.5jut; elseif hefty: inner←jut1=inner←jut4=jut; else: fill diag←end(6r,5r,1,1,5l,6l)--.5[z5l,z6l] --.5[z5r,z6r]--cycle;% middle stem inner←jut2=.7inner←jut1; inner←jut4=1.1inner←jut3; if rt x1'r+jut+.5u+1<=lft x5'l-.7jut: inner←jut1=jut; else: rt x1'r+inner←jut1+.5u+1=lft x5'l-inner←jut2; fi if rt x5'r+jut+.5u+1<=lft x8'l-1.1jut: inner←jut3=jut; else: rt x5'r+inner←jut3+.5u+1=lft x8'l-inner←jut4; fi dish←serif(5',6,e,1/3,inner←jut2,f,1/2,inner←jut3); fi % middle serif dish←serif(1',2,a,1/3,outer←jut,b,1/2,inner←jut1); % left serif dish←serif(8',7,c,.6,inner←jut4,d,1/2,outer←jut)(dark); fi % right serif penlabels(0,1,2,3,4,5,6,7,8,23,45,67); endchar; cmchar "The letter x"; beginchar("x",if serifs:9.5u# else:9u# fi,x←height#,0); italcorr x←height#*slant-.05u#; adjust←fit(serif←fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ serif←fit#); numeric stem[],outer←jut,xjut,alpha[]; stem1=fudged.stem-4stem←corr; stem2=min(fudged.hair,stem1); outer←jut=.75jut; xjut= if serifs: (stem1-stem2)/4 else: 0 fi; x1l=l+letter←fit+.1u+outer←jut; x2r=r-letter←fit-.3u-outer←jut-xjut; x3l=l+letter←fit+outer←jut+xjut; x4r=r-letter←fit-outer←jut; y1=y2=h; y3=y4=0; alpha1=diag←ratio(1,stem1,h,x4r-x1l); alpha2=diag←ratio(1,stem2,h,x2r-x3l); penpos1(alpha1*stem1,0); penpos2(alpha2*stem2,0); penpos3(alpha2*stem2,0); penpos4(alpha1*stem1,0); if hefty: z0=whatever[z1,z4]=whatever[z2,z3]; x12=x34=x0; y13=y24=y0; z12=whatever[z2l,z3l]; z13=whatever[z2l,z3l]; z24=whatever[z2r,z3r]; z34=whatever[z2r,z3r]; forsuffixes $=13,24,34: z$'=.2[z$,z0]; endfor fill diag←end(12,1r,.5,1,1l,13')--z13'--diag←end(13',3l,1,.5,3r,34')--z34' --diag←end(34',4l,.5,1,4r,24')--z24' --diag←end(24',2r,1,.5,2l,12)--z12--cycle; % diagonals else: fill diag←end(4r,1r,.5,1,1l,4l) --diag←end(1l,4l,.5,1,4r,1r)--cycle; % left diagonal fill diag←end(2l,3l,.5,1,3r,2r) --diag←end(3r,2r,.5,1,2l,3l)--cycle; fi % right diagonal if serifs: numeric inner←jut[]; pickup tiny.nib; prime←points←inside(1,4); prime←points←inside(2,3); prime←points←inside(3,2); prime←points←inside(4,1); if rt x1'r+jut+.5u+1<=lft x2'l-jut-xjut: inner←jut1=jut; else: rt x1'r+inner←jut1+.5u+1=lft x2'l-inner←jut1-xjut; fi if rt x3'r+jut+.5u+1<=lft x4'l-jut-xjut: inner←jut2=jut; else: rt x3'r+inner←jut2+.5u+1=lft x4'l-inner←jut2-xjut; fi dish←serif(1',4,a,1/3,outer←jut,b,2/3,inner←jut1); % upper left serif dish←serif(4',1,c,2/3,inner←jut2,d,1/3,outer←jut); % lower right serif dish←serif(2',3,e,2/3,inner←jut1+xjut, f,1/2,outer←jut+xjut)(dark); % upper right serif dish←serif(3',2,g,1/2,outer←jut+xjut, h,2/3,inner←jut2+xjut)(dark); fi % lower left serif penlabels(0,1,2,3,4,12,13,24,34); endchar; cmchar "The letter y"; beginchar("y",if serifs:9.5u# else:9u# fi,x←height#,desc←depth#); italcorr x←height#*slant+.25u#; adjust←fit(serif←fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ serif←fit#); numeric left←stem,right←stem,bot←stem,bot←vair,outer←jut; left←stem=fudged.stem-stem←corr; right←stem=fudged.hair if hefty:-2stem←corr fi; bot←stem=fudged.hair if hefty:-8stem←corr fi; bot←vair=Vround(if serifs: vair else:.5[vair,bot←stem] fi); outer←jut=.75jut; x1l=w-x4r=l+letter←fit+outer←jut+.25u; y1=y4r=h; y2=y3=0; x2l=x3l; numeric alpha,alpha[]; x9=3u; y9=bot←vair-d-oo; alpha1=diag←ratio(2,bot←stem,y1-y3,x4r-x1l-apex←corr); alpha2=diag←ratio(1,bot←stem,y1-y9,x4r-x9); if alpha1<alpha2: x2l-x1l=x4r-x3r+apex←corr; alpha=alpha1; else: alpha=alpha2; z3l=whatever[z9,z4r-(alpha*bot←stem,0)]; fi penpos3(alpha*bot←stem,0); penpos4(alpha*right←stem,0); alpha3=(y1++(x2l-x1l))/y1; penpos1(alpha3*left←stem,0); penpos2(alpha3*left←stem,0); z0=whatever[z1r,z2r]=z4l+whatever*(z3r-z4r); if y0>notch←cut: y0:=notch←cut; fill z0+.5right{up}...{z4r-z3r}diag←end(0,4l,1,1,4r,3r) --z3r--z2l--diag←end(2l,1l,1,1,1r,2r){z2-z1} ...{down}z0+.5left--cycle; % left and right diagonals else: fill z0--diag←end(0,4l,1,1,4r,3r)--z3r--z2l --diag←end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals penpos5(alpha*bot←stem,0); z5r=whatever[z3r,z4r]; y5-.5vair=-.5d; if serifs: numeric light←bulb; light←bulb=hround 7/8[hair,flare]; clearpen; penpos6(vair,-90); penpos7(hair,-180); penpos8(light←bulb,-180); x6=2u; y6r=-d-oo; y8-.5light←bulb=-.85d; x8r=hround .35u; fill stroke z3e---z5e...{left}z6e; bulb(6,7,8); % arc and bulb numeric inner←jut; pickup tiny.nib; prime←points←inside(1,2); prime←points←inside(4,3); if rt x1'r+jut+.5u+1<=lft x4'l-jut: inner←jut=jut; else: rt x1'r+inner←jut+.5u+1=lft x4'l-inner←jut; fi dish←serif(1',2,a,1/3,outer←jut,b,1/2,inner←jut); % left serif dish←serif(4',3,c,.6,inner←jut,d,1/2,outer←jut)(dark); % right serif else: penpos6(bot←vair,-90); x6=2.5u; y6r=-d-oo; fill stroke z3e---z5e...{left}z6e; % arc pickup fine.nib; pos6'(bot←vair,-90); z6'=z6; pos7(2/3[bot←vair,flare],-85); lft x7l=hround u; bot y7r=vround-.96d-oo; y7l:=good.y y7l; filldraw stroke term.e(6',7,left,1,4); fi % arc and terminal penlabels(0,1,2,3,4,5,6,7,8,9); endchar; cmchar "The letter z"; beginchar("z",8u#,x←height#,0); italcorr x←height#*slant-.5serif←fit#-.3u#; adjust←fit(0,.5serif←fit#); numeric arm←thickness[],z←stem; if hefty: arm←thickness1=Vround(vair-vair←corr); arm←thickness2=vair; z←stem=.6[vair,stem]; else: arm←thickness1=vair; arm←thickness2=vair'; z←stem=.9[vair,stem]; fi pickup tiny.nib; rt x1r=rt x2r=hround(w-.8u); lft x3l=lft x4l=hround .5u; top y1=h; y2=min(y1,h-2/3arm←thickness1); bot y4=0; y3=max(y4,2/3arm←thickness2); numeric alpha; alpha=diag←ratio(1,z←stem-tiny,y2-y3,x2r-x3l-slant*(y2-y3)); penpos1(alpha*(z←stem-tiny),0); penpos2(alpha*(z←stem-tiny),0); penpos3(alpha*(z←stem-tiny),0); penpos4(alpha*(z←stem-tiny),0); pair delta; delta=penoffset z3-z2 of currentpen; fill top lft z1l--z2l+delta---z3l+delta..lft z3l---lft z4l..bot z4l ---bot rt z4r--z3r-delta---z2r-delta..rt z2r---rt z1r..top z1r ---cycle; % diagonal pickup crisp.nib; pos5(arm←thickness1,90); pos6(hair,180); top y5r=h; x5=x1; lft x6r=hround .75u; y6=good.y(y5l-beak/1.4)-eps; arm(5,6,a,beak←darkness,-.4beak←jut); % upper arm and beak pos7(arm←thickness2,-90); pos8(hair,0); bot y7r=0; x7=x4; rt x8r=hround(w-.75u); y8=good.y(y7l+beak/1.2)+eps; arm(7,8,b,beak←darkness,.6beak←jut); % lower arm and beak penlabels(1,2,3,4,5,6,7,8); endchar;