mode_setup; font_setup; %%%%%%%%%%%%%%%%% %%% romand.mf %%% %%%%%%%%%%%%%%%%% cmchar "The numeral 0"; beginchar("0",24/22size#,23/22size#,1/22size#); italcorr fig_height#*slant-.5u#; %adjust_fit(0,0); w:=9u; h:=fig_height; d:=0; penpos1(vair,90); penpos3(vair,-90); penpos2(curve,180); penpos4(curve,0); if not monospace: interim superness:=sqrt(more_super*hein_super); fi x2r=hround max(.7u,1.45u-.5curve); x4r=w-x2r; x1=x3=.5w; y1r=h+o; y3r=-o; 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); currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2); endchar; cmchar "The numeral 1"; beginchar("1",24/22size#,23/22size#,1/22size#); italcorr fig_height#*slant-.5u#; %adjust_fit(0,0); w:=9u; h:=fig_height; d:=0; numeric light_stem; light_stem=hround .4[stem',cap_stem']; pickup tiny.nib; pos1(light_stem,0); pos2(light_stem,0); lft x1l=lft x2l=hround(.5(w+.5u)-.5cap_stem'); top y1=h+o; bot y2=0; filldraw stroke z1e--z2e; % stem if not serifs: save slab; slab=bar; fi dish_serif(2,1,a,1/3,min(2.25u,lft x2l-1.5u), b,1/3,min(2.25u,w-1.25u-rt x2r)); % serif pickup crisp.nib; pos3(slab,-90); pos4(bar,-90); top y3l=h+o; top y4l=if monospace: .8 else: .9 fi\\ h+o; lft x4=max(1.25u,tiny.lft x1l-2.35u); tiny.rt x1r=lft x3+.25[tiny,hair]; erase fill z3l{x4l-x3l,3(y4l-y3l)}...z4l{left} --(x4l,h+o+1)--(x3l,h+o+1)--cycle; % erase excess at top filldraw stroke z3e{x4e-x3e,3(y4e-y3e)}..z4e{left}; % point penlabels(1,2,3,4); currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2); endchar; cmchar "The numeral 2"; beginchar("2",24/22size#,23/22size#,1/22size#); italcorr fig_height#*slant-.5u#; %adjust_fit(0,0); w:=9u; h:=fig_height; d:=0; numeric arm_thickness, hair_vair; hair_vair=.25[vair,hair]; arm_thickness=Vround(if hefty:slab+2stem_corr else:.4[stem,cap_stem] fi); pickup crisp.nib; pos7(arm_thickness,-90); pos8(hair,0); bot y7r=0; lft x7=hround .9u; rt x8r=hround(w-.9u); y8=good.y(y7l+beak/2)+eps; arm(7,8,a,.3beak_darkness,beak_jut); % arm and beak pickup fine.nib; pos2(slab,90); pos3(.4[curve,cap_curve],0); top y2r=h+o; x2=.5(w-.5u); rt x3r=hround(w-.9u); y3+.5vair=.75h; if serifs: numeric bulb_diam; bulb_diam=hround(flare+2/3(cap_stem-stem)); pos0(bulb_diam,180); pos1(cap_hair,180); lft x1r=hround .9u; y1-.5bulb_diam=2/3h; (x,y2l)=whatever[z1l,z2r]; x2l:=x; bulb(2,1,0); % bulb and arc else: x2l:=x2l-.25u; pos1(flare,angle(-9u,h)); lft x1r=hround .75u; bot y1l=vround .7h; y1r:=good.y y1r+eps; x1l:=good.x x1l; filldraw stroke term.e(2,1,left,.9,4); fi % terminal and arc pos4(.25[hair_vair,cap_stem],0); pos5(hair_vair,0); pos6(hair_vair,0); y5=arm_thickness; y4=.3[y5,y3]; top y6=min(y5,slab,top y7l); lft x6l=crisp.lft x7; z4l=whatever[z6l,(x3l,bot .58h)]; z5l=whatever[z6l,z4l]; erase fill z4l--z6l--lft z6l--(lft x6l,y4l)--cycle; % erase excess at left filldraw stroke z2e{right}..tension atleast .9 and atleast 1 ..z3e{down}..{z5e-z4e}z4e--z5e--z6e; % stroke penlabels(0,1,2,3,4,5,6,7,8); currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2); endchar; cmchar "The numeral 3"; beginchar("3",24/22size#,23/22size#,1/22size#); italcorr fig_height#*slant-.5u#; %adjust_fit(0,0); w:=9u; h:=fig_height; d:=0; numeric top_thickness,mid_thickness,bot_thickness; top_thickness=max(fine.breadth,vround(slab-2vair_corr)); mid_thickness=max(fine.breadth,vround 2/3vair); bot_thickness=max(fine.breadth,vround(slab-vair_corr)); pickup fine.nib; pos2(top_thickness,90); top y2r=h+o; pos3(max(fine.breadth,.6[curve,cap_curve]-stem_corr),0); rt x3r=hround(w-1.25u); pos4(vair,-90); pos5(vair,-90); pos6(mid_thickness,90); x2=x6=x8=.5[1.5u,x7]; pos7(cap_curve,0); rt x7r=hround(w-.75u); lft x5=min(hround 3u,lft x6)-eps; pos8(bot_thickness,-90); bot y8r=-o; y3=.6[top y4l,bot y2l]; y7=.5[bot y6l,top y8l]; top y5l=vround(.54h+.5vair); y5r=y6l; x4=1/3[x5,x3l]; z4=z5+whatever*(15u,.1h); filldraw stroke pulled_super_arc.e(2,3)(.5superpull) & z3e{down}...z4e---z5e; % upper bowl filldraw z5r--z6l--z6r--z5l---cycle; % middle tip filldraw stroke pulled_super_arc.e(6,7)(.5superpull) & pulled_super_arc.e(7,8)(.5superpull); % lower bowl if serifs: numeric bulb_diam[]; bulb_diam1=flare+.5(cap_stem-stem); bulb_diam2=flare+cap_stem-stem; pos0(bulb_diam1,180); pos1(hair,180); lft x0r=hround 1.25u; y0=min(.9h-.5bulb_diam1,.75h+.5bulb_diam1); bulb(2,1,0); % upper bulb pos10(bulb_diam2,-180); pos9(cap_hair,-180); lft x10r=hround .75u; y10=max(.1h+.5bulb_diam2,.3h-.5bulb_diam2); bulb(8,9,10); % lower bulb else: pos1(.5[vair,flare],angle(-8u,h)); lft x1r=hround u; bot y1l=vround .75h+o; y1r:=good.y y1r+eps; x1l:=good.x x1l; pos9(bot_thickness,angle(-2u,-h)); lft x9r=hround .75u; top y9l=vround .25h-o; y9r:=good.y y9r-eps; x9l:=good.x x9l; filldraw stroke term.e(2,1,left,1,4); % upper terminal filldraw stroke term.e(8,9,left,1,4); fi % lower terminal penlabels(0,1,2,3,4,5,6,7,8,9,10); currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2); endchar; cmchar "The numeral 4"; beginchar("4",24/22size#,23/22size#,1/22size#); italcorr fig_height#*slant-.5u#; %adjust_fit(0,0); w:=9u; h:=fig_height; d:=0; numeric light_stem, light_stem', diag_stem, alpha, cut; cut=.75notch_cut; light_stem=hround .4[fudged.stem,fudged.cap_stem]; light_stem'=hround max(tiny.breadth,light_stem-2stem_corr); diag_stem=max(tiny.breadth,.4[vair,fudged.hair]); pickup crisp.nib; pos5(cap_bar,90); pos6(cap_bar,90); lft x5=hround .5u; rt x6=hround(w-.5u); top y5r=vround(if serifs: 5/18[slab,h-light_stem]+1 else:.35(h-light_stem) fi+.5cap_bar); z4l=top lft z5r; y2=y2'=y5=y6; x1r=x2r=hround(w-3u+.5light_stem); penpos1(light_stem',0); penpos2(light_stem',0); y1=y3=h+apex_o+apex_oo; x3r+apex_corr=x1r; alpha=diag_ratio(1,diag_stem,y3-y4l,x3r-x4l); penpos3(alpha*diag_stem,0); penpos4(alpha*diag_stem,0); x0=x1l; z0=whatever[z3r,z4r]; x5'=x5; z5''=z5'+penoffset z4-z3 of currentpen=whatever[z4l,z3l]; fill diag_end(2r,1r,1,.5,3l,4l)---z5''...lft z5' ---lft z5l -- (x4r,y5l) -- z4r if y01.2upper_side: upper_side:=lower_side; fi pos1(top_thickness,-90); pos6(bot_thickness,-90); x1=x6=.5w; top y1l=h+o; bot y6r=-o; pos0(cap_stem,theta); lft x2l=w-rt x8l=hround 1.25u; lft x7r=w-rt x5r=hround .75u; x2r-x2l=upper_side-fine; x5r-x5l=lower_side-fine; ellipse_set(1l,2l,3l,0l); ellipse_set(1r,2r,3r,0r); ellipse_set(6l,5l,4l,0l); ellipse_set(6r,5r,4r,0r); numeric tau; tau=max(.8,.20710678/(superness-.5)); filldraw stroke z1e{left}..tension atleast tau..z2e{down} ..z3e---z4e..z5e{down}..tension atleast tau..z6e{left}; % S stroke pos7(lower_side,180); pos8(upper_side,180); y7=.5[y5l,y5r]; y8=.5[y2l,y2r]; pos9(vair,90); z9=z0; filldraw stroke z1e{right}..tension atleast tau..z8e{down} ..tension atleast tau and atleast 1..{-18u,-.618h}z9e; % upper right stroke filldraw stroke z6e{left}..tension atleast tau..z7e{up} ..tension atleast tau and atleast 1..{18u,.5h}z9e; fi % lower left stroke penlabels(0,1,2,3,4,5,6,7,8,9); currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2); endchar; cmchar "The numeral 9"; beginchar("9",24/22size#,23/22size#,1/22size#); italcorr fig_height#*slant-.5u#; %adjust_fit(0,0); w:=9u; h:=fig_height; d:=0; numeric top_thickness,bot_thickness,side_thickness,pull; top_thickness=max(fine.breadth,vround(slab-2vair_corr)); bot_thickness=max(fine.breadth,vround(slab-vair_corr)); side_thickness=max(fine.breadth,hround 1/3[curve,cap_curve]); pull=min(.25,1.5superpull); pickup fine.nib; pos2(bot_thickness,-90); pos3(side_thickness,0); pos4(top_thickness,90); pos5(side_thickness,180); pos6(vair,270); w-rt x3r=lft x5r=hround max(.75u,1.5u-.5side_thickness); x4-.1u=x6+.1u=x2+.75u=.5w; bot y2r=-o; y3=.5[y2,y4]; top y4r=h+o; y5=.5[y4,y6]; bot y6=vround 3/8h-o; path p; {{interim superness:=more_super; p=pulled_super_arc.l(3,4)(pull)}}; numeric t; t=xpart(p intersectiontimes((x3r,y5)--(x4,y5))); pos7(thin_join,360); z7l=point t of p; (x,y6r)=whatever[z7l,z6l]; x6r:=max(x,.5[x5r,x6]); filldraw stroke pulled_super_arc.e(2,3)(pull) & {{interim superness:=more_super; pulled_super_arc.e(3,4)(pull)}} & {{less_tense; pulled_super_arc.e(4,5)(pull) & pulled_super_arc.e(5,6)(pull)}} & z6e{right}...{direction t of p}z7e; % arc and bowl if serifs: pos1(hair,-180); pos0(flare,-180); lft x0r=min(lft x2-eps,hround 1.2u); y0=vround max(.1h+.5flare,.15h-.5flare)-o; {{less_tense; bulb(2,1,0)}}; % arc and bulb else: pos1(.1[bot_thickness,flare],-120); bot y1r=vround .07h-o; lft x1r=hround 1.3u; filldraw stroke term.e(2,1,left,.9,4); fi % terminal penlabels(0,1,2,3,4,5,6,7); currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2); endchar; %%%%%%%%%%%%%%%%% %%% romanu.mf %%% %%%%%%%%%%%%%%%%% cmchar "The letter A"; beginchar("A",24/22size#,23/22size#,1/22size#); %adjust_fit(cap_serif_fit#,cap_serif_fit#); w:=13u; h:=cap_height; d:=0; numeric left_stem,right_stem,outer_jut,alpha; right_stem=cap_stem-stem_corr; left_stem=min(cap_hair if hefty: -3stem_corr fi,right_stem); outer_jut=.8cap_jut; x1l=w-x4r=l+letter_fit+outer_jut+.5u; y1=y4=0; x2-x1=x4-x3; x3r=x2r+apex_corr; y2=y3=h+apex_o+apex_oo; alpha=diag_ratio(2,left_stem,y2-y1,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 y0lower_notch: {left}(x4'-1,lower_notch){up}... fi {z5-z6}diag_in(6r,5r,1,5l)--cycle; % diagonal else: penpos5(whatever,0); penpos6(whatever,90); z5l=z1l; z6l=z4l; z7=z6l+(max(eps,cap_stem-3stem_corr-tiny),0) rotated (angle(z5l-z6l)-90); z5r=z7+whatever*(z5l-z6l); z6r=z7+whatever*(z5l-z6l); filldraw stroke z5e..z6e; fi % diagonal if serifs: if hefty: serif(1,2,a,1/3,-cap_jut); % upper left serif else: serif(5,6,a,1/3,-cap_jut); fi % upper left serif dish_serif(2,1,b,1/2,cap_jut,c,1/2,cap_jut)(dark); % lower left serif dish_serif(3,4,e,1/2,cap_jut,f,1/2,cap_jut)(dark); fi % upper right serif math_fit(0,max(.5ic#-.5u#,0)); penlabels(1,1',2,3,4,4',5,6,7); currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2); endchar; cmchar "The letter O"; beginchar("O",24/22size#,23/22size#,1/22size#); italcorr .7cap_height#*slant-.5u#; %adjust_fit(0,0); w:=14u-width_adj; h:=cap_height; d:=0; penpos1(vair',90); penpos3(vround(vair+1.5vair_corr),-90); penpos2(cap_curve,180); penpos4(cap_curve,0); if monospace: x2r=hround 1.5u; interim superness:=sqrt superness; % make |"O"|, not |"0"| else: x2r=hround u; fi x4r=w-x2r; x1=x3=.5w; y1r=h+o; y3r=-o; y2=y4=.5h-vair_corr; y2l:=y4l:=.52h; penstroke pulled_super_arc.e(1,2)(.5superpull) & pulled_super_arc.e(2,3)(.5superpull) & pulled_super_arc.e(3,4)(.5superpull) & pulled_super_arc.e(4,1)(.5superpull) & cycle; % bowl math_fit(-.3cap_height#*slant-.5u#,ic#-.5u#); penlabels(1,2,3,4); currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2); endchar; cmchar "The letter P"; beginchar("P",24/22size#,23/22size#,1/22size#); italcorr .75cap_height#*slant-.5u#; %adjust_fit(cap_serif_fit#,0); w:=12u; h:=cap_height; d:=0; pickup tiny.nib; penpos1(cap_stem'-tiny,0); penpos2(cap_stem-tiny,0); pos0(cap_stem',0); pos0'(cap_stem,0); lft x1l=hround max(2u,3u-.5cap_stem'); top y1=h; bot y2=0; x1l=x2l=x0l=x0'l; y0=y0'=y7; penpos3(cap_band,90); penpos4(cap_band,90); penpos5(cap_curve if hefty:-3stem_corr fi,0); penpos6(.5[vair,cap_band],-90); penpos7(.5[vair,cap_band],-90); z3r=top z1; y4=y3; y5=.5[y4l,y6l]; y6=y7; x7=x2; y7l=vround .5h; x4=x6=.5w+.75u; x5r=hround(w-u); x4l:=x6l:=x4-.25cap_curve; filldraw stroke z1e--z0e--z0'e--z2e; % stem fill stroke z3e..pulled_arc.e(4,5) & pulled_arc.e(5,6)..z7e; % lobe if serifs: nodish_serif(1,0,a,1/3,cap_jut,b,1/3,.5cap_jut); % upper serif dish_serif(2,0',c,1/3,cap_jut,d,1/3,cap_jut); fi % lower serif math_fit(0,ic#-2.5u#); penlabels(0,1,2,3,4,5,6,7); currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2); endchar; cmchar "The letter Q"; beginchar("Q",24/22size#,23/22size#,1/22size#); italcorr .7cap_height#*slant-.5u#; %adjust_fit(0,0); w:=14u-width_adj; h:=cap_height; d:=comma_depth; numeric light_curve; light_curve=cap_curve-hround stem_corr; penpos1(vair',90); penpos3(vair',-90); penpos2(light_curve,180); penpos4(light_curve,0); if monospace: x2r=hround 1.5u; interim superness:=sqrt superness; % make |"Q"| like |"O"| else: x2r=hround u; fi x4r=w-x2r; x1=x3=.5w; y1r=h+o; y2=y4=.5h-vair_corr; y3r=-o; penstroke pulled_super_arc.e(1,2)(.5superpull) & pulled_super_arc.e(2,3)(.5superpull) & pulled_super_arc.e(3,4)(.5superpull) & pulled_super_arc.e(4,1)(.5superpull) & cycle; % bowl pickup tiny.nib; if hefty: penpos5(1.2(.5[cap_bar,light_curve]),0); penpos6(1.2light_curve,0); x5=.5w; x6r=hround(w-1.5u); y5=vround .28h; y6=-d; fill diag_end(6r,5r,.25,1,5l,6l)--diag_end(5l,6l,.5,1,6r,5r)--cycle; % tail else: pos3'(vair,270); pos5(vair,180); pos6(vair,90); pos7(cap_curve,85); penpos8(eps,180); z3'=z3; x6=x3; top y6r=vround(.2h+.5vair); lft x5r=hround(.5w-1.25u-.5vair); y5=.5[y3,y6]; bot y7l=-d; x7l=2/3[x6,x8]; y8=0; rt x8=hround(x4r+.1u); filldraw stroke z3'e{left}...z5e{up}...z6e{right} ..z7e{right}...z8e{up}; fi % tail math_fit(-.3cap_height#*slant-.5u#,ic#); penlabels(1,2,3,4,5,6,7,8); currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2); endchar; cmchar "The letter R"; beginchar("R",24/22size#,23/22size#,1/22size#); italcorr .75cap_height#*slant- if serifs: 1.75 else: .5 fi\\ u#; %adjust_fit(cap_serif_fit#,0); w:=if serifs: 12u+.5max(2u,cap_curve) else:12.5u-.5width_adj fi; h:=cap_height; d:=0; pickup tiny.nib; pos1(cap_stem',0); pos2(cap_stem',0); lft x1l=lft x2l=hround max(2u,3u-.5cap_stem'); top y1=h; bot y2=0; filldraw stroke z1e--z2e; % stem penpos3(cap_band,90); penpos4(cap_band,90); penpos5(cap_curve if hefty:-3stem_corr fi,0); penpos6(vair,-90); penpos7(vair,-90); z3r=top z1; y4=y3; y5=.5[y4l,y6l]; y6=y7; x7=x2; y7l=vround(.5h+.5vair); x4=x6; if serifs: x4=.5w-.5u; x5r=hround(w-2.25u); else: x4=.5w+.5u; x5r=hround(w-u); fi x4l:=x6l:=x4-.125cap_curve; fill stroke z3e..pulled_arc.e(4,5) & pulled_arc.e(5,6)..z7e; % lobe if serifs: pos6'(vair,-90); pos0(cap_stem,180); pos8(cap_curve,180); pos9(vair,-90); pos10(hair,0); z6'=z6; lft x0r=lft x8r=hround(x5-2/3u-.5cap_curve); y8=1/3[y2,y7]; y0=3/5[y2,y7]; x9=.5[x8l,x10r]; bot y9r=-o; rt x10r=hround(w-.05u); y10=1/4[y2,y7]; filldraw stroke z6'e{right}..z0e---z8e....z9e{right}..z10e{up}; % tail nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut); % upper serif dish_serif(2,1,c,1/3,cap_jut,d,1/3,cap_jut); % lower serif else: penpos8(cap_stem-2stem_corr,0); penpos9(cap_stem,0); x8=x6+.5u; y8=y6; x9r=hround(w-.5u); y9=0; fill z8l--diag_end(8l,9l,.5,1,9r,8r)--z8r--cycle; fi % tail math_fit(0,.75ic#); penlabels(0,1,2,3,4,5,6,7,8,9,10); currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2); endchar; cmchar "The letter S"; beginchar("S",24/22size#,23/22size#,1/22size#); italcorr cap_height#*slant-u#; %adjust_fit(0,0); w:=10u; h:=cap_height; d:=0; numeric theta; theta=90-angle(50u,h); slope:=-h/50u; % angle at middle numeric s_slab; s_slab=if serifs:slab else:vround .2[slab,cap_stem] fi; numeric ess'; ess'=max(fine.breadth,cap_ess); pickup fine.nib; pos2(max(fine.breadth,s_slab-vround vair_corr),-90); pos0(ess',theta); pos7(s_slab,-90); x2+x7=2x0=w; x7-x2=if serifs: u else: 0 fi; top y2l=h+o; bot y7r=-o; y0=.52h; lft x3l=hround u; rt x6r=hround(w-u); 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; 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.5u); lft x8r=hround u; bot y1=vround 2/3h+1; top y8=vround 1/3h-1; filldraw stroke z1e{x2-x1,10(y2-y1)}....{left}z2e; % upper arc filldraw stroke z7e{left}....{up}z8e; % lower arc path upper_arc, lower_arc; upper_arc=z1{x2-x1,10(y2-y1)}....{left}z2; lower_arc=z7{left}....{up}z8; pos10(.3[fine.breadth,cap_hair],0); pos9(.3[fine.breadth,cap_hair],0); x10r=x1l; top y10=top y2l; x9l=x8r; bot y9=bot y7r; x1l-x1'=x8'-x8r=1.6cap_curve-fine; y1'=y1; y8'=y8; numeric t; t=xpart(upper_arc intersectiontimes(z10l--z1')); filldraw z1l--z10r--z10l--subpath(t,0) of upper_arc--cycle; % upper barb t:=xpart(lower_arc intersectiontimes(z9r--z8')); filldraw z8r--z9l--z9r--subpath(t,1) of lower_arc--cycle; % lower barb else: pos1(1.2flare,-100); pos8(1.2flare,-100); x1l=good.x(x1l+w-1.75u-rt x1); lft x8r=hround .8u; top y1l=vround .93h+o; bot y8r=vround .1h-o; filldraw stroke term.e(2,1,right,.9,4); % upper arc and terminal filldraw stroke term.e(7,8,left,1,4); fi % lower arc and terminal math_fit(0,.5ic#); penlabels(0,1,1',2,3,4,5,6,7,8,8',9,10); currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2); endchar; cmchar "The letter T"; beginchar("T",24/22size#,23/22size#,1/22size#); italcorr cap_height#*slant-beak_jut#-.25u#; %adjust_fit(0,0); w:=13u-width_adj; h:=cap_height; d:=0; h:=vround(h-2stem_corr); pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); lft x1l=lft x2l=hround(.5w-.5cap_stem); top y1=h; bot y2=0; filldraw stroke z1e--z2e; % stem pickup crisp.nib; pos3(slab,90); pos4(hair,0); top y3r=h; x3=x1; rt x4r=hround(w-.65u); y4=good.y(y3l-beak)-eps; arm(3,4,e,beak_darkness,.7beak_jut); % right arm and beak pos5(hair,180); x5=w-x4; y5=y4; arm(3,5,f,beak_darkness,-.7beak_jut); % left arm and beak if serifs: dish_serif(2,1,c,1/3,1.414cap_jut,d,1/3,1.414cap_jut); % lower serif nodish_serif(1,2,a,1/3,.5cap_jut,b,1/3,.5cap_jut); fi % upper bracketing math_fit(-.75cap_height#*slant,ic#-2.5u#); penlabels(1,2,3,4,5,6); currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2); endchar; cmchar "The letter U"; beginchar("U",24/22size#,23/22size#,1/22size#); italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); %if monospace: adjust_fit(cap_serif_fit#-.5u#,cap_serif_fit#-.5u#) %else: adjust_fit(cap_serif_fit#,cap_serif_fit#) fi; w:=13u+.5width_adj; h:=cap_height; d:=0; pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); pos2'(cap_stem,180); z2'=z2; pos3(cap_band,-90); pos4(cap_hair,0); pos5(cap_hair,0); x1=x2; x3=.5[x1,x5]; x4=x5; x1l=w-x5r; top y1=top y5=h; y2=y4=1/3h; bot y3r=-o; lft x1l=hround max(2u,3u-.5cap_stem); filldraw stroke z1e--z2e; % left stem filldraw stroke pulled_arc.e(2',3) & pulled_arc.e(3,4)&z4e--z5e; % arc and right stem if serifs: dish_serif(1,2,a,1/3,cap_jut,b,1/3,cap_jut); % left serif dish_serif(5,4,c,1/2,cap_jut,d,1/2,cap_jut)(dark); fi % right serif math_fit(-cap_serif_fit#-.3cap_height#*slant-min(cap_height#*slant,u#), max(.5ic#-.5u#,0)); penlabels(1,2,3,4,5); currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2); endchar; cmchar "The letter V"; beginchar("V",24/22size#,23/22size#,1/22size#); italcorr cap_height#*slant+.25u#; %adjust_fit(cap_serif_fit#,cap_serif_fit#); w:=13u; h:=cap_height; d:=0; numeric left_stem,right_stem,outer_jut,alpha; left_stem=cap_stem-stem_corr; right_stem=min(cap_hair if hefty:-2stem_corr fi,left_stem); outer_jut=.75cap_jut; x1l=w-x4r=l+letter_fit+outer_jut+.25u; y1=y4=h; x2-x1=x4-x3; x2l+apex_corr=x3l; y2=y3=-apex_o; 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>cap_notch_cut: y0:=cap_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+cap_jut+.5u+1<=lft x4'l-cap_jut: inner_jut=cap_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 math_fit(.75u#-cap_height#*slant,ic#-4u#); penlabels(0,1,2,3,4); currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2); endchar; cmchar "The letter W"; beginchar("W",24/22size#,23/22size#,1/22size#); italcorr cap_height#*slant+.25u#; %adjust_fit(cap_serif_fit#,cap_serif_fit#); w:=18u; h:=cap_height; d:=0; numeric stem[],outer_jut,upper_notch,alpha,mid_corr; outer_jut=.7cap_jut; x1l=w-x8r=l+letter_fit+outer_jut+.25u; stem1=fudged.cap_stem-stem_corr; stem4=min(fudged.hair if hefty:-2stem_corr fi,stem1); stem2=stem4 if hefty:-2stem_corr fi; stem3=stem1 if hefty:-2stem_corr fi; x2-x1=x4-x3=x6-x5=x8-x7; x2l+apex_corr=x3l; x6l+apex_corr=x7l; y1=y8=h; y2=y3=y6=y7=-apex_o; y4=y5=if monospace: vround .6 fi\\ h; mid_corr=if monospace or hefty:-apex_corr else: 1/3jut 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+mid_corr| $\approx$ |x4r| z23=whatever[z1r,z2r]=whatever[z3l,z4l]; z45=whatever[z3r,z4r]=whatever[z5l,z6l]; z67=whatever[z5r,z6r]=whatever[z7l,z8l]; upper_notch=y4-cap_notch_cut; fill diag_end(1l,2l,1,1,3r,4r){z4-z3} ...if y45cap_notch_cut:(x67,cap_notch_cut)+.5right{down} --(x67,cap_notch_cut)+.5left{up} else: z67&z67 fi ...{z5-z6}special_diag_end(6,5,4,3){z3-z4} ...if y23>cap_notch_cut:(x23,cap_notch_cut)+.5right{down} --(x23,cap_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.5cap_jut; elseif hefty: inner_jut1=inner_jut4=cap_jut; else: fill diag_end(6r,5r,1,1,5l,6l)--.9[z5l,z6l] ..{z5-z6}.1[z5r,z6r]--cycle; % middle stem inner_jut2=.7inner_jut1; inner_jut4=1.1inner_jut3; if rt x1'r+cap_jut+.5u+1<=lft x5'l-.7cap_jut: inner_jut1=cap_jut; else: rt x1'r+inner_jut1+.5u+1=lft x5'l-inner_jut2; fi if rt x5'r+cap_jut+.5u+1<=lft x8'l-1.1cap_jut: inner_jut3=cap_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 math_fit(.75u#-cap_height#*slant,ic#-2.5u#); penlabels(0,1,2,3,4,5,6,7,8,23,45,67); currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2); endchar; cmchar "The letter X"; beginchar("X",24/22size#,23/22size#,1/22size#); italcorr cap_height#*slant-.25u#; %adjust_fit(cap_serif_fit#,cap_serif_fit#); w:=13u; h:=cap_height; d:=0; r:=w; numeric stem[],outer_jut,xjut,alpha[]; stem1=cap_stem-2stem_corr; stem2=min(cap_hair,stem1); outer_jut=.75cap_jut; xjut= if serifs: (stem1-stem2)/4 else: 0 fi; x1l=l+letter_fit+.5u+outer_jut; x2r=r-letter_fit-u-outer_jut-xjut; x3l=l+letter_fit+.25u+outer_jut+xjut; x4r=r-letter_fit-.25u-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$'=.1[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+cap_jut+.5u+1<=lft x2'l-cap_jut-xjut: inner_jut1=cap_jut; else: rt x1'r+inner_jut1+.5u+1=lft x2'l-inner_jut1-xjut; fi if rt x3'r+cap_jut+.5u+1<=lft x4'l-cap_jut-xjut: inner_jut2=cap_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 math_fit(0,.5ic#); penlabels(0,1,2,3,4,12,13,24,34); currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2); endchar; cmchar "The letter Y"; beginchar("Y",24/22size#,23/22size#,1/22size#); italcorr cap_height#*slant+.45u#; %adjust_fit(cap_serif_fit#,cap_serif_fit#); w:=13u; h:=cap_height; d:=0; numeric left_stem,right_stem,outer_jut,dy,alpha; left_stem=cap_stem-stem_corr; right_stem=min(cap_hair if hefty:-2stem_corr fi,left_stem); outer_jut=.75cap_jut; x1l=w-x4r=l+letter_fit+outer_jut+.05u; x2l=x5l=hround(.5w-.5left_stem); x3r=x5r; y1=y4=h; y2=y3=y5=.4h; dy=y1-y2; alpha=((x2l-x1l)++dy)/dy; penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0); penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0); penpos5(left_stem,0); penpos6(left_stem,0); x5=x6; y6=0; z0=whatever[z1r,z2r]=whatever[z3l,z4l]; if y0>y2+cap_notch_cut: y0:=y2+cap_notch_cut; fill z0+.5right{up}...{z4-z3}diag_end(3l,4l,1,1,4r,3r)--z5r --diag_end(5r,6r,1,1,6l,5l)--z5l--diag_end(2l,1l,1,1,1r,2r){z2-z1} ...{down}z0+.5left--cycle; % diagonals and stem else: fill z0--diag_end(0,4l,1,1,4r,3r)--z5r --diag_end(5r,6r,1,1,6l,5l)--z5l --diag_end(2l,1l,1,1,1r,0)--cycle; fi % diagonals and stem if serifs: numeric inner_jut; pickup tiny.nib; prime_points_inside(1,2); prime_points_inside(4,3); prime_points_inside(6,5); if rt x1'r+cap_jut+.5u+1<=lft x4'l-cap_jut: inner_jut=cap_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); % upper left serif dish_serif(4',3,c,.6,inner_jut,d,1/2,outer_jut)(dark); % upper right serif dish_serif(6',5,e,1/3,cap_jut,f,1/3,cap_jut); fi % lower serif math_fit(.5u#-cap_height#*slant,ic#-4u#); penlabels(0,1,2,3,4,5,6); currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2); endchar; cmchar "The letter Z"; beginchar("Z",24/22size#,23/22size#,1/22size#); italcorr cap_height#*slant-.5u#; %adjust_fit(0,0); w:=11u; h:=cap_height; d:=0; numeric arm_thickness[],z_stem; if hefty: arm_thickness1=Vround(slab-vair_corr); arm_thickness2=slab; z_stem=.8[vair,cap_stem]; else: arm_thickness1=slab; arm_thickness2=vround(slab+vair_corr); z_stem=.9[vair,cap_stem]; fi pickup tiny.nib; x3l=x4l=w-x1r=w-x2r; lft x3l=hround u; 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); 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 1.25u; y6=good.y(y5l-beak)-eps; arm(5,6,a,beak_darkness**.8,-.4beak_jut); % upper arm and beak pos7(arm_thickness2,-90); pos8(hair,0); bot y7r=0; x7=x4; rt x8r=hround(w-.9u); y8=good.y(y7l+1.2beak)+eps; arm(7,8,b,beak_darkness**.9,.6beak_jut); % lower arm and beak math_fit(0,.5ic#); penlabels(1,2,3,4,5,6,7,8); currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2); endchar; %%%%%%%%%%%%%%%%% %%% romanl.mf %%% %%%%%%%%%%%%%%%%% cmchar "The letter a"; beginchar("a",24/22size#,23/22size#,1/22size#); 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); w:=9u; h:=x_height; d:=0; 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; pos12(shaved_stem,0); x11=x12; top y12=slab+eps; filldraw z5'l---z10l...z11l{right}--z11r --z12r{left}...z10r+.75(z12-z11)---z5'r--cycle; % 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); currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2); endchar; cmchar "The letter b"; beginchar("b",24/22size#,23/22size#,1/22size#); italcorr .5x_height#*slant+min(.5curve#-u#,-.25u#); %adjust_fit(serif_fit#,0); w:=10u+serif_fit; h:=asc_height; d:=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=max(rt x3l-(lft x3r-tiny.lft x2l),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); currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2); endchar; cmchar "The letter c"; beginchar("c",24/22size#,23/22size#,1/22size#); italcorr x_height#*slant-.2u#; %adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi); w:=8u; h:=x_height; d:=0; 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:=min(x,x4l+.5u); 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; forsuffixes e=l,r: path p.e; p.e=z4e{right}..tension .9 and 1..z5e; if angle direction 1 of p.e>75: p.e:=z4e{right}..tension atleast.9 and 1..{dir 75}z5e; fi endfor filldraw stroke pulled_super_arc.e(2,3)(.7superpull) & pulled_super_arc.e(3,4)(.5superpull) & p.e; fi % arc and lower terminal penlabels(0,1,2,3,4,5); currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2); endchar; cmchar "The letter d"; beginchar("d",24/22size#,23/22size#,1/22size#); italcorr asc_height#*slant-serif_fit#+.5stem#-2u#; %adjust_fit(0,serif_fit#); w:=10u+serif_fit; h:=asc_height; d:=0; 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=min(lft x3l-(rt x3r-tiny.rt x2r),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); currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2); endchar; cmchar "The letter e"; beginchar("e",24/22size#,23/22size#,1/22size#); italcorr .5[bar_height#,x_height#]*slant+.5min(curve#-1.5u#,0); %adjust_fit(if monospace: .25u#,.5u# else: 0,0 fi); w:=7.25u+max(.75u,.5curve); h:=x_height; d:=0; numeric left_curve,right_curve; left_curve=right_curve+6stem_corr=curve if not serifs: -3stem_corr fi; if right_curvenotch_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); currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2); endchar; cmchar "The letter w"; beginchar("w",24/22size#,23/22size#,1/22size#); italcorr x_height#*slant+.25u#; %adjust_fit(serif_fit#,serif_fit#); w:=13u; h:=x_height; d:=0; 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 y45notch_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)--.9[z5l,z6l] ..{z5-z6}.1[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); currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2); endchar; cmchar "The letter x"; beginchar("x",24/22size#,23/22size#,1/22size#); italcorr x_height#*slant-.05u#; %adjust_fit(serif_fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ serif_fit#); w:=if serifs:9.5u else:9u fi; h:=x_height; d:=0; r:=w; 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); currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2); endchar; cmchar "The letter y"; beginchar("y",24/22size#,23/22size#,1/22size#); italcorr x_height#*slant+.25u#; %adjust_fit(serif_fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ serif_fit#); w:=if serifs:9.5u else:9u fi; h:=x_height; d:=desc_depth; 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 alpha1notch_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); currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2); endchar; cmchar "The letter z"; beginchar("z",24/22size#,23/22size#,1/22size#); italcorr x_height#*slant-.5serif_fit#-.3u#; %adjust_fit(0,.5serif_fit#); w:=8u; h:=x_height; d:=0; 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); currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2); endchar;