mode_setup; un#=1pt#; define_whole_pixels(un); beginchar("s",10un#,10un#,0); "Smiley face"; % adjust the amount of rotation to match your font % this seems good for CM pickup pencircle xscaled .7 un yscaled .2 un rotated 0; pair midpoint,leftpoint,rightpoint; midpoint = (w/2,h/2); % give it a longish jaw leftpoint = (1un,6un); rightpoint = (9un,6un); eyelevel = 8 un; lowmouth = 2 un; highmouth = 4 un; % oval for the face z1 = (w/2,0); z2 = leftpoint; z3 = (w/2,h); z4 = rightpoint; draw z1..z2..z3..z4..cycle; % eyes numeric x[], y[]; path eye; z1 = 1/3[leftpoint,rightpoint] + (0,whatever) = (whatever,eyelevel) = z2 + (.3un,0) = z3 - (0, .3un) = z4 - (.3un,0) = z5 + (0, .3un); eye = z1{left}..{left}z2{right}..{up}z3{down}..{right}z4{left} ..{down}z5{up}..{up}cycle; draw eye; draw eye shifted 1/3(rightpoint-leftpoint); % nose path nose; numeric x[], y[]; z1 = midpoint + (-.2un,2 un); z2 = midpoint - (1un,1 un); nose = z1{down}..{z2-midpoint}z2; draw nose; draw nose reflectedabout (midpoint,midpoint-(0,1)); % mouth numeric x[], y[]; z1 = (xpart(point 1 of eye), highmouth); z2 = midpoint + (0, whatever) = (whatever,lowmouth); z3 = z1 reflectedabout(midpoint,z2); draw z1..z2..z3; endchar; beginchar("1",8un#,8un#,0); "Dour smiley face"; % adjust the amount of rotation to match your font % this seems good for CM pickup pencircle xscaled .7 un yscaled .2 un rotated 0; % near-circle for the face draw (w/2,0)..(1un,h/2)..(w/2,h)..(w-1un,h/2)..cycle; % small lacrimonals for the eyes draw (w/3,2/3h){left}..(w/3-.1un,2/3h-.1un)..cycle; draw (2/3w,2/3h){right}..(2/3w+.1un,2/3h-.1un)..cycle; % off-vertical line for the nose draw (w/2,2/3h)..(w/2-.3un,h/2); % mouth draw (1/3w,1/4h)..(1/2w,1/8h)..(2/3w,1/4h); endchar; beginchar("2",8un#,6un#,0); "Insane smiley face"; pickup pencircle scaled .5 un; % circle for the face draw (w/2,0)..(1un,h/2)..(w/2,h)..(w-1un,h/2)..cycle; % dots drawdot (w/3,2/3h); drawdot (2/3w,2/3h); % no nose % mouth draw (1/4w,1/2h)..(1/2w,1/8h)..(3/4w,1/2h); endchar; beginchar("3",8un#,6un#,0); "Normal smiley face"; pickup pencircle scaled .5 un; % circle for the face draw (w/2,0)..(1un,h/2)..(w/2,h)..(w-1un,h/2)..cycle; % dots drawdot (w/3,2/3h); drawdot (2/3w,2/3h); % no nose % mouth draw (1/3w,1/3h)..(1/2w,1/6h)..(2/3w,1/3h); endchar; beginchar("4",8un#,6un#,0); "Normal frowney face"; pickup pencircle scaled .5 un; % circle for the face draw (w/2,0)..(1un,h/2)..(w/2,h)..(w-1un,h/2)..cycle; % dots drawdot (w/3,2/3h); drawdot (2/3w,2/3h); % no nose % frowney face draw (1/3w,1/6h)..(1/2w,1/3h)..(2/3w,1/6h); endchar; beginchar("5",8un#,6un#,0); "lemon-drop face"; pickup pencircle scaled .5 un; % circle for the face draw (w/2,0)..(1un,h/2)..(w/2,h)..(w-1un,h/2)..cycle; % dots drawdot (w/3,2/3h); drawdot (2/3w,2/3h); % no nose % mouth draw (1/3w,1/4h){(1,2)}..(1/2w,1/4h)..{(1,-2)}(2/3w,1/4h); endchar; beginchar("6",8un#,6un#,0); "blank face"; pickup pencircle scaled .5 un; % circle for the face draw (w/2,0)..(1un,h/2)..(w/2,h)..(w-1un,h/2)..cycle; % dots drawdot (w/3,2/3h); drawdot (2/3w,2/3h); % no nose % mouth draw (1/3w,1/4h)..(2/3w,1/4h); endchar;