% mathematical symbols by Anthony Phan. % file: owwcall.mf (one week work's calligraphic lowercase) % last modification: April 29, 2002. % Mix from calu.mf and itall.mf % newinternal l,r,shrink_fit; % adjustments to spacing flare:=dtsz; flare#:=dtsz#; boolean math_fitting; math_fitting:=false; def cal_setup= let adjust_fit=normal_adjust_fit; if math_fitting: let math_fit=do_math_fit; else: let math_fit=ignore_math_fit; fi pickup pencircle xscaled cap_curve yscaled cap_hair rotated 30; cal.nib:=savepen; pair cal.extension; cal.extension:=(.75cap_curve,0) rotated 30; pickup pencircle xscaled cap_curve yscaled cap_hair rotated 70; tilted.nib:=savepen; pickup pencircle xscaled curve yscaled cap_hair rotated 70; med_tilted.nib:=savepen; pickup pencircle xscaled cap_stem yscaled cap_hair rotated 30; med_cal.nib:=savepen; pickup pencircle xscaled stem yscaled cap_hair rotated 30; light_cal.nib:=savepen; % % lowercase and punctuation % pickup pencircle xscaled curve yscaled hair rotated 30; lower_cal.nib:=savepen; pickup pencircle xscaled hair yscaled vair rotated 30; fine_cal.nib:=savepen; % pickup pencircle xscaled(cap_curve+dw) yscaled cap_hair rotated 30; heavy_cal.nib:=savepen; bot_flourish_line:=-0.5u-o; pair bend; bend=(.5u,0); pair flourish_change; flourish_change=(4u,.2asc_height); join_radius:=u; shrink_fit:=1+hround(2letter_fit#*hppp)-2letter_fit; enddef; let cmchar=\; def .... = .. tension atleast .9 .. enddef; vardef w#=charwd enddef; vardef d#=chardp enddef; vardef h#=charht enddef; vardef ic#=charic enddef; def do_expansion(expr expansion_factor) = forsuffixes $=u,jut,cap_jut,beak_jut,apex_corr: $:=$.#*expansion_factor*hppp; endfor enddef; def normal_adjust_fit(expr left_adjustment,right_adjustment) = numeric charwd_in; charwd_in=charwd; l:=-hround(left_adjustment*hppp)-letter_fit; interim xoffset:=-l; charwd:=charwd+2letter_fit#+left_adjustment+right_adjustment; r:=l+hround(charwd*hppp)-shrink_fit; w:=r-hround(right_adjustment*hppp)-letter_fit; do_expansion(w/(charwd_in*hppp)); enddef; def mono_adjust_fit(expr left_adjustment,right_adjustment) = numeric charwd_in; charwd_in=charwd; numeric expansion_factor; mono_charwd#=2letter_fit# +expansion_factor*(charwd+left_adjustment+right_adjustment); l:=-hround(left_adjustment*expansion_factor*hppp)-letter_fit; interim xoffset:=-l; r:=l+mono_charwd-shrink_fit; w:=r-hround(right_adjustment*expansion_factor*hppp)-letter_fit; charwd:=mono_charwd#; charic:=mono_charic#; do_expansion(w/(charwd_in*hppp)); enddef; extra_endchar:=extra_endchar&"r:=r+shrink_fit;w:=r-l;"; def ignore_math_fit(expr left_adjustment,right_adjustment) = enddef; def do_math_fit(expr left_adjustment,right_adjustment) = l:=l-hround(left_adjustment*hppp); interim xoffset:=-l; charwd:=charwd+left_adjustment+right_adjustment; r:=l+hround(charwd*hppp)-shrink_fit; charic:=charic-right_adjustment; if charic<0: charic:=0; fi enddef; currenttransform:=identity slanted slant yscaled aspect_ratio scaled granularity; def t_=transformed currenttransform enddef; cal_setup; autorounding:=hair; input calu.mf; % Calligraphic capitals with `fixed' pens, by N. N. Billawala (1985). % These letters are intended for math, hence |math_fitting| is assumed. % Character codes \0101 through \0132 are generated. % WIP vardef hook_in(suffix $,$$,$$$)= x$:=good.x x$; x$$=max(x$$$-1.25u,0.5[x$,x$$$]); top y$$=x_height+oo; y$=good.y 7/8[0,y$$]; y$$$=3/4x_height; z$...z$$ right_to_down z$$$ enddef; vardef hook_out(suffix $,$$,$$$)= x$$$:=good.x x$$$; x$$=min(x$+1.25u,0.5[x$,x$$$]); bot y$$=-oo; y$=1/4x_height; y$$$=good.y 7/8[x_height,y$$]; z$ down_to_right z$$...z$$$ % super_arc enddef; vardef ital_arch(suffix $,$$,$$$)= x$$=0.6[x$,x$$$]; top y$$=x_height+oo; y$$$=0.65x_height; z${up}...z$$ right_to_down z$$$ % super_arc enddef; vardef desc_curve(suffix $,$$,$$$)= x$$$:=good.x x$$$; x$$=2/3[x$,x$$$]; y$=0; bot y$$=-d-oo; y$$$=good.y 1/3[y$$,y$]; z${down}...z$$ left_to_up z$$$...z$$$+round(1.1u*dir 60) enddef; % dot_size is assumed to be an integer vardef cal_dot@#(expr center,dot_size)= z@#=z@#'=(hround(xpart center-0.5dot_size)+0.5dot_size, vround(ypart center-0.5dot_size)+0.5dot_size); rt x@#r-lft x@#l=top y@#'r-bot y@#'l=dot_size; penpos@#(whatever,0); penpos@#'(whatever,90); filldraw z@#r up_to_left z@#'r left_to_down z@#l down_to_right z@#'l right_to_up z@#r...cycle; enddef; cmchar "Calligraphic a"; beginchar("a",9u#,x_height#,0); italcorr 1/3x_height#*slant+0.5hair#+0.5u#; adjust_fit(0,0); pickup lower_cal.nib; top y1=vround 0.98h; x1=x2=good.x(w-2.5u); x4=w; draw z1..hook_out(2,3,4); top y6=x_height+oo; bot y8=-oo; y5=y7=0.5[y6,y8]; x5=x1; x7=good.x(1.5u); x6=x8=0.5[x5,x7]; draw z5 up_to_left z6 left_to_down z7 down_to_right z8 right_to_up z5; math_fit(-.3x_height#*slant+0.5curve#-u#,ic#); labels(1,2,3,4,5,6,7,8); endchar; cmchar "Calligraphic b"; beginchar("b",8u#,asc_height#,0); italcorr .7x_height#*slant+0.5curve#-u# if math_fitting: -0.5u# fi; adjust_fit(0,0); pickup lower_cal.nib; top y1=h; y2=0.5x_height; bot y3=-oo; y4=0.5x_height; top y5=x_height+oo; x1=x2=good.x 1.5u; x3=0.5[x2,x4]; x4=good.x(w-1.5u); x5=0.5[x2,x4]; draw z1-cal.extension--z1..z2{down} ...z3{right}...z4{up}...z5{left}...z2{down}; math_fit(-.3x_height#*slant+0.5curve#-u#,ic#); labels(1,2,3,4,5,6,7,8,9); endchar; cmchar "Calligraphic c"; beginchar("c",8u#,x_height#,0); italcorr if math_fitting: 1/3x_height#*slant else: x_height#*slant-u# fi; adjust_fit(0,0); pickup lower_cal.nib; x2-x1=hround u; rt x2=hround(w-u); x3=0.6[x4,x2]; x4=good.x 1.5u; x5=0.5[x4,x6]; x6=good.x w; top y3=h+oo; y4=.5h; bot y5=-oo; y1=good.y 0.65[y5,y3]; y2=.8[y5,y3]; y6=good.y 1/4x_height; draw z1 ... z2 up_to_left z3 left_to_down z4 down_to_right z5...z6; math_fit(-.3x_height#*slant+0.5curve#-u#,ic#); labels(1,2,3,4,5,6); endchar; cmchar "Calligraphic d"; beginchar("d",9u#,asc_height#,0); italcorr max(1/3x_height#*slant+0.5hair#+0.5u#, h#*slant+0.5stem#-2u#) if math_fitting: -0.5u# fi; adjust_fit(0,0); pickup lower_cal.nib; top y1=h; x1=x2=good.x(w-2.5u); x4=w; draw z1-cal.extension--z1---hook_out(2,3,4); top y6=x_height+oo; bot y8=-oo; y5=y7=0.5[y6,y8]; x5=x1; x7=good.x(1.5u); x6=x8=0.5[x5,x7]; draw z5 up_to_left z6 left_to_down z7 down_to_right z8 right_to_up z5; math_fit(-.3x_height#*slant+0.5curve#-u#,ic#); labels(1,2,3,4,5,6,7,8); endchar; cmchar "Calligraphic e"; beginchar("e",8u#,x_height#,0); italcorr max(1/3x_height#*slant, x_height#*slant+0.5(.2[hair#,stem#])-u#); adjust_fit(0,0); pickup lower_cal.nib; rt x1=hround(w-u); x2=0.6[x3,x1]; x3=good.x 1.5u; x4=0.5[x3,x5]; x5=good.x w; y1=0.8[y4,y2]; top y2=h+oo; y3=.5h; bot y4=-oo; y5=good.y 1/4x_height; draw z3 right_to_up z1 up_to_left z2 left_to_down z3 down_to_right z4...z5; math_fit(-.3x_height#*slant+0.5curve#-u#,ic#); labels(1,2,3,4,5); endchar; cmchar "Calligraphic f"; beginchar("f",5u#,asc_height#,desc_depth#);% width !!! italcorr asc_height#*slant+.75u#; adjust_fit(0,0); pickup lower_cal.nib; z88=(0.5w-0.5u,h); z89=(0.5w+0.5u,-d); top y2=h+oo; bot y5=-d-oo; top y8=top y9=x_height; y2-y0=y6-y5=vround 0.35min(d,h-x_height); y1=0.5[y0,y2]; y6=0.5[y5,y7]; y3=0.25[x_height,y2]; y4=0.5[y5,y3]; rt x1-w=-lft x6=hround 0.25u; x7-x6=hround 0.5u; x0=x1; x2=0.4[x1,x3]; x5=0.4[x6,x4]; z3=whatever[z88,z89]; z4=whatever[z88,z89]; lft x8=lft x3-0.5stem-u; rt x9=rt x3+0.5stem+1.5u; draw (z0--z1) softjoin (z1 up_to_left z2....z3 ---z4....z5{left}...z6);%...z7); draw z8..z9; math_fit(desc_depth#*slant+u#,x_height#*slant); labels(1,2,3,4,5,6,7,8); endchar; cmchar "Calligraphic g"; beginchar("g",8u#,x_height#,desc_depth#); italcorr x_height#*slant+0.5stem#-u#; adjust_fit(0,0); pickup lower_cal.nib; top y1=vround 0.98h; top y6=x_height+oo; bot y8=-oo; y5=y7=0.5[y6,y8]; x1=x2=x5=good.x(w-1.5u); x4=1.75u; x7=good.x(1.5u); x6=x8=0.5[x5,x7]; draw z1..desc_curve(2,3,4); draw z5 up_to_left z6 left_to_down z7 down_to_right z8 right_to_up z5; math_fit(-min(.3x_height#*slant+0.5curve#-u#, 1.5u#-desc_depth#*slant),ic#-1/3x_height#*slant); labels(1,2,3,4,5,6,7,8); endchar; cmchar "Calligraphic h"; beginchar("h",9u#,asc_height#,0); italcorr 1/3x_height#*slant+0.5hair#+0.5u#; adjust_fit(0,0); pickup lower_cal.nib; top y1=h; bot y2=-oo; x1=x2=good.x 1.5u; x4=w-2.45u; x5=w-2.80u; x7=w; draw z1-cal.extension--z1--z2 --ital_arch(2,3,4)...hook_out(5,6,7); math_fit(0,ic#); labels(1,2,3,4,5,6,7); endchar; cmchar "Calligraphic i"; beginchar("i",5u#,min(10/7x_height#+0.5flare#,asc_height#),0); italcorr max(1/3x_height#*slant+0.5hair#+0.5u#, h#*slant+0.5flare#-2u#); adjust_fit(0,0); pickup lower_cal.nib; x1=0; x3=good.x(0.5w+0.30u); x4=good.x(0.5w-0.30u); x6=w; draw hook_in(1,2,3)...hook_out(4,5,6); % pickup fine_cal.nib; cal_dot7((0.5w-0.4(h-x_height)*slant,h+1-0.5flare),flare); math_fit(-2/3x_height#*slant+0.5hair#+0.5u#,ic#); labels(1,2,3,4,5,6); penlabels(7,7'); endchar; cmchar "Calligraphic j"; beginchar("j",5u#,min(10/7x_height#+0.5flare#,asc_height#),desc_depth#); italcorr h#*slant+0.5stem#-u#; adjust_fit(0,0); pickup lower_cal.nib; x1=0; x3=x4=good.x(w-1.5u); x6=good.x 0; draw hook_in(1,2,3)..desc_curve(4,5,6); % pickup fine_cal.nib; cal_dot7((rt x3-0.6(h-x_height)*slant,h+1-0.5flare),flare); math_fit(desc_depth#*slant,x_height#*slant+0.5stem#-u#); labels(1,2,3,4,5,6); penlabels(7,7'); endchar; cmchar "Calligraphic k"; beginchar("k",8u#,asc_height#,0); italcorr x_height#*slant; 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 l"; beginchar("l",4u#,asc_height#,0); italcorr max(1/3x_height#*slant+0.5hair#+0.5u#, asc_height#*slant+0.5stem#-2u#) if math_fitting: +0.5u# fi; adjust_fit(0,0); pickup lower_cal.nib; top y1=h; x1=x2=good.x 1.5u; x4=w; draw z1-cal.extension--z1---hook_out(2,3,4); math_fit(-0.5u#,1/3x_height#*slant+0.5hair#+u#); labels(1,2,3,4,5,6,7); endchar; cmchar "Calligraphic m"; beginchar("m",15u#,x_height#,0); italcorr 1/3x_height#*slant+0.5hair#+0.5u#; adjust_fit(0,0); pickup lower_cal.nib; x1=0; x3=x4=good.x 2.5u; x6=x7=good.x 0.5w; x9=good.x(w-2.45u); x10=good.x(w-2.80u); x12=w; bot y4=bot y7=-oo; draw hook_in(1,2,3)---z4; draw ital_arch(4,5,6)---z7; draw ital_arch(7,8,9)...hook_out(10,11,12); math_fit(-2/3x_height#*slant+0.5hair#+0.5u#,ic#); labels(1,2,3,4,5,6,7,8,9,10,11,12); endchar; cmchar "Calligraphic n"; beginchar("n",10u#,x_height#,0); italcorr 1/3x_height#*slant+0.5hair#+0.5u#; adjust_fit(0,0); pickup lower_cal.nib; x1=0; x3=x4=good.x 2.5u; bot y4=-oo; x6=good.x(w-2.45u); x7=good.x(w-2.80u); x9=w; draw hook_in(1,2,3)---z4; draw ital_arch(4,5,6)...hook_out(7,8,9); math_fit(-2/3x_height#*slant+0.5hair#+0.5u#,ic#); labels(1,2,3,4,5,6,7,8,9,10); endchar; cmchar "Calligraphic o"; beginchar("o",9u#,x_height#,0); italcorr .7x_height#*slant+0.5curve#-u# if math_fitting: -0.5u# fi; adjust_fit(0,0); % pickup lower_cal.nib; top y1=h+oo; bot y3=-oo; y2=y4=0.5[y1,y3]; x2=good.x 1.5u; x4=good.x(w-1.5u); x1=x3=0.5[x2,x4]; draw z1 left_to_down z2 down_to_right z3 right_to_up z4 up_to_left z1; % not good % x5=good.x 0.75[x2,x1]; x6=0.5[x5,x7]; x7=good.x w; % y5=0.75[y6,y1]; y6=good.y 0.6[y3,y1]; y7=good.y 3/4x_height; % draw z1{left}...z5 down_to_right z6...z7; % math_fit(-.3x_height#*slant+0.5curve#-u#,ic#); labels(1,2,3,4,5,6,7); endchar; cmchar "Calligraphic p"; beginchar("p",9u#,x_height#,desc_depth#); italcorr .7x_height#*slant+0.5curve#-u# if math_fitting: -0.5u# fi; adjust_fit(0,0); % pickup lower_cal.nib; x1=0; x3=x4=good.x 2.5u; bot y4=-d-oo; draw hook_in(1,2,3)..z4; top y6=x_height+oo; bot y8=-oo; y5=y7=0.5[y6,y8]; x5=good.x(w-1.5u); x7=x3; x6=x8=0.5[x5,x7]; draw z5 up_to_left z6 left_to_down z7 down_to_right z8 right_to_up z5; % math_fit(-min(2/3x_height#*slant-0.5hair#-0.5u#, 2u#-0.5stem#-desc_depth#*slant),ic#); labels(1,2,3,4,5,6,7,8); endchar; cmchar "Calligraphic q"; beginchar("q",8u#,x_height#,desc_depth#); italcorr x_height#*slant+0.5stem#-u#; adjust_fit(0,0); % pickup lower_cal.nib; top y1=vround 0.98h; bot y2=-d-oo; x1=x2=good.x(w-1.5u); draw z1--z2--z2+cal.extension; top y6=x_height+oo; bot y8=-oo; y5=y7=0.5[y6,y8]; x5=x1; x7=good.x(1.5u); x6=x8=0.5[x5,x7]; draw z5 up_to_left z6 left_to_down z7 down_to_right z8 right_to_up z5; % math_fit(-.3x_height#*slant+0.5curve#-u#,ic#-1/3x_height#*slant); labels(1,2,3,4,5,6,7,8); endchar; cmchar "Calligraphic r"; beginchar("r",5.5u#+1.75u#,x_height#,0); italcorr x_height#*slant; adjust_fit(0,0); % pickup lower_cal.nib; x1=0; x3=x4=good.x 2.5u; bot y4=-oo; draw hook_in(1,2,3)---z4; y5=y2; y7=good.y 0.65[y4,y5]; y6=.8[y4,y5]; x6=good.x(w-1.00u); x6-x7=hround 0.75u; x5=0.75[x4,x6]; draw z4{up}...z5 right_to_down z6...z7; % math_fit(-2/3x_height#*slant+0.5hair#+0.5u#,ic#-0.5u#); labels(1,2,3,4,5,6,7); endchar; cmchar "Calligraphic s"; beginchar("s",5.25u#+1.75u#,x_height#,0); italcorr x_height#*slant-0.5u#; adjust_fit(0,0); pickup lower_cal.nib; rt x0=rt x1=.95w; x2=.5[x3,x1]; lft x3=.15w; x4=.5[x6,x2]; rt x5=w; x6=.5w; lft x7=0; lft x8=.075w; y0=.8h; y1=.9h; top y2=h+o; y3=.55[y4,y2]; y4=.55[y6,y2]; y5=.45[y6,y4]; bot y6=-o; y7=.2h; y8=.35h; draw\\(z0--z1) softjoin (z1...z2{left}...z3{down}...z4...z5{down} ...z6{left}...z7) softjoin (z7{up}...{right}z8); % stroke math_fit(0,ic#); labels(0,1,2,3,4,5,6,7,8); endchar; cmchar "Calligraphic t"; beginchar("t",5.5u#,min(asc_height#,10/7x_height#),0); italcorr max(1/3x_height#*slant+0.5hair#+0.5u#,x_height#*slant-.25u#); adjust_fit(0,0); % pickup lower_cal.nib; top y1=h; x1=x2=good.x 2u; x4=w; draw z1---hook_out(2,3,4); lft x5=hround -0.75u; rt x6=hround(w-0.65u); top y5=top y6=x_height; draw z5..z6; % math_fit(1.25u#-x_height#*slant,ic#); labels(1,2,3,4,5,6); endchar; cmchar "Calligraphic u"; beginchar("u",9.5u#,x_height#,0); italcorr 1/3x_height#*slant+0.5hair#+0.5u#; adjust_fit(0,0); % pickup lower_cal.nib; x1=0; x3=good.x(2.80u); x4=good.x(2.45u); x5=0.5[x4,x6]; x6=x7=x8=good.x(w-2.5u); x10=w; y4=0.7[y5,y6]; bot y5=-oo; y6=0.57h; top y7=h; draw hook_in(1,2,3)...z4 down_to_right z5...z6{up}; draw z7..hook_out(8,9,10); % math_fit(-2/3x_height#*slant+0.5hair#+0.5u#,ic#); labels(1,2,3,4,6,7,8,9,10); endchar; cmchar "Calligraphic v"; beginchar("v",8u#,x_height#,0); italcorr x_height#*slant; adjust_fit(0,0); % 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 "Calligraphic w"; beginchar("w",12u#,x_height#,0); italcorr x_height#*slant; adjust_fit(0,0); % pickup lower_cal.nib; x1=0; x3=.5[x1,x6]; x6=.52w; x9=.58[x6,x10]; y3=y9=0; top y1=top y6=h; z7=.5[z8,z6]+bend; z4=.5[z3,z5]+bend; (z0)t_=(z2)t_+penoffset down of currentpen =(z3)t_+penoffset down of pen_[tilted.nib]; (z20)t_=(z8)t_+penoffset down of currentpen =(z9)t_+penoffset down of pen_[tilted.nib]; draw z1{right}..tension atleast 1 and infinity..z2; % first diagonal % pickup tilted.nib; x5=x6; rt x10=w; x11=x10-.1w; top y5=h; top y10=.8h; top y11=h; erase fill z0--(x0,y0-0.5h)--(x5,y0-0.5h)--z5..z4..z3--cycle; draw z3..z4..z5; % second diagonal % pickup med_cal.nib; erase fill\\(.3w,bot y6)--(w,bot y6)--(w,top y6)--(.3w,top y6)--cycle; draw z6..z7..z8; % third diagonal pickup tilted.nib; path p; p=z9..tension atleast 3 and 1..{up}z10; erase fill z20--(x20,y20-0.5h)--(x10,y20-0.5h)--(x10+eps,y10) --reverse p--cycle; draw p..{left}z11; % fourth diagonal % math_fit(-2/3x_height#*slant+0.5hair#+0.5u#,3/4ic#); labels(0,1,2,3,4,5,6,7,8,9,10,11,20); endchar; cmchar "Calligraphic x"; beginchar("x",8u#,x_height#,0); italcorr max(1/3x_height#*slant+0.5hair#+0.5u#,x_height#*slant+.25u#); adjust_fit(0,0); % pickup lower_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(0,ic#); labels(1,2,3,4,5,6,7,8); endchar; cmchar "Calligraphic y"; beginchar("y",8.5u#,x_height#,desc_depth#); italcorr x_height#*slant+0.5stem#-u#; adjust_fit(0,0); % pickup lower_cal.nib; x1=0; x3=good.x(2.80u); x4=x10=good.x(2.45u); x5=0.5[x4,x6]; x6=x7=x8=good.x(w-1.5u); y4=0.7[y5,y6]; bot y5=-oo; y6=0.57h; top y7=h; draw hook_in(1,2,3)...z4 down_to_right z5...z6{up}; draw z7..desc_curve(8,9,10); % math_fit(-2/3x_height#*slant+0.5hair#+0.5u#,ic#-1/3x_height#*slant); labels(1,2,3,4,5,6,7,8,9,10); endchar; cmchar "Calligraphic z"; beginchar("z",5.5u#+max(1.5u#,stem#),x_height#,0);%desc_depth#); italcorr x_height#*slant+0.5hair#; adjust_fit(0,0); % pickup lower_cal.nib; y1=good.y 3/4x_height; top y2=h+oo; top y3=vround 0.98h+eps; bot y4=-oo; bot y5=-oo; y6=good.y 1/4x_height; x1=x4=good.x u; x6=good.x w; x6-x3=hround 0.5u; x2=0.25[x1,x3]; x5=0.25[x6,x4]; draw z1 ... z2{right}..{z3-z4}z3 --z4{z3-z4}..z5{right}... z6; % math_fit(0,1/3x_height#*slant+0.5hair#+0.5u#); labels(1,2,3,5,6); endchar; cmchar "Calligraphic dotless i"; beginchar(hex"10",5u#,x_height#,0);% height italcorr 1/3x_height#*slant+0.5hair#+0.5u#; adjust_fit(0,0); pickup lower_cal.nib; x1=0; x3=good.x(0.5w+0.30u); x4=good.x(0.5w-0.30u); x6=w; draw hook_in(1,2,3)...hook_out(4,5,6); math_fit(0,0); labels(1,2,3,4,5,6,7); endchar; cmchar "Calligraphic dotless j"; beginchar(hex"11",5u#,x_height#,desc_depth#); italcorr x_height#*slant+0.5stem#-2u#; adjust_fit(0,0); pickup lower_cal.nib; x1=0; x3=x4=good.x(w-1.5u); x6=good.x 0; draw hook_in(1,2,3)..desc_curve(4,5,6); math_fit(0,0); labels(1,2,3,4,5,6); endchar; cmchar "Calligraphic dot"; beginchar(".",5u#,dtsz#,0); italcorr 0.5u#; adjust_fit(0,0); pickup fine_cal.nib; cal_dot1((0.5w,0.5dtsz),dtsz); math_fit(0,0); penlabels(1,1'); endchar; cmchar "Calligraphic comma"; beginchar(",",5u#,dtsz#,0.5desc_depth#); italcorr 0.5u#; adjust_fit(0,0); pickup fine_cal.nib; cal_dot1((0.5w,0.5dtsz),dtsz); bot y2=-d; lft x2=hround u; draw z1r{down}....z2; math_fit(0,0); penlabels(1,1'); labels(2); endchar; cmchar "Calligraphic semicolon"; beginchar(";",5u#,x_height#,0.5desc_depth#); italcorr 0.5u#; adjust_fit(0,0); pickup fine_cal.nib; cal_dot1((0.5w,0.5dtsz),dtsz); cal_dot2((0.5w,h-0.5dtsz),dtsz); bot y3=-d; lft x3=hround u; draw z1r{down}....z3; math_fit(0,0); penlabels(1,1',2,2'); labels(3); endchar; cmchar "Calligraphic colon"; beginchar(":",5u#,x_height#,0); italcorr 0.5u#; adjust_fit(0,0); pickup fine_cal.nib; cal_dot1((0.5w,0.5dtsz),dtsz); cal_dot2((0.5w,h-0.5dtsz),dtsz); math_fit(0,0); penlabels(1,1',2,2'); endchar; cmchar "Calligraphic hyphen"; beginchar("-",6u#,x_height#,0); italcorr 0.5x_height#*slant-0.5u#; adjust_fit(0,0); pickup lower_cal.nib; y1=y3=good.y 0.5h; lft x1=hround 0.2u-eps; rt x3=hround(w-u)+eps; z2=0.5[z1,z3]; draw z1{w,h}...z2{w,-0.5h}...z3{w,h}; math_fit(0,0); labels(1,2,3); endchar; cmchar "Calligraphic en-dash"; beginchar(oct"173",9u#,x_height#,0); italcorr 0.61803x_height#*slant+0.5u#; adjust_fit(0,0); pickup lower_cal.nib; y1=y2=good.y 0.61803h; lft x1=-eps; rt x2=w+eps; draw z1..z2; math_fit(0,0); labels(1,2); endchar; cmchar "Calligraphic em-dash"; beginchar(oct"174",18u#,x_height#,0); italcorr 0.61803x_height#*slant+0.5u#; adjust_fit(letter_fit#,letter_fit#); pickup lower_cal.nib; y1=y2=good.y 0.61803h; lft x1=-eps; rt x2=w+eps; draw z1..z2; math_fit(0,0); labels(1,2,3); endchar; ligtable "-" : "-" =: oct"173"; ligtable oct"173" : "-" =: oct"174"; beginchar("0",9u#,fig_height#,0); "The digit 0"; italcorr fig_height#*slant-0.5u#; adjust_fit(0,0); pickup lower_cal.nib; numeric a; a=min(0.25h,0.5(x_height-o)); top y1=h+o; bot y3=-o; y2=y4=0.5[y1,y3]; lft x2=hround max(0.7u,lft 1.45u); x4=w-x2; x1=x3=0.5[x2,x4]; draw z1 left_to_down z2 down_to_right z3 right_to_up z4 up_to_left z1; labels(1,2,3,4); math_fit(0,0.5ic#); endchar; beginchar("1",9u#,fig_height#,0); "The digit 1"; italcorr fig_height#*slant-0.5u#; adjust_fit(0,0); pickup lower_cal.nib; top y2=h+o; bot y3=-eps; y1=good.y 1/3[y2,y3]; rt x2-lft x1=hround 4u; rt x2=rt x3=w-hround 3u; draw z1--z2--z3; labels(1,2,3); math_fit(0,0.5ic#); endchar; beginchar("2",9u#,fig_height#,0); "The digit 2"; italcorr fig_height#*slant-0.5u#; adjust_fit(0,0); pickup lower_cal.nib; top y2=h+o; bot y5=bot y6=0; y1=y3=good.y 0.75h; lft x1=lft x5+eps=hround u; rt x3=rt x6-eps=w-hround u; x2=x4=0.5[x1,x3]; y4=0.4[y5,y3]; draw z1 up_to_right z2 right_to_down z3...z4---z5--z6; labels(1,2,3,4,5,6); math_fit(0,0.5ic#); endchar; beginchar("3",9u#,fig_height#,0); "The digit 3"; italcorr fig_height#*slant-0.5u#; adjust_fit(0,0); pickup lower_cal.nib; bot y2=-o; top y5=top y6=x_height; y1=good.y 1/4x_height; y3=a; y5-y4=y3-y2; top y7=top y8=h; rt x3=w-hround u; x3=x4=x7+hround 0.5u-eps; lft x1=hround u; x1+hround 0.5u-eps=x8; lft x6=hround 3u-eps; x2=x5=0.5[x1,x3]; draw z1 ... z2 right_to_up z3..z4 up_to_left z5--z6--z7--z8; labels(1,2,3,4,5,6,7,8); math_fit(0,0.5ic#); endchar; beginchar("4",9u#,fig_height#,0); "The digit 4"; italcorr fig_height#*slant-0.5u#; adjust_fit(0,0); pickup lower_cal.nib; top y1=h+o; bot y5=-eps; top y4=x_height+eps; y2=y3=good.y(0.5x_height); rt x3=w-hround 0.3u+eps; lft x2=hround 0.8u-eps; x1=good.x 0.3[x2,x3]; x4=x5=good.x 0.6[x2,x3]; draw z1--z2--z3; draw z4..z5; labels(1,2,3,4,5); math_fit(0,0.5ic#); endchar; beginchar("5",9u#,fig_height#,0); "The digit 5"; italcorr fig_height#*slant-0.5u#; adjust_fit(0,0); pickup lower_cal.nib; bot y2=-o; top y5=x_height+eps; y1=good.y 1/4x_height; y3=a; y5-y4=y3-y2; y6=good.y 0.2[y5,y2]; top y7=top y8=h; rt x3=w-hround u; x3=x4=x8+hround 0.5u-eps; lft x1=hround u; x1+hround 0.5u=x6=x7; x2=x5=0.5[x1,x3]; draw z1 ... z2 right_to_up z3..z4 up_to_left z5 ... z6--z7--z8; labels(1,2,3,4,5,6,7,8); math_fit(0,0.5ic#); endchar; beginchar("6",9u#,fig_height#,0); "The digit 6"; italcorr fig_height#*slant-0.5u#; adjust_fit(0,0); pickup lower_cal.nib; top y2=h+o; bot y4=-o; y1=good.y(h-0.2x_height); top y6=x_height+eps; y3=0.45[y4,y2]; y5=0.5[y4,y6]; lft x3=hround max(0.7u,lft 1.45u); x5=w-x3; rt x1=w-hround u; x2=0.6[x3,x1]; x4=x6=0.5[x3,x5]; draw z1 ... z2{left} ... z3 down_to_right z4 right_to_up z5 up_to_left z6 ...z3; labels(1,2,3,4,5,6); math_fit(0,0.5ic#); endchar; beginchar("7",9u#,fig_height#,0); "The digit 7"; italcorr fig_height#*slant-0.5u#; adjust_fit(0,0); pickup lower_cal.nib; top y2=top y3=h; bot y4=-eps; y1=good.y 0.8h; lft x1=lft x2=hround u; rt x3=w-hround 0.5u; x4=good.x 0.4[x2,x3]; draw z1--z2--z3--z4; labels(1,2,3,4); math_fit(0,0.5ic#); endchar; beginchar("8",9u#,fig_height#,0); "The digit 8"; italcorr fig_height#*slant-0.5u#; adjust_fit(0,0); pickup lower_cal.nib; bot y1=vround 0.5h; bot y4=-o; y1-y2=y1-y6=y3-y4; y3=y5=a; lft x2=lft x3=hround u; rt x5=rt x6=w-hround u; x1=x4=x7=0.5[x2,x6]; top y7=h+o; y8=y9=0.5[y7,y1]; lft x8=w-rt x9=hround 1.4u-eps; draw z1 left_to_down z2..z3 down_to_right z4 right_to_up z5..z6 up_to_left z1; draw superellipse(z9,z7,z8,z1,superness); labels(1,2,3,4,5,6,7,8,9); math_fit(0,0.5ic#); endchar; beginchar("9",9u#,fig_height#,0); "The digit 9"; italcorr fig_height#*slant-0.5u#; adjust_fit(0,0); pickup lower_cal.nib; bot y2=-o; top y4=h+o; y1=good.y 0.2x_height; bot y6=h-x_height-eps; y3=0.45[y4,y2]; y5=0.5[y4,y6]; lft x5=hround max(0.7u,lft 1.45u); x3=w-x5; lft x1=hround u; x2=0.6[x3,x1]; x4=x6=0.5[x3,x5]; draw z1 ... z2{right}... z3 up_to_left z4 left_to_down z5 down_to_right z6 ...z3; labels(1,2,3,4,5,6,7,8,9); math_fit(0,0.5ic#); endchar; cmchar "Calligraphic grave accent"; beginchar(oct"22",9u#,min(asc_height#,2x_height#),0); italcorr asc_height#*slant-0.5u#; adjust_fit(0,0); pickup pencircle xscaled stem yscaled hair; top y1=h+eps; bot y2=vround 1/3[x_height,h]-eps; lft x1=hround 1.75u; rt x2=hround 2/3[x1,w-x1]; draw z1{x2-x1,2(y2-y1)}..z2; labels(1,2); endchar; cmchar "Calligraphic acute accent"; beginchar(oct"23",9u#,min(asc_height#,2x_height#),0); italcorr asc_height#*slant-0.5u#; adjust_fit(0,0); pickup pencircle xscaled stem yscaled hair; top y1=h+eps; bot y2=vround 1/3[x_height,h]-eps; rt x1=w-hround 1.75u; lft x2=hround 2/3[x1,w-x1]; draw z1{x2-x1,2(y2-y1)}..z2; labels(1,2); endchar; cmchar "Calligraphic breve accent"; beginchar(oct"24",9u#,min(asc_height#,2x_height#),0); italcorr asc_height#*slant-0.5u#; adjust_fit(0,0); pickup fine_cal.nib; top y1=top y3=h+eps; bot y2=vround 1/3[x_height,h]-eps; x1=w-x3=good.x 0.2u; x2=0.5[x1,x3]; draw z1 down_to_right z2 right_to_up z3; labels(1,2,3); endchar; % HUM cmchar "Calligraphic tilde accent"; beginchar(oct"176",9u#, min(asc_height#,10/7x_height#+0.5flare#),0); italcorr asc_height#*slant-0.5u#; adjust_fit(0,0); pickup lower_cal.nib; bot y4=vround 1/3[x_height,h]-eps; top y2=h+eps; y1=y3=y5=good.y 0.5[y2,y4]; lft x1=w-rt x5=hround 1.5u; x2=0.25[x1,x5]; x3=0.5[x1,x5]; x4=0.75[x1,x5]; draw z1{(z2-z1) yscaled 2}...z2{right}... z3{(z4-z3)yscaled 2}...z4{right} ...{(z5-z4) yscaled 2}z5; labels(1,2,3,4,5); endchar; cmchar "Calligraphic circumflex accent"; beginchar(oct"136",9u#,min(asc_height#,2x_height#),0); italcorr asc_height#*slant-0.5u#; adjust_fit(0,0); pickup pencircle xscaled stem yscaled hair; top y2=h+eps; bot y1=bot y3=vround 1/3[x_height,h]-eps; lft x1=w-rt x3=hround 1.75u; x2=good.x 0.5[x1,x3]; draw z1..{x2-x1,2(y2-y1)}z2 &z2{x3-x2,2(y3-y2)}..z3; labels(1,2,3); endchar; cmchar "Calligraphic hacheck accent"; beginchar(oct"24",9u#,min(asc_height#,2x_height#),0); italcorr asc_height#*slant-0.5u#; adjust_fit(0,0); pickup pencircle xscaled stem yscaled hair; top y1=top y3=h+eps; bot y2=vround 1/3[x_height,h]-eps; lft x1=w-rt x3=hround 1.75u; x2=good.x 0.5[x1,x3]; draw z1..{x2-x1,2(y2-y1)}z2 &z2{x3-x2,2(y3-y2)}..z3; labels(1,2,3); endchar; cmchar "Calligraphic macron accent"; beginchar(oct"26",9u#,0.4[x_height#,asc_height#]+0.5hair#,0); italcorr charht*slant-0.5u#; adjust_fit(0,0); pickup lower_cal.nib; top y1=top y2=h; lft x1=w-rt x2=hround 1.25u; draw z1..z2; labels(1,2); endchar; cmchar "Calligraphic circ accent"; beginchar(oct"27",14.4u# +4/3(asc_height#-x_height#)*slant+1.5u#, asc_height#,0); italcorr asc_height#*slant-0.5u#; adjust_fit(0,0); pickup fine_cal.nib; numeric a,b; b=vround(1/3[x_height,h]); a=round max(3.6u,h+o-b); top y2=b+a+eps; bot y4=b-eps; y0=y1=y3=0.5[y4,y2]; x0=x2=x4=0.5w; lft x3=hround(x0-0.5a)-eps; x1-x0=x0-x3; draw superellipse(z1,z2,z3,z4,superness); labels(1,2,3,4,0); endchar; cmchar "Calligraphic cedilla accent"; beginchar(oct"30",9u#,0,desc_depth#); italcorr asc_height#*slant-0.5u#; adjust_fit(0,0); pickup lower_cal.nib; bot y1=-oo; top y2=-vround max(o,-d/6); bot y4=-d; y3=0.5[y2,y4]; y5=good.y 0.4[y4,y3]; x1=x2=x4=good.x 0.5w; lft x5=w-rt x3=hround 1.5u-eps; draw z1--z2 right_to_down z3 down_to_left z4 ... z5; labels(1,2,3,4,5); endchar; cmchar "Calligraphic dot accent"; beginchar(oct"137",9u#, min(asc_height#,10/7x_height#+0.5flare#),0); adjust_fit(0,0); pickup fine_cal.nib; cal_dot1((0.5w,h-0.5flare),flare); math_fit(0,0); penlabels(1,1'); endchar; cmchar "Calligraphic umlaut accent"; beginchar(oct"177",9u#, min(asc_height#,10/7x_height#+0.5flare#),0); adjust_fit(0,0); pickup fine_cal.nib; cal_dot1((2.75u,h-0.5flare),flare); cal_dot2((w-2.75u,h-0.5flare),flare); math_fit(0,0); penlabels(1,1',2,2'); endchar; cmchar "Calligraphic long umlaut accent"; beginchar(oct"175",9u#,min(asc_height#,2x_height#),0); adjust_fit(0,0); pickup pencircle xscaled stem yscaled hair; top y1=top y3=h+eps; bot y2=bot y4=vround 1/3[x_height,h]-eps; lft x4=hround 2.25u; rt x1=w-hround 1.5u; x1-x3=x2-x4=hround 3u; draw z1{x2-x1,2(y2-y1)}..z2; draw z3{x4-x3,2(y4-y3)}..z4; labels(1,2,3,4); endchar; cmchar "Calligraphic es-zet"; beginchar(oct"31",8u#,asc_height#,desc_depth#); italcorr max(.8h#*slant-.1w#,.3h#*slant)+.5u#; adjust_fit(0,0); pickup lower_cal.nib; x1=x3=good.x 1.5u; x4=.6[x2,x5]; rt x5=.9w; x6=.4w; rt x7=w; x8=.4[x9,x7]; lft x9=rt x3; top y1=x_height+oo; bot y3=-d-oo; z2=.3[z3,z1]+bend; 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 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; currenttransform:=identity yscaled aspect_ratio scaled granularity; autorounding:=0; extra_endchar:=""; standard_proofing;