% mathematical symbols by Anthony Phan.
% file: mathcallgreek.mf (calligraphic font)
% last modification: May 16, 2005.

%
% UPPERCASE
%

let math_fit = do_math_fit;
math_fitting := true;

cmchar "Calligraphic Alpha";
beginchar(hex"81",14.4u#,cap_height#,0);
  italcorr .5u#;
  adjust_fit(-.05w#,0); pickup cal.nib;
  lft x5=.54w; x7=.9w;
  top y5=h+.4cap_curve; bot y7=bot_flourish_line;
  z6=.3[z7,z5]-bend;
  pickup tilted.nib;
  lft x1=.05w; x2=.2w; rt x4=x5;
  y1=y2+.1h; bot y2=bot_flourish_line; top y4=h+.4cap_curve;
  y3=y6; z3=whatever[z2,z4]+2bend;
  draw\\(z1..tension 1.2..{right}z2) softjoin flex(z2,z3,z4); % left diagonal
  pickup cal.nib;
  erase fill\\(0,bot y5)--(w,bot y5)--(w,top y5)--(0,top y5)--cycle;
  draw flex(z5,z6,z7) softjoin (z7--z7+cal.extension); % right diagonal
  draw rt z3--z6;  % bar
  math_fit(.5u#-.1cap_height#*slant,ic#); labels(1,2,3,4,5,6,7);
endchar;

cmchar "Calligraphic Beta";
beginchar(hex"82",9.9u#,cap_height#,0);
  italcorr max(.8h#*slant-.1w#,.3h#*slant)+.5u#;
  adjust_fit(0,0); pickup cal.nib;
  lft x1=lft x3=0; x4=.6[x2,x5]; rt x5=.9w; x6=.4w; rt x7=w;
  x8=.4[x9,x7]; lft x9=rt x3;
  top y1=h+o; bot y3=-o; z2=.3[z3,z1]+bend;
  y4=y1; y5=.6[y6,y4]; y6=.55h; y7=.45[y8,y6]; bot y8=-o; y9=.1h;
  draw z1-cal.extension--flex(z1,z2,z3);  % stem
  draw z2{up}...z4...z5{down}...{dir 200}z6{dir 10}
  ...z7{down}...z8{left}...z9;  % lobes
  math_fit(.5u#,.3h#*slant+.5u#); labels(1,2,3,4,5,6,7,8,9);
endchar;

cmchar "Calligraphic Gamma";
beginchar(hex"83",13.5u#,cap_height#,0);
  italcorr h#*slant+.5u#;
  adjust_fit(-.1w#,-u#); pickup cal.nib;
  x1=.5w; x3=.4w;  lft x4=.1w; x5=x2+.35w; x6=.7[x1,x7]; rt x7=w;
  top y1=top y6=h; z2=.5[z3,z1]+1.2bend;
  bot y3=-o; y4=.1h; y5=y2; y7=.9h;
  draw flex(z1,z2,z3) softjoin (z3...{x4-x3,5(y4-y3)}z4);  % stem
  draw z1-flourish_change{up}...(z1-(u,0))---z6...{down}z7;  %  upper bar
  math_fit(0,.5ic#); labels(1,2,3,4,5,6,7);
endchar;

cmchar "Calligraphic Epsilon";
beginchar(hex"85",8.5u#,cap_height#,0);
  italcorr max(h#*slant-.1w#,.2h#*slant)+.5u#;
  adjust_fit(0,0); pickup cal.nib;
  x1=.9[x3,x2]; rt x2=.9w; x3=.6[x4,x2]; lft x4=.05w;
  x5=.7[x6,x2]; lft x6=0; x7=.5[x6,x8]; rt x8=w;
  y1=y2-.1h; y2=.9h+o; top y3=h+o; y4=.5[y5,y3];
  y5=.55h; y6=.6[y5,y7]; bot y7=-o; y8=.2h;
  draw\\(z1{2(x2-x1),y2-y1}...z2)
  softjoin (z2...z3{left}...z4{down}...{right}z5);  % upper arc
  draw z5{left}...z6{down}...z7{right}...z8;  % lower arc
  math_fit(.5u#-.2h#*slant,.2h#*slant+.5u#);
  labels(1,2,3,4,5,6,7,8);
endchar;

cmchar "Calligraphic Zeta";
beginchar(hex"86",10.4u#,cap_height#,0);
  italcorr h#*slant+.5u#;
  adjust_fit(0,0); pickup heavy_cal.nib;
  lft x1=.05w; x2=.4w; rt x3=w; lft x7=0; x8=.8[x7,x9]; rt x9=1.1w;
  top y1=58/70h; top y2=top y3=h; bot y7=bot y8=0; bot y9=15/70h;
  z5=.55[z7,z3]+bend;
  x10=x5-2.5u; x11=x5+2u; x12=.2[x3,x2]; x13=.2[x7,x8];
  y10=y5; bot y11=y10-6/70h; y12=64/70h; y13=6/70h;
  draw z1{up}...z2{right}...{right}z12...z3;  % upper arm
  draw flex(z3,z5,z7);  % diagonal
  draw z7...z13{right}...{right}z8...{up}z9;  % lower arm
  pickup light_cal.nib;
  draw z10...z5{right}...{down}z11;  % bar
  math_fit(.5u#,.6ic#); labels(1,2,3,5,7,8,9,10,11,12,13);
endchar;


cmchar "Calligraphic Eta";
beginchar(hex"87",12.2u#,cap_height#,0);
  italcorr max(h#*slant-.2w#,.15h#*slant)+.5u#;
  adjust_fit(4u#,0); pickup cal.nib;
  lft x1=lft x3=.5u; rt x4=rt x6=.8w-.6u; rt x9=w;
  top y1=top y4=h; bot y3=-.06h; bot y6=bot_flourish_line; y9=y6+.1h;
  z2=.6[z3,z1]+bend; z5=.4[z6,z4]-bend;
  path p[]; p1=flex(z1,z2,z3); p2=flex(z4,z5,z6);
  p3=(-w,.45h)--(2w,.45h);
  rt z7+2bend=p3 intersectionpoint p1; rt z8=p3 intersectionpoint p2;
  draw (z1-flourish_change-bend{curl2}....z1-(u,0)---z1) softjoin p1;  % left stem
  draw p2 softjoin (z6{right}...{up}z9);  % right stem
  draw z7--z8;  % bar
  math_fit(.5u#-.8h#*slant,.15h#*slant+.5u#);
  labels(1,2,3,4,5,6,7,8,9);
endchar;

cmchar "Calligraphic Theta";
beginchar(hex"88",12.6u#,cap_height#,0);
  italcorr .7h#*slant+.5u#;
  adjust_fit(0,0); pickup cal.nib;
  x1=.3w; lft x2=0; x3=.5w; rt x4=w; x5=.6w; lft x6=.27w;
  top y1=top y5=h+o; y2=.55h; bot y3=-o; y4=.5h; y6=y2;
  y9 = good.y 0.65h; y7 = y10 = good.y 0.35h; y8 = good.y 0.5h;
  x7 = x6; x8 = 0.5w; x9 = x10 = w-x6;
  draw z1...z2{down}...z3{right}...z4{up}...z5{left}...{down}z6
  --z7{up}...z8{right}...z9{up}--z10;
  math_fit(.5u#-.3h#*slant,ic#-.5u#);
  labels(1,2,3,4,5,6,7,8,9,10);
endchar;

cmchar "Calligraphic Iota";
beginchar(hex"89",10.8u#,cap_height#,0);
  italcorr max(h#*slant+.5cap_curve#-.2w#,.15h#*slant)+.5u#;
  adjust_fit(0,0); pickup cal.nib;
  lft x0=0; x1=.9w; x2=x4=.5w; x5=.2w; x6=.8w; rt x7=1.05w;
  y0=.8h; top y1=top y2=h; z3=.5[z4,z2]+bend;
  bot y4=bot y5=bot y6=0; y7=.15h;
  draw z0{up}...z2---z1;  % upper bar
  z8=.5[z2,z1];
  draw z8{left}...z3{down}...{left}.5[z4,z5];  % stem
  draw z5---z6...{up}z7;  % lower bar
  math_fit(.5u#-.8h#*slant,.15h#*slant+.5u#);
  labels(0,1,2,3,4,5,6,7);
endchar;

cmchar "Calligraphic K";
beginchar(hex"8A",11u#,cap_height#,0);
  italcorr max(h#*slant-.2w#,.2h#*slant)+.5u#;
  adjust_fit(0,.1w#); pickup cal.nib;
  lft x1=lft x3=0; top y1=h+o; bot y3=-o; z2=.6[z3,z1]+bend;
  draw z1-cal.extension--flex(z1,z2,z3);  % stem
  pickup light_cal.nib;
  rt x4=.9w; x5=x4-.1w; x7=.8w; rt x8=1.1w;
  y4=.9h; top y5=h+o; bot y7=-o; y8=.2h-o;
  (lft z6)t_=z2.t_+penoffset up of pen_[cal.nib];
  draw z4{up}...{left}z5..tension atleast 2..{down}z6
  ..tension atleast 3 and atleast 2..z7{right}...{up}z8;  % diagonals
  math_fit(.5u#,.2h#*slant+.5u#); labels(1,2,3,4,5,6,7,8);
endchar;

cmchar "Calligraphic Lambda";
beginchar(hex"8B",14.4u#,cap_height#,0);
  italcorr .5u#;
  adjust_fit(-.05w#,0); pickup cal.nib;
  lft x5=.54w; x7=.9w;
  top y5=h+.4cap_curve; bot y7=bot_flourish_line;
  z6=.3[z7,z5]-bend;
  pickup tilted.nib;
  lft x1=.05w; x2=.2w; rt x4=x5;
  y1=y2+.1h; bot y2=bot_flourish_line; top y4=h+.4cap_curve;
  y3=y6; z3=whatever[z2,z4]+2bend;
  draw\\(z1..tension 1.2..{right}z2) softjoin flex(z2,z3,z4); % left diagonal
  pickup cal.nib;
  erase fill\\(0,bot y5)--(w,bot y5)--(w,top y5)--(0,top y5)--cycle;
  draw flex(z5,z6,z7) softjoin (z7--z7+cal.extension); % right diagonal
  math_fit(.5u#-.1cap_height#*slant,ic#); labels(1,2,3,4,5,6,7);
endchar;

cmchar "Calligraphic Mu";
beginchar(hex"8C",19.8u#,cap_height#,0);
  italcorr max(h#*slant-u#,.75cap_curve#)+.5cap_curve#+.5u#;
  adjust_fit(-.1w#,0); pickup med_cal.nib;
  (z20)t_=(z5)t_+penoffset down of currentpen
  =(z4)t_+penoffset down of pen_[tilted.nib];
  z6=.3[z7,z5]-bend; z9=.3[z8,z10]+.5bend; z12=.3[z13,z11]-bend;
  x7=.5[x2,x13]; bot y7=.05h; top y5=h+o;
  (z0)t_=(z7)t_+penoffset right of currentpen
  =(z8)t_+penoffset right of pen_[tilted.nib];
  pickup cal.nib;
  (z30)t_=(z11)t_+penoffset up of currentpen
  =(z10)t_+penoffset up of pen_[tilted.nib];
  x13=w; bot y13=bot_flourish_line;
  pickup tilted.nib;
  lft x1=.1w; x2=.2w; x4=.2[x2,x7]; x10=.8[x7,x13];
  y1=.05h+y2; bot y2=bot_flourish_line; top y10=h+o;
  z3=whatever[z2,z4]+2bend; y3=y6;
  draw\\(z1..tension1.2..{right}z2) softjoin flex(z2,z3,z4);  % left stem
  erase fill z20--(.5w,y20)--(.5w,top y4)--(x20-4u,top y4)--cycle;
  pickup med_cal.nib;
  draw flex(z5,z6,z7);  % left diagonal
  pickup cal.nib;
  draw flex(z11,z12,z13) softjoin (z13--z13+cal.extension);  % right stem
  pickup tilted.nib;
  path p; p=flex(z8,z9,z10);
  erase fill z0--(x0,y0-.5h)--(x9,y0-.5h)--subpath(1,0) of p--cycle;
  erase fill z30--(x30,y30+.5h)--(x9,y30+.5h)--subpath(1,2) of p--cycle;
  draw p;  % right diagonal
  math_fit(.5u#-.05h#*slant,ic#);
  labels(0,1,2,3,4,5,6,7,8,9,10,11,12,13,20,30);
endchar;

cmchar "Calligraphic Nu";
beginchar(hex"8D",9u#,cap_height#,0);
  italcorr h#*slant+.5u#;
  adjust_fit(2u#,2.5u#); pickup med_cal.nib;
  (z0)t_=(z5)t_+penoffset down of currentpen
  =(z4)t_+penoffset down of pen_[tilted.nib];
  (z20)t_=(z7)t_+penoffset up of currentpen
  =(z8)t_+penoffset up of pen_[tilted.nib];
  z6=.3[z7,z5]-bend; rt z7=(w,0); top y5=h+o;
  pickup tilted.nib;
  lft x1=x2-2u; x2=-u; x4=0; x10=w; rt x11=w+3u;
  y1=y2+.05h; bot y2=bot_flourish_line;
  y3=y6; z3=whatever[z2,z4]+2bend;
  y10=h; z9=.7[z8,z10]-.5bend; bot y11=h;
  draw\\(z1..tension1.2..{right}z2) softjoin flex(z2,z3,z4);  % left stem
  draw flex(z8,z9,z10)...{right}z11;  % right stem
  pickup med_cal.nib;
  erase fill  z0--(.5w,y0)--(.5w,1.5h)--(x0-4u,1.5h)--cycle;
  erase fill  z20--(.5w,y20)--(.5w,-.5h)--(x20+4u,-.5h)--cycle;
  draw flex(z5,z6,z7);  % diagonal
  math_fit(.5u#-.05h#*slant,.3h#*slant);
  labels(0,1,2,3,4,5,6,7,8,9,10,11,20);
endchar;

cmchar "Calligraphic Omicron";
beginchar(hex"8F",12.6u#,cap_height#,0);
  italcorr .7h#*slant+.5u#;
  adjust_fit(0,0); pickup cal.nib;
  x1=.3w; lft x2=0; x3=.5w; rt x4=w; x5=.6w; lft x6=.27w;
  top y1=top y5=h+o; y2=.55h; bot y3=-o; y4=.5h; y6=y2;
  path p; p=z1...z2{down}...z3{right}...z4{up}...z5{left}...{down}z6;
  draw subpath(0,4.8) of p;  % bowl
  math_fit(.5u#-.3h#*slant,ic#-.5u#);
  labels(1,2,3,4,5,6);
endchar;

%
% a revoir
%

cmchar "Calligraphic Pi";
beginchar(hex"90",13u#,cap_height#,0);
  italcorr h#*slant+.5u#;
  adjust_fit(0,-.5u#);
  pickup heavy_cal.nib;
  x1=x3-0.03w; x3=.3w;
  lft x4=0; x5=.25w; x6=.85w; rt x7=1.05w;
  top y1=h; y4=3/4h; top y5=top y6=h; top y7=1.05h;
  draw z4{curl 2}...z5{right}...z6{right}...{up}z7;  % arms
  pickup tilted.nib;
  bot y3=-.1h;
  z2=.3[z3,z1]+bend;
  top y0=y1; x0=x2;
  draw z0---z2...z3;  % left stem
  pickup cal.nib;
  x8 = 0.75w; x10 = 0.9w;
  top y8=y1; bot y10=bot_flourish_line;
  z9=.3[z10,z8]-bend;
  draw flex(z8,z9,z10) softjoin (z10--z10+cal.extension); % right stem
  math_fit(.5u#-5/7h#*slant,-u#); labels(1,2,3,4,5,6,7);
endchar;

cmchar "Calligraphic Rho";
beginchar(hex"91",9u#,cap_height#,0);
  italcorr .8h#*slant+.5u#;
  adjust_fit(4u#,0); pickup cal.nib;
  lft x1=lft x3=0; x4=x6=.3[x1,x5]; rt x5=w;
  top y1=top y4=h; y3=-o; y5=.55[y6,y4]; bot y6=.3h;
  z2=.5[z3,z1]+bend;
  draw flex(z1,z2,z3);  % stem
  draw z1{left}...{down}z1-flourish_change;  % swash
  draw z1---z4...z5{down}...{left}z6;  % lobe
  math_fit(.5u#-.8h#*slant,.5ic#); labels(1,2,3,4,5,6);
endchar;

cmchar "Calligraphic Tau";
beginchar(hex"93",13u#,cap_height#,0);
  italcorr h#*slant+.5u#;
  adjust_fit(0,-.5u#); pickup heavy_cal.nib;
  x1=.47w; x3=.5w; lft x4=0; x5=.25w; x6=.85w; rt x7=1.05w;
  top y1=h; bot y3=-.1h; y4=3/4h; top y5=top y6=h; top y7=1.05h;
  z2=.3[z3,z1]+bend;
  top y0=y1; x0=x2;
  z8=(2u,.2h);
  draw z0---z2...z3;  % stem
  draw z4{curl 2}...z5{right}...z6{right}...{up}z7;  % arms
  math_fit(.5u#-5/7h#*slant,-u#); labels(1,2,3,4,5,6,7);
endchar;

cmchar "Calligraphic Chi";
beginchar(hex"96",11.4u#,cap_height#,0);
  italcorr h#*slant+.5u#;
  adjust_fit(0,0); pickup cal.nib;
  lft x1=.08w; lft x2=.2w; x4-x3=x2-x1; rt x4=w;
  h-y1=y4=1/9h; top y2=h; bot y3=0;
  draw z1{up}....z2{right}
  ... .2[z2+(.1w,0),z3-(.1w,0)]---.8[z2+(.1w,0),z3-(.1w,0)]
  ...{right}z3....{up}z4;  % left diagonal
  x5=x6-u; rt x6=w; lft x7=0; x8=x7+u;
  top y5=h; y6=.85h; y7=h-y6; bot y8=0;
  draw z5{right}...z6{down}
  ..tension atleast 3..{down}z7...{right}z8;  % right diagonal
  math_fit(.5u#,1/7h#*slant+.5u#); labels(1,2,3,4,5,6,7,8);
endchar;

%
% LOWERCASE
%

let math_fit = ignore_math_fit;
math_fitting := false;

% just look at italic corection and math fitting
cmchar "Calligraphic alpha";
beginchar(hex"A1", 11u#, x_height#, 0);
  italcorr max(0.15x_height#*slant+0.5lower_cal_width#, 
    x_height#*slant+0.5lower_cal_width#-2u#) if math_fitting: -0.5u# fi;
  adjust_fit(0, 0);
  %
  pickup lower_cal.nib;
  top y1 = vround 0.98h;
  bot y2 = bot y5 = -oo;
  top y4 = x_height+oo;
  y3 = 0.5[y2, y4];
  y6 = good.y 7/8[x_height, y5];
  x1 = x5 = good.x(w-2.5u);
  x3 = good.x 1.25u;
  x6 = w; x2 = x4 = 0.5[x3, 6.5u];
  draw z1{down}...z2 left_to_up z3 up_to_right z4...z5{right}...z6;
  %
  math_fit(-.3x_height#*slant+0.5curve#-u#, ic#);
  labels(1, 2, 3, 4, 5, 6);
endchar;

% just look at italic corection and math fitting
cmchar "Calligraphic beta";
beginchar(hex"A2", 8u#, asc_height#, desc_depth#);
  italcorr max(.8h#*slant-.1w#, .5x_height#*slant)+.5u#;
  adjust_fit(0, 0);
  % see es-zet
  pickup lower_cal.nib;
  x2-x1=hround 0.5u; x2 = good.x 1.5u; x4 = .6[x2, x5];
  x5 = good.x(0.9w-1.25u); lft x6 = x2; x7 = good.x(w-1.25u);
  x8 = .4[x9, x7]; lft x9 = rt x2;
  bot y1 = -d-eps; y2 = 0.5x_height;
  top y4 = h+oo; y5 = .6[y6, y4]; y6 = .55h; y7 = .45[y8, y6];
  bot y8 = -oo; y9 = .1h;
%  draw z1-cal.extension--flex(z1, z2, z3);  % stem
  draw z1...z2{up}...z4...z5{down}...{dir 200}z6{dir 10}
  ...z7{down}...z8{left}...z9;  % lobes
  %
  math_fit(.5u#, .3h#*slant+.5u#);
  labels(1, 2, 3, 4, 5, 6, 7, 8, 9);
endchar;

% just look at math fitting
cmchar "Calligraphic gamma";
beginchar(hex"A3", 10u#, x_height#, desc_depth#);
  italcorr h#*slant;
  adjust_fit(0, 0);
  pickup lower_cal.nib;
  x1 = good.x 0; x3 = good.x(w-3.4u);
  x2 = max(1.25u, 0.5[x1, x3]);%0.5[x1, x3];
  x5 = good.x 3.8u;
  x4=2/3[x3, x5];
  rt x6 = hround(w-0.5u);
  top y2 = x_height+oo; y1 = good.y 7/8[0, y2]; bot y4 = -d-eps;
  y3 = y5 = 0.825[y2, y4]; top y6=vround 0.98 h;
  draw  z1...z2{right}... z3 down_to_left z4 left_to_up z5...z6{up};
  math_fit(.5u#, .3h#*slant+.5u#);
  labels(1, 2, 3, 4, 5, 6);
endchar;

cmchar "Calligraphic epsilon";
beginchar(hex"A5", 8u#,x_height#,0);
  italcorr max(h#*slant-.1w#,.2h#*slant)+.5u#;
  adjust_fit(0,0); pickup lower_cal.nib;
  rt x2 = hround(w-1.1u); x3=.6[x4,x2]; x4=good.x(1.5u);
  x5=.7[x6,x2]; x6= good.x 1.25u; x7=.5[x6,x8]; x8 = good.x w;
  x1=good.x 0.6[x5, x2];
  %y1=y2-.1h;
  y2=.9h+oo; top y3=h+oo; y4=.5[y5,y3];
  y5=good.y .55h; y6=.5[y5,y7]; bot y7=-oo; y8=good.y 1/4x_height;
  y1 = good.y 0.6[y5, y3];
  draw\\(z1{2(x2-x1),y2-y1}...z2)
  softjoin (z2...z3{left}...z4 down_to_right z5);  % upper arc
  draw z5{left}...z6 down_to_right z7...z8;  % lower arc
  math_fit(.5u#-.2h#*slant,.2h#*slant+.5u#);
  labels(1,2,3,4,5,6,7,8);
endchar;

cmchar "The letter eta";
beginchar(hex"A7", 9u#, x_height#, desc_depth#);
  italcorr max(0.15x_height#*slant+0.5lower_cal_width#, 
    0.75x_height#*slant+0.5lower_cal_width#);
  adjust_fit(0, 0);
  %
  pickup lower_cal.nib;
  x1 = 0; x3 = x4 = good.x 2.5u; bot y4 = -oo;
  x6 = x7 = good.x(w-1.5u); bot y7 = -d-eps;
  draw hook_in(1, 2, 3)---z4;
  draw ital_arch(4, 5, 6)...z7{down};
  %
  math_fit(-2/3x_height#*slant+0.5hair#+0.5u#, ic#);
  labels(1, 2, 3, 4, 5, 6, 7, 8);
endchar;

cmchar "The letter theta";
beginchar(hex"A8", 8u#, asc_height#, 0);
  italcorr .7asc_height#*slant+0.5lower_cal_width#-u#
  if math_fitting: -0.5u# fi;
  adjust_fit(0, 0);%(-0.25u#, -0.25u#);
  %
  pickup lower_cal.nib;
  top y1 = h+oo; bot y3 = -oo; y2 = y4 = 0.5[y1, y3];
  x2 = good.x 1.25u; x4 = good.x(w-1.25u); x1 = x3 = 0.5[x2, x4];
  z5 = z1; x6 = good.x 0.2[x2, x4]; x7 = 0.7[x2, x4];
  y6 = 0.8[y3, y5]; y7 = good.y 0.43[y3, y5];
  save p; path p; p = z1 left_to_down z2 down_to_right
  z3 right_to_up z4 up_to_left z5 left_to_down z6...z7{right}...z4;
  draw subpath (1.75, 12) of p;
  math_fit(-.3x_height#*slant+0.5curve#-u#, ic#);
  labels(1, 2, 3, 4, 5, 6, 7);
endchar;

cmchar "The letter theta (variant)";
beginchar(hex"BA", 9.5u#, asc_height#, 0);
  italcorr .7asc_height#*slant+0.5lower_cal_width#-u#
  if math_fitting: -0.5u# fi;
  adjust_fit(0, 0);%(-0.25u#, -0.25u#);
  %
  pickup lower_cal.nib;
  bot y5 = -oo; top y7 = h+oo; y6 = 0.5[y5, y7];
  y4 = 0.7[y5, 0.57x_height];
  y8 = 0.8[y5, y7]; y9 = good.y 0.43[y5, y7];
  top y10 = x_height+oo; y10 := good.y 7/8[0, y10];
  x1 = 0; x3 = good.x 2.5u;
  x6 = good.x(w-1.75u);
  x5 = x7 = 0.5[x3, x6];
  x8 = good.x 0.2[x3, x6]; x9 = 0.75[x3, x6]; x10 = good.x w;
  draw hook_in(1,2,3)...
  z5{right} ... z6 up_to_left z7 left_to_down z8...z9{right}...z10;
  math_fit(-.3x_height#*slant+0.5curve#-u#, ic#);
  labels(1,2,3,4,5,6,7,8,9,10);
endchar;

cmchar "The letter kappa";
beginchar(hex"A9", 9u#, x_height#, 0);
  italcorr max(0.2x_height#*slant+0.1w#, 
    0.95x_height#*slant-0.1w#+0.5u#);
  adjust_fit(0, 0);
  %
  pickup lower_cal.nib;
  top y1 = h; bot y2 = -oo; x1 = x2 = good.x 1.5u;
  draw z1-cal.extension--z1--z2;
  %
  rt x4 = .9w; x5 = x4-.1w; x7 = .8w; rt x8 = 1.1w;
  y4 = .9x_height; top y5 = x_height+oo; bot y7 = -oo; y8 = .2x_height-oo;
  (lft z6)t_ = (x2, 0.4x_height).t_+penoffset up of pen_[lower_cal.nib];
  draw z4{up}...{left}z5..tension atleast 2..{down}z6
  ..tension atleast 3 and atleast 2..z7{right}...{up}z8; % diagonals
  %
  math_fit(0, 1/3x_height#*slant+0.5hair#+0.5u#);
  labels(1, 2, 3, 4, 5, 6, 7, 8);
endchar;

cmchar "Calligraphic mu";
beginchar(hex"AB", 9u#, x_height#, desc_depth#);
  italcorr max(0.15x_height#*slant+0.5lower_cal_width#, 
    x_height#*slant+0.5lower_cal_width#-2u#);
  adjust_fit(0, 0);
  %
  pickup lower_cal.nib;
  x1 = x2 = x3 = good.x 1.5u;
  x4 = 0.5[x2, x5]; x5 = x6 = x7 = good.x(w-2.5u); x9 = w;
  bot y1 = -d-eps; top y2 = h;
  y3 = 0.7[y4, y5]; bot y4 = -oo; y5 = 0.57h; top y6 = h;
  draw z1..z2;
  draw z3 down_to_right z4...z5{up};
  draw z6..hook_out(7, 8, 9);
  %
  math_fit(-2/3x_height#*slant+0.5hair#+0.5u#, ic#);
  labels(1, 2, 3, 4, 6, 7, 8, 9);
endchar;

%cmchar "Calligraphic nu";
% beginchar(hex"AC", 9u#, x_height#, 0);
%   italcorr .7x_height#*slant+0.5lower_cal_width#-u#
%   if math_fitting: -0.5u# fi; % same as "o"
%   adjust_fit(0, 0);
%   %
%   pickup lower_cal.nib;
%   x1 = good.x 0; x2 = 0.5[x1,x3]; x3 = x4-.25(y3-y4);
%   x4 = good.x 0.5w; x5 = good.x(w-1.25u); x6 = good.x(w-2u);
%   top y2 = x_height+oo; y1 = good.y 7/8[0, y2];
%   y3 = .57x_height;%3/4x_height;
%   bot y4 = -oo; y5 = 0.57h; top y6 = h+oo;
%   draw z1...z2{right}...z3---z4;
%   draw z4{(x5-x4), 1/3(y5-y4)}...z5{up}...z6;
%   %
%   math_fit(-2/3x_height#*slant+0.5hair#+0.5u#, ic#);
%   labels(1, 2, 3, 4, 5, 6);
% endchar;

cmchar "Calligraphic nu";
beginchar(hex"AC", 8u#, x_height#, 0);
  italcorr 0.8x_height#*slant;
  adjust_fit(0, 0.5u#);
  %
  pickup lower_cal.nib;
  x1 = 0; top y1 = h; z3 = (.48w, 0);
  z0.t_ = z2.t_+penoffset down of currentpen
  = z3.t_+penoffset down of pen_[tilted.nib];
  draw z1{right}..tension atleast 1 and infinity..z2; % left diagonal
  pickup tilted.nib;
  rt x4 = w; x5 = x4-.2w; top y4 = .8h; top y5 = h;
  path p; p = z3..tension atleast 3 and 1..{up}z4;
  erase fill z0--(x0, y0-0.5h)--(x4, y0-0.5h)--(x4+eps, y4)--reverse p--cycle;
  draw p...{left}z5; % right diagonal
  %
  math_fit(-2/3x_height#*slant+0.5hair#+0.5u#, 2/3ic#);
  labels(0, 1, 2, 3, 4, 5);
endchar;

cmchar "The letter omicron";
beginchar(hex"AF", 9u#, x_height#, 0);
  italcorr .7x_height#*slant+0.5lower_cal_width#-u#
  if math_fitting: -0.5u# fi;
  adjust_fit(0, 0);%(-0.25u#, -0.25u#);
  %
  pickup lower_cal.nib;
  top y1 = h+oo; bot y3 = -oo; y2 = y4 = 0.5[y1, y3];
  x2 = good.x 1.25u; x4 = good.x(w-1.25u); x1 = x3 = 0.5[x2, x4];
  draw z1 left_to_down z2 down_to_right
  z3 right_to_up z4 up_to_left z1;
  math_fit(-.3x_height#*slant+0.5curve#-u#, ic#);
  labels(1, 2, 3, 4);
endchar;

cmchar "Calligraphic pi";
beginchar(hex"B0", 9u#, x_height#, 0);
  italcorr x_height#*slant+0.5u# if math_fitting: -0.5u# fi;
  adjust_fit(0, 0);
  %
  pickup lower_cal.nib;
  top y2 =top y4= h; y2-y1 = vround 0.2h; top y3 = 0.98h;
  x1 = good.x u; x2 = 3.5u; x3=good.x(w-2.5u); rt x4=w;
  draw z1...z2{right}...z3{right}...z4;
  top y9 = vround 0.98h; x9 = x10 = good.x(w-2.5u); x12 = w;
  draw z9..hook_out(10, 11, 12);
  bot y6=-oo; x5=0; x6=0.5[x5,x2]; y5-y6=vround 0.1h;
  z7=0.3[z6,z2];
  draw z5...z6{right}...z2{up};
  math_fit(-.3x_height#*slant+0.5curve#-u#, ic#);
  labels(1, 2, 3, 4, 5, 6, 7, 8,9,10,11,12);
endchar;

cmchar "The letter rho";
beginchar(hex"B1", 8u#, x_height#, desc_depth#);
  italcorr .7x_height#*slant+0.5lower_cal_width#-u#
  if math_fitting: -0.5u# fi;
  adjust_fit(0, 0);%(-0.25u#, -0.25u#);
  % like letter "b"
  pickup lower_cal.nib;
  bot y1 = -d-eps; y2 = 0.5x_height; bot y5 = -oo;
  y4 = 0.5x_height; top y3 = x_height+oo;
  x1 = x2 = good.x 1.5u; x3 = 0.5[x2, x4];
  x4 = good.x(w-1.25u); x5 = 0.5[x2, x4];
  draw z1..z2{up}
  ...z3{right}...z4{down}...z5{left}...z2{up};
  %
  math_fit(-.3x_height#*slant+0.5curve#-u#, ic#);
  labels(0, 1, 2, 3, 4, 5);
endchar;

cmchar "The letter rho (variant)";
beginchar(hex"BD", 8u#, x_height#, desc_depth#);
  italcorr .7x_height#*slant+0.5lower_cal_width#-u#
  if math_fitting: -0.5u# fi;
  adjust_fit(0, 0);%(-0.25u#, -0.25u#);
  % like letter "b"
  pickup lower_cal.nib;
  bot y1 = -d-eps; y2 = 0.5x_height; bot y5 = -oo;
  y4 = 0.5x_height; top y3 = x_height+oo;
  rt x1 = w; x2 = good.x 1.5u; x3 = 0.5[x2, x4];
  x4 = good.x(w-1.25u); x5 = 0.5[x2, x4];
  draw z1...(x5, good.y 0.25[y1, y5]){left}...z2{up}
  ...z3{right}...z4{down}...z5{left}...z2{up};
  %
  math_fit(-.3x_height#*slant+0.5curve#-u#, ic#);
  labels(0, 1, 2, 3, 4, 5);
endchar;

cmchar "Calligraphic upsilon";
beginchar(hex"B4", 9u#, x_height#, 0);
  italcorr .7x_height#*slant+0.5lower_cal_width#-u#
  if math_fitting: -0.5u# fi; % same as "o"
  adjust_fit(0, 0);
  %
  pickup lower_cal.nib;
  x1 = 0; x3 = good.x(2.80u); x4 = good.x(2.3u);
  x5 = 0.5[x4, x6]; x6 = good.x(w-1.25u); x7 = good.x(w-2u);
  y4 = 0.7[y5, y6]; bot y5 = -oo; y6 = 0.57h; top y7 = h+oo;
  draw hook_in(1, 2, 3)...z4 down_to_right z5...z6{up}...z7;
  %
  math_fit(-2/3x_height#*slant+0.5hair#+0.5u#, ic#);
  labels(1, 2, 3, 4, 5, 6, 7);
endchar;

cmchar "The letter phi";
beginchar(hex"B5", 11u#, asc_height#, asc_depth#);
  italcorr .7x_height#*slant+0.5lower_cal_width#-u#
  if math_fitting: -0.5u# fi; % same as "o"
  adjust_fit(0, 0);%(-0.25u#, -0.25u#);
  %
  pickup lower_cal.nib;
  top y1 = x_height+oo; bot y3 = -oo; y2 = y4 = 0.5[y1, y3];
  x2 = good.x 1.25u; x4 = good.x(w-1.25u); x1 = x3 = 0.5[x2, x4];
  draw z1 left_to_down z2 down_to_right
  z3 right_to_up z4 up_to_left z1;
  pickup fine_cal.nib;
  x5= x6 =good.x 0.5w; top y5 =h+eps; bot y6=-d-eps;
  draw z5..z6;
  math_fit(-.3x_height#*slant+0.5curve#-u#, ic#);
  labels(1, 2, 3, 4, 5, 6);
endchar;

cmchar "The letter phi (variant)";
beginchar(hex"BF", 11u#, x_height#, desc_depth#);
  italcorr .7x_height#*slant+0.5lower_cal_width#-u#
  if math_fitting: -0.5u# fi;
  adjust_fit(0, 0);%(-0.25u#, -0.25u#);
  %
  pickup lower_cal.nib;
  top y1 = h+oo; bot y3 = -oo; y2 = y4 = 0.5[y1, y3];
  x2 = good.x 1.25u; x4 = good.x(w-1.25u); x1 = x3 = 0.5[x2, x4];
  x5 = 0.5[x6,x4]; x6 = x7 = good.x 0.5[x2, x4];
  y5 = y1; y6 = 0.5[y3, y5]; bot y7 = -d-eps;
  save p; path p; p = z1 left_to_down z2 down_to_right
  z3 right_to_up z4 up_to_left z5 left_to_down z6..z7;
  draw subpath (.75, 12) of p;
  math_fit(-.3x_height#*slant+0.5curve#-u#, ic#);
  labels(1, 2, 3, 4, 5, 6, 7);
endchar;

cmchar "Calligraphic chi";
beginchar(hex"B6",11u#,x_height#,desc_depth#);
  italcorr h#*slant+.5u#;
  adjust_fit(0,0); pickup cal.nib;
  lft x1=.08w; lft x2=.2w; x4-x3=x2-x1; rt x4=w;
  h-y1=d+y4=1/9(h+d); top y2=h; bot y3=-d-eps;
  draw z1{up}....z2{right}
  ... .2[z2+(.1w,0),z3-(.1w,0)]---.8[z2+(.1w,0),z3-(.1w,0)]
  ...{right}z3....{up}z4;  % left diagonal
  x5=x6-u; rt x6=w; lft x7=0; x8=x7+u;
  top y5=h; y6=.85[-d,h]; y7=h-d-y6; bot y8=-d-eps;
  draw z5{right}...z6{down}
  ..tension atleast 3..{down}z7...{right}z8;  % right diagonal
  math_fit(.5u#,1/7h#*slant+.5u#); labels(1,2,3,4,5,6,7,8);
endchar;

cmchar "Calligraphic psi";
beginchar(hex"B7", 11u#, asc_height#, desc_depth#);
  italcorr .7x_height#*slant+0.5lower_cal_width#-u#
  if math_fitting: -0.5u# fi; % same as "o"
  adjust_fit(0, 0);
  %
  pickup lower_cal.nib;
  x1 = 0; x3 = good.x(2.80u); x4 = good.x(2.3u);
  x5 = 0.5[x4, x6]; x6 = good.x(w-1.25u); x7 = good.x(w-2u);
  y4 = 0.7[y5, y6]; bot y5 = -oo; y6 = 0.57x_height; top y7 = x_height+oo;
  draw hook_in(1, 2, 3)...z4 down_to_right z5...z6{up}...z7;
  pickup fine_cal.nib;
  x8 = x9 = good.x(0.5[2.5u, w-1.5u]); top y8 = h+eps; bot y9 = -d-eps;
  draw z8..z9;
  %
  math_fit(-2/3x_height#*slant+0.5hair#+0.5u#, ic#);
  labels(1, 2, 3, 4, 5, 6, 7, 8, 9);
endchar;

endinput.


%
% GREEK LOWERCASE
%

apprr:=apprl:=hround u;
beginchar(oct"241", 10u#, x_height#, 0);
  "The letter alpha";
  italcorr x_height#*slant-0.5u#;
  pickup lower_cal.nib;
  top y1 = h+eps; top y5 = h+u_o; bot y2 = -d_o; bot y6 = -eps;
  0.5[y3, y4] = 0.5[y2, y5]; y4-y3 = loop_squareness*(y5-y2);
  lft x3 = lft x4 = apprl-ho; rt x1 = rt x6 = w-apprr+eps;
  x2 = x5 = 0.375[x3, x6];
  draw z1 hang_to z2 left_to_up z3..z4 up_to_right z5
  hook_to z6; labels(1, 2, 3, 4, 5, 6);
  math_fit(0, ic#);
endchar;

beginchar(oct"242", 8u#, asc_height#, desc_depth#);
  "The letter beta";
  italcorr 0.8asc_height#*slant-u#+ho#;
  pickup lower_cal.nib;
  bot y1 = -d; top y5 = x_height; top y3 = h+u_o; bot y7 = -d_o;
  0.5[y4', y4] = 0.5[y5, y3]; 0.5[y6', y6] = 0.5[y7, y5]; y8 = hook_h;
  y4-y4' = loop_squareness*(y3-y5);
  y6-y6' = loop_squareness*(y5-y7); y2 = y4';
  lft x1 = apprl; x1 = x2 = x8; rt x4+hround 0.5u = rt x6 = w-apprr+ho;
  x3 = 0.55[x2, x4]; x7 = 0.5[x8, x6]; lft x5 = rt x1+hround u;
  x4 = x4'; x6 = x6';
  draw z1..z2 up_to_right z3 right_to_down z4..z4' down_to_left z5
  &z5 right_to_down z6..z6' down_to_left z7 left_to_up z8;
  labels(1, 2, 3, 4, 4', 5, 6, 6', 7, 8);
  math_fit(0, ic#);
endchar;

beginchar(oct"243", 8u#, x_height#, desc_depth#);
  "The letter gamma";
  italcorr x_height#*slant;
  pickup lower_cal.nib; numeric a; a = 0.60;
  top y1 = top y7 = h+eps; bot y4 = -d-d_o; y3 = y5 = 0.2[y4, y1];
  lft x1 = apprl-hround 0.5u; rt x7 = w-apprr+hround 0.5u;
  x5-x1 = x7-x3 = hround 1.5u; x4 = 0.5[x3, x5];
  x2 = a[x1, x3]; x6 = a[x7, x5]; y2 = a[y3, y1]; y6 = a[y5, y7];
  draw z1...z2{z3-z1}...z3 down_to_left
  z4 left_to_up z5...z6{z7-z5}...z7;
  labels(1, 2, 3, 4, 5, 6, 7);
  math_fit(0, ic#);
endchar;

beginchar(oct"244", 8u#, asc_height#, 0);
  "The letter delta";
  italcorr 0.9asc_height#*slant-u#;
  pickup lower_cal.nib;
  top y1 = top y2 = h; y5 = good.x x_height; bot y8 = -d_o;
  rt x7-ho = rt x1+hround 0.5u = w-apprr;
  lft x9+ho = lft x3+eps = apprl;
  x5 = x8 = 0.5[x9, x7]; x2 = 0.4[x3, x1];
  slope := -h/17u;
  ellipse_set(2, 3, 4, 5); ellipse_set(8, 7, 6, 5);
  y7 = y9; y10 = y6; x6-x5 = x5-x10;
  draw z1{x2-x1, 2(y2-y1)}
  ..z2 left_to_down z3 ...z4---z6...z7
  down_to_left z8 left_to_up z9...z10---z5;
  labels(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
  math_fit(0, ic#);
endchar;

beginchar(oct"245", 7u#, x_height#, 0);
  "The letter epsilon";
  italcorr x_height#*slant-0.5u#;
  pickup lower_cal.nib;
  top y1 = h; bot y4 = -d_o; y6 = y7 = good.y 0.51[y4, y1];
  y2-y3 = loop_squareness*(y1-y4); y5 = good.y 0.15h;
  y6 = 2/3[y3, y2]; x4 = 0.55[x2, x5];
  rt x1 = rt x7+hround 0.5u = rt x5-hround 0.5u = w-apprr;
  lft x2 = apprl-ho; x2 = x3 = x6;
  draw z1 left_to_down z2..z3 down_to_right z4 hook_to z5;
  draw z6..z7; labels(1, 2, 3, 4, 5, 6, 7);
  math_fit(0, ic#);
endchar;

  % ???

beginchar(oct"245", 7u#, x_height#, 0);
  "The letter variant epsilon";
  italcorr x_height#*slant-0.5u#;
  pickup lower_cal.nib;
  top y2 = h+u_o; bot y6 = -d_o;
  y3 = 0.5[y2, y4]; y5 = 0.5[y4, y6]; y7 = hook_h;
  y1 = good.y 0.9[y6, y2]; y4 = good.y 0.5[y7, y1];
  rt x1 = rt x4+hround 1.5u = rt x7-hround 0.5u = w-apprr;
  lft x3 = lft x5 = apprl-ho; x2 = 0.6[x3, x1]; x6 = 0.5[x5, x7];
  draw z1{x2-x1, 3(y2-y1)}
  ...z2 left_to_down z3 down_to_right z4
  &z4 left_to_down z5 down_to_right z6 hook_to z7;
  labels(1, 2, 3, 4, 5, 6, 7);
  math_fit(0, ic#);
endchar;

beginchar(oct"246", 8u#, asc_height#, desc_depth#);
  "The letter zeta";
  italcorr x_height#*slant-0.5u#;
  pickup lower_cal.nib;
  top y1 = h; top y2 = top y3 = top y4 = vround(y1-0.25(h-x_height));
  bot y6 = bot y7 = 0; bot y9 = -d;
  y5 = 0.3[y6, y4]; y8 = 0.5[y9, y7];
  lft x1 = apprl+hround 1.5u; lft x5 = apprl-ho;
  rt x3 = w-apprr-hround u; rt x8 = w-apprr+ho;
  x2 = 0.7[x1, x3];
  x4 = 0.85[x5, x3];
  x6-x5 = x8-x7 = 0.4(x8-x5);
  x9 = good.x(0.5[x5, x8]);
  draw z1 down_to_right z2..z3&z3..z4 left_to_down z5
  down_to_right z6...z7right_to_down z8 down_to_left z9;
  labels(range 1 thru 9);
  math_fit(0, ic#);
endchar;



  % ?

beginchar(oct"251", 12u#, asc_height#, 0);
  "The letter variant theta";
  italcorr 0.7asc_height#*slant-1.5u#+ho#;
  pickup lower_cal.nib;
  lft x1 = lft x3-hook_w = apprl-hround 0.5u;
  x2 = 1/3[x3, x1];
  rt x5 = lft x3+hround(6u)+ho;
  x4 = 0.5[apprl, w-apprr]; x6 = 0.5[x3, x5];
  x7 = good.x 0.2[x3, x5];
  x9-x8 = 0.5hook_w;
  rt x9 = w-apprr+hround 0.5u;
  y1+hook_h = top y2-eps = x_height; bot y4 = -d_o; top y6 = h+u_o;
  y5 = y8 = good.y 0.5[y4, y6]; y3 = 0.25[y2, y4]; y7 = 0.7[y5, y6];
  y8-y9 = vround hook_h;
  draw z1 hang_to z2 right_to_down z3 down_to_right
  z4 right_to_up z5 up_to_left z6 left_to_down
  z7 down_to_right z8 right_to_down z9;
  labels(1, 2, 3, 4, 5, 6, 7, 8, 9);
  math_fit(0, ic#);
endchar;

beginchar(oct"252", 2.5u#+curve#, x_height#, 0);
  "The letter iota";
  italcorr x_height#*slant-2u#;
  pickup lower_cal.nib; rt x1 = w-apprr-hround 1.5u; top y1 = h+eps;
  draw right_hook1;
  math_fit(0, ic#);
endchar;

beginchar(oct"253", 8u#, x_height#, 0);
  "The letter kappa";
  italcorr max(0.2x_height#*slant+0.1w#, 
    0.95x_height#*slant-0.1w#+0.5u#);
  adjust_fit(0, 0);
  %
  pickup lower_cal.nib;
  top y1 = h; bot y2 = -oo; x1 = x2 = good.x 1.5u;
  draw z1-cal.extension--z1--z2;
  %
  rt x4 = .9w; x5 = x4-.1w; x7 = .8w; rt x8 = 1.1w;
  y4 = .9x_height; top y5 = x_height+oo; bot y7 = -oo; y8 = .2x_height-oo;
  (lft z6)t_ = (x2, 0.4x_height).t_+penoffset up of pen_[lower_cal.nib];
  draw z4{up}...{left}z5..tension atleast 2..{down}z6
  ..tension atleast 3 and atleast 2..z7{right}...{up}z8; % diagonals
  %
  math_fit(0, 1/3x_height#*slant+0.5hair#+0.5u#);
  labels(1, 2, 3, 4, 5, 6, 7, 8);
endchar;

  % ?

beginchar(oct"253", 10u#, x_height#, 0);
  "The letter variant kappa";
  italcorr x_height#*slant-0.75u#;
  pickup lower_cal.nib;
  top y1 = top y4-u_o = h; bot y3+d_o = bot y6 = 0;
  y2 = h-y5 = 1/3[y1, y6];
  lft x1 = apprl-hround 0.5u-eps;
  rt x6 = w-apprr+hround 0.5u+eps;
  x3-x1 = x6-x4 = hround 0.75u;
  x2-x1 = x6-x5 = hround 2.55u+eps;
  draw z1 right_to_down z2...{z3-z4}z3
  --z4{z3-z4}...z5 down_to_right z6;
  labels(1, 2, 3, 4, 5, 6);
  math_fit(0, ic#);
endchar;

beginchar(oct"254", 8u#, asc_height#, 0);
  "The letter lambda";
% no italic correction
  pickup lower_cal.nib;
  top y1 = h+eps; bot y2 = bot y3 = -eps;
  top y4 = max(x_height, 0.5h);;
  apprl-lft x3 = rt x2-(w-apprr) = hround 0.5u-eps;
  x4 = 0.5[x2, x3]; z1 = whatever[z2, z4];
  draw z1..z2; draw z3..z4; labels(1, 2, 3, 4);
  math_fit(0, ic#);
endchar;

beginchar(oct"255", 8u#, x_height#, desc_depth#);
  "The letter mu";
  italcorr x_height#*slant-1.5u#;
  pickup lower_cal.nib;
  top y1a = h+eps; bot y1b = -d-eps; lft x1a = lft x1b = apprl;
  draw z1a..z1b;
  x2a = x1a; rt x2c = rt x2d = w-apprr; x2b = 0.5[x2a, x2c];
  bot y2b = -d_o; top y2d = h+eps;
  y2a = 0.5[y2d, y2b]; y2c = 2/3[y2d, y2b];
  draw z2a down_to_right z2b right_to_up z2c..z2d;
  labels(1a, 1b, 2a, 2b, 2c, 2d);
  math_fit(0, ic#);
endchar;

beginchar(oct"256", 7u#, asc_height#, 0);
  "The letter nu";
  italcorr 0.7asc_height#*slant-0.5u#+ho#;
  pickup lower_cal.nib;
  top y1 = x_height+eps;
  bot y2 = -d_o; top y4 = h+eps; y3 = 0.5[y2, y4];
  lft x1 = apprl-hround 0.5u; rt x3 = w-apprr+ho;
  x2 = x4 = good.x 0.5[x1, x3];
  draw z1--z2{2(x3-x2), y3-y2}...z3{up}
  ...{x4-x3, (1-superness)*(y4-y3)}z4;
  labels(1, 2, 3, 4);
  math_fit(0, ic#);
endchar;

beginchar(oct"257", 8u#, asc_height#, desc_depth#);
  "The letter xi";
  italcorr x_height#*slant-.5u#;
  pickup lower_cal.nib;
  top y1 = h; top y2 = top y3 = top y4 = vround(y1-0.25(h-x_height));
  top y6 = top y7 = top y8 = vround 0.5h; bot y10 = bot y11 = 0; bot y13 = -d;
  y5 = 0.5[y6, y4]; y9 = 0.4[y10, y8]; y12 = 0.5[y13, y11];
  lft x1 = apprl+hround 1.5u; lft x5 = apprl; lft x9 = apprl-ho;
  rt x3 = rt x7 = w-apprr-hround u; rt x12 = w-apprr+ho;
  x2 = 0.7[x1, x3];
  x4 = 0.85[x5, x3];
  x6 = 0.7[x5, x7];
  x8 = 0.8[x9, x7];
  x10-x9 = x12-x11 = 0.4(x12-x9);
  x13 = good.x 0.5[x9, x12];
  draw z1 down_to_right z2..z3&z3..z4 left_to_down z5
  down_to_right z6..z7&z7..z8 left_to_down z9 down_to_right z10
  ...z11 right_to_down z12 down_to_left z13;
  labels(range 1 thru 13);
  math_fit(0, ic#);
endchar;

beginchar(oct"261", 9u#, x_height#, desc_depth#);
  "The letter pi";
  italcorr x_height#*slant;
  pickup lower_cal.nib;
  top y1 = h; y1 = y2 = y3 = y5; bot y4 = bot y6 = -eps;
  lft x1 = apprl-eps-hround 0.5u;
  rt x2 = w-apprr+eps+hround 0.5u;
  x3 = x4; x5 = x6; x3-x1 = x2-x5;
  x3 = good.x 0.25[apprl, w-apprr];
  draw z1..z2; draw z3..z4; draw z5..z6;
  labels(1, 2, 3, 4, 5, 6);
  math_fit(0, ic#);
endchar;

beginchar(oct"262", 8u#, x_height#, desc_depth#);
  "The letter rho";
  italcorr 0.7x_height#*slant-0.5u#+ho#;
  pickup lower_cal.nib; set_loop1(right); draw_loop1(right);
  bot y2 = -d-eps; x2 = x1c; draw z1c..z2; labels(2);
  math_fit(0, ic#);
endchar;

beginchar(oct"263", 8u#, x_height#, desc_depth#);
  "The letter variant rho";
  italcorr 0.7x_height#*slant-0.5u#+ho#;
  pickup lower_cal.nib; set_loop1(right); draw_loop1(right);
  bot y3 = bot y4 = -d; y2 = 0.5[y1c, y3];
  x2 = x1c; rt x4 = w-apprr+eps; x3 = 0.5[x2, x4];
  draw z1c..z2 down_to_right z3..z4; labels(2, 3, 4);
  math_fit(0, ic#);
endchar;

beginchar(oct"264", 9u#, x_height#, 0);
  "The letter sigma";
  italcorr x_height#*slant;
  save loop_right; loop_right = apprr+hround u;
  pickup lower_cal.nib; set_loop1(both); draw_loop1(both);
  rt x3 = w-apprr+hround 0.5u+eps; top y3 = h;
  z2 = 0.5[z1b, z3];
  draw z1b...z2{(z3-z2) yscaled 2}...z3; labels(2, 3);
  math_fit(0, ic#);
endchar;

beginchar(oct"265", 7u#, x_height#, comma_depth#);
  "The letter variant sigma";
  italcorr x_height#*slant-0.5u#;
  pickup lower_cal.nib;
  top y2 = h+u_o; bot y7 = -d-d_o; bot y4 = bot y5 = 0;
  y2-y1 = vround 0.06h; y8-y7 = vround 0.08h;
  y3 = 0.45[y4, y2]; y6 = 0.5[y7, y5];
  lft x3 = apprl-ho; rt x1-eps = rt x6-ho = w-apprr;
  x2 = 0.7[x3, x1]; x4 = 0.45[x3, x6]; x5 = 0.55[x3, x6];
  x7 = 0.7[x3, x6]; x8 = good.x x4;
  draw z1{x2-x1, 2(y2-y1)}
  ...z2 left_to_down z3 down_to_right z4
  ...z5right_to_down z6 down_to_left z7 hook_to z8;
  labels(1, 2, 3, 4, 5, 6, 7, 8);
  math_fit(0, ic#);
endchar;

beginchar(oct"266", 8u#, x_height#, desc_depth#);
  "The letter tau";
  italcorr x_height#*slant;
  center_stem(3, 4);
  top y1 = h; y1 = y2 = y3; bot y4 = -eps;
  lft x1 = apprl-eps-hround 0.5u;
  rt x2 = w-apprr+eps+hround 0.5u;
  draw z1..z2; draw z3..z4;
  labels(1, 2, 3, 4);
  math_fit(0, ic#);
endchar;

beginchar(oct"267", 8u#, x_height#, 0);
  "The letter upsilon";
  italcorr x_height#*slant-0.5u#;
  pickup lower_cal.nib;
  top y1 = top y5 = h+eps; bot y3 = -d_o; y2 = y4 = 0.5[y3, y1];
  lft x1 = lft x2 = apprl; rt x4 = rt x5 = w-apprr; x3 = 0.5[x1, x5];
  draw z1..z2 down_to_right z3 right_to_up z4..z5;
  labels(1, 2, 3, 4, 5);
  math_fit(0, ic#);
endchar;

beginchar(oct"270", 10u#, cap_height#, desc_depth#);
  "The letter phi";
  italcorr 0.7x_height#*slant-0.5u#+ho#;
  pickup lower_cal.nib; set_loop1(both); draw_loop1(both);
  top y2 = h+eps; bot y3 = -d-eps; x2 = x3 = good.x 0.5[apprl, w-apprr];
  draw z2..z3; labels(2, 3);
  math_fit(0, ic#);
endchar;

beginchar(oct"271", 10u#, x_height#, desc_depth#);
  "The letter variant phi";
  italcorr 0.7x_height#*slant-0.5u#+ho#;
  pickup lower_cal.nib;
  top y1-eps = top y5-u_o = h; bot y3 = -d_o; bot y7 = -d-eps;
  0.5[y2, y2'] = 0.5[y3, y5]; y2-y2' = loop_squareness*(y1-y3);
  y2 = y4; y2' = y4'; y6 = 2/3[y3, y5];
  lft x2 = lft x2' = apprl-ho; rt x4 = rt x4' = w-apprr+ho;
  x3 = x6 = x7 = good.x 0.5[x2, x4];
  x5 = 1/3[x6, x4]; x1 = good.x 0.65[x2, x6];
  draw z1 left_to_down z2..z2' down_to_right z3 right_to_up
  z4'..z4 up_to_left z5 left_to_down z6..z7;
  labels(1, 2, 2', 3, 4, 4', 5, 6, 7);
  math_fit(0, ic#);
endchar;

beginchar(oct"272", 9u#, x_height#, desc_depth#);
  "The letter chi";
  italcorr x_height#*slant;
  pickup lower_cal.nib;
  top y1 = top y3 = h+eps; bot y2 = bot y4 = -d-eps;
  lft x1+hround 0.25u = lft x4+hround 0.5u = apprl-eps;
  rt x2-hround 0.5u = rt x3-hround 0.25u = w-apprr+eps;
  draw z1..z2; draw z3..z4; labels(1, 2, 3, 4);
  math_fit(0, ic#);
endchar;

beginchar(oct"273", 10u#, asc_height#, desc_depth#);
  "The letter psi";
  italcorr x_height#*slant-0.5u#;
  center_stem(6, 7);
  top y1 = top y5 = x_height+eps; bot y3 = -d_o; y2 = y4 = 0.5[y3, y1];
  lft x1 = lft x2 = apprl; rt x4 = rt x5 = w-apprr; x3 = 0.5[x1, x5];
  top y6 = h+eps; bot y7 = -d-eps;
  draw z1..z2 down_to_right z3 right_to_up z4..z5;
  draw z6..z7; labels(1, 2, 3, 4, 5, 6, 7);
  math_fit(0, ic#);
endchar;

beginchar(oct"274", 12u#, x_height#, 0);
  "The letter omega";
  italcorr 0.7x_height#*slant-0.5u#+ho#;
  pickup lower_cal.nib;
  top y1 = top y9 = h+eps; bot y3 = bot y7 = -d_o; y2 = y8 = 0.5[y3, y1];
  y4 = y6 = 0.5[y3, y1]; y5 = good.y 0.75[y3, y1]+eps;
  lft x2 = apprl-ho; rt x8 = w-apprr+ho;
  x1 = good.x(x2+1.2u); x9 = good.x(x8-1.2u);
  x3 = 0.265[x2, x8]; x7 = 0.735[x2, x8]; x5 = good.x 0.5[x2, x8];
  x4-x5 = x5-x6 = hround 0.7u+eps;
  draw z1{3(x2-x1), y2-y1}
  ...z2 down_to_right z3 right_to_up z4 up_to_left
  z5 left_to_down z6 down_to_right z7 right_to_up z8
  ...{3(x9-x8), y9-y8}z9;
  labels(1, 2, 3, 4, 5, 6, 7, 8, 9);
  math_fit(0, ic#);
endchar;

beginchar(oct"275", 14u#, x_height#, 0);
  "The letter variant pi";
  italcorr (x_height#+hook_h#)*slant;
  pickup lower_cal.nib;
  top y1 = top y9 = h; bot y3 = bot y7 = -d_o; y2 = y8 = 0.5[y3, y1];
  y4 = y6 = 0.6[y3, y1]; y5 = good.y 0.7[y3, y1]+eps;
  lft x2 = apprl+hround 2u-ho; rt x8 = w-apprr-hround 0.4u+ho;
  x1 = good.x(x2+1.2u); x9 = good.x(x8-1.2u);
  x3 = 0.265[x2, x8]; x7 = 0.735[x2, x8]; x5 = good.x 0.5[x2, x8];
  x4-x5 = x5-x6 = hround 0.25u+eps;
  draw z1{3(x2-x1), y2-y1}
  ...z2 down_to_right z3 right_to_up z4 up_to_left
  z5 left_to_down z6 down_to_right z7 right_to_up z8
  ...{3(x9-x8), y9-y8}z9;
  y10 = hang_h; top y11 = h; y11 = y12; y13 = y12;
  apprl-lft x10 = rt x13-(w-apprr) = hround 0.5u;
  x11 = min(x10+pi_hang_w, x1); x12 = max(x13-pi_hang_w, x9);
  draw z10--z11..z12 right_to_up z13;
  labels(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13);
  math_fit(0, ic#);
endchar;
