% Visible speech consonants (loop-shaped characters)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

bothvloop
 autoloopchar;
 rl:=t;
 simplevloop;
 if u=2: vvoice; fi
 endchar;
endfor; endfor;

bothvloop
 autoloopchar;
 rl:=t;
 simplevloop;
 vclose;
 if u=2: vvoice; fi
 endchar;
endfor; endfor;

for t=1,2:
autoloopchar;
rl:="r";
vlooppoints;
pickup thinpen;
draw z1..controls postcontrol 0 of p and precontrol 1 of p..z2;
draw z4..controls postcontrol 3 of p and precontrol 4 of p..point 3.7 of p;
cullit;
pickup pencircle scaled 1.1thin;
cutoff (point 3.7 of p,angle direction 3.7 of p);
penstroke z2e..z3e{down}..z4e;
labels(1,2,3,4,5);
if t=2: vvoice; fi
vsqig;
endchar;

autoloopchar;
rl:="l";
vlooppoints;
pickup thinpen;
draw point .3 of p..controls postcontrol 0 of p and precontrol 1 of p..z2;
draw z4..controls postcontrol 3 of p and precontrol 4 of p..z5;
cullit;
pickup pencircle scaled 1.1thin;
cutoff (point .3 of p,180+angle direction .3 of p);
penstroke z2e..z3e{down}..z4e;
labels(1,2,3,4,5);
if t=2: vvoice; fi
vsqig;
endchar;
endfor;

bothhloop
 autoloopchar;
 tb:=t;
 simplehloop;
 if u=2: hvoice; fi
 endchar;
endfor; endfor;

bothhloop
 autoloopchar;
 tb:=t;
 simplehloop;
 hclose;
 if u=2: hvoice; fi
 endchar;
endfor; endfor;

for t=1,2:
autoloopchar;
tb:="t";
hlooppoints;
pickup thinpen;
draw point .3 of p..controls postcontrol 0 of p and precontrol 1 of p..z2;
draw z4..controls postcontrol 3 of p and precontrol 4 of p..z5;
cullit;
pickup pencircle scaled 1.1thin;
cutoff (point .3 of p,180+angle direction .3 of p);
penstroke z2e..z3e{left}..z4e;
labels(1,2,3,4,5);
if t=2: hvoice; fi
hsqig;
endchar;

autoloopchar;
tb:="b";
hlooppoints;
pickup thinpen;
draw z1..controls postcontrol 0 of p and precontrol 1 of p..z2;
draw z4..controls postcontrol 3 of p and precontrol 4 of p..point 3.7 of p;
cullit;
pickup pencircle scaled 1.1thin;
cutoff (point 3.7 of p,angle direction 3.7 of p);
penstroke z2e..z3e{left}..z4e;
labels(1,2,3,4,5);
if t=2: hvoice; fi
hsqig;
endchar;
endfor;

bothvloop
 autoloopchar;
 rl:=t;
 vlooppoints;
 vcurl;
 penstroke z2e..z3e{down}..z4e;
 if u=2: vvoice; fi
 labels(1,2,3,4,5,1.1,1.2,5.1,5.2);
 endchar;
endfor; endfor;

bothhloop
 autoloopchar;
 tb:=t;
 hlooppoints;
 hcurl;
 penstroke z2e..z3e{left}..z4e;
 if u=2: hvoice; fi
 labels(1,2,3,4,5,1.1,1.2,5.1,5.2);
 endchar;
endfor; endfor;

bothvloop
 autoloopchar;
 rl:=t;
 vdintpoints;
 penstroke z1e{curl 5}..z2e..z3e{down}..z4e&
    z4e..z5e{down}..z6e..{curl 5}z7e;
 if u=2: vvoice; fi
 endchar;
endfor; endfor;

bothhloop
 autoloopchar;
 tb:=t;
 hdintpoints;
 penstroke z1e{curl 5}..z2e..z3e{left}..z4e&
   z4e..z5e{left}..z6e..{curl 5}z7e;
 if u=2: hvoice; fi
 labels(1,2,3,4,5,6,7);
 endchar;
endfor; endfor;

bothvloop
 autoloopchar;
 rl:=t;
 vdintpoints;
 vcurlpoints;
 p1:=z1.1..z1..z1.2..tension 2 and 1..z2..z3{down}..z4&
   z4..z5{down}..z6..tension 1 and 2..z5.2..z7..z5.1;
 penpos1.1(thin,angle direction 0 of p1 vmorp 90);
 penpos1.2(thin,angle direction 2 of p1 vmorp 90);
 penpos5.2(thin,angle direction 8 of p1 vmorp 90);
 penpos5.1(thin,angle direction 10 of p1 vmorp 90);
 x1e:=whatever; x1r:=whatever; x1l:=whatever;
 y1e:=whatever; y1r:=whatever; y1l:=whatever;
 x7e:=whatever; x7r:=whatever; x7l:=whatever;
 y7e:=whatever; y7r:=whatever; y7l:=whatever;
 penpos1(thin,angle direction 1 of p1 vmorp 90);
 penpos7(thin,angle direction 9 of p1 vmorp 90);
 penstroke z1.1e..z1e..z1.2e..tension 2 and 1..z2e..z3e{down}..z4e&
   z4e..z5e{down}..z6e..tension 1 and 2..z5.2e..z7e..z5.1e;
 labels(1,2,3,4,5,6,7,5.1,5.2,1.1,1.2);
 if u=2: vvoice; fi
 endchar;
endfor; endfor;

bothhloop
 autoloopchar;
 tb:=t;
 hdintpoints;
 hcurlpoints;
 p1:=z1.1..z1..z1.2..tension 2 and 1..z2..z3{left}..z4&
   z4..z5{left}..z6..tension 1 and 2..z5.2..z7..z5.1;
 penpos1.1(thin,angle direction 0 of p1 - hmorp 90);
 penpos1.2(thin,angle direction 2 of p1 - hmorp 90);
 penpos5.2(thin,angle direction 8 of p1 - hmorp 90);
 penpos5.1(thin,angle direction 10 of p1 - hmorp 90);
 x1e:=whatever; x1r:=whatever; x1l:=whatever;
 y1e:=whatever; y1r:=whatever; y1l:=whatever;
 x7e:=whatever; x7r:=whatever; x7l:=whatever;
 y7e:=whatever; y7r:=whatever; y7l:=whatever;
 penpos1(thin,angle direction 1 of p1 - hmorp 90);
 penpos7(thin,angle direction 9 of p1 - hmorp 90);
 penstroke z1.1e..z1e..z1.2e..tension 2 and 1..z2e..z3e{left}..z4e&
   z4e..z5e{left}..z6e..tension 1 and 2..z5.2e..z7e..z5.1e;
 labels(1,2,3,4,5,6,7,5.1,5.2,1.1,1.2);
 if u=2: hvoice; fi
 endchar;
endfor; endfor;

autoloopchar;
pickup pencircle xscaled thick yscaled fine;
x1=x3=.5[lside,rside];
top y1=h+curve_overshoot;
bot y3=0-curve_overshoot;
y2=y4=1/2h;
rt x4=rside+curve_overshoot;
lft x2=lside-curve_overshoot;
draw z1..z2..z3..z4..cycle;
labels(1,2,3,4);
endchar;

for u=1,2:
beginchar(incr ccode,3/4loop_w#+2sidebar#,loop_h#,0);
x1=x3=x.i1=x.i3=.5[lside,rside];
y1=h+apex_overshoot;
y3=0-apex_overshoot;
y.i3-y3=y1-y.i1=3/4fine;
y2=y4=y.i2=y.i4=1/2h;
x4=rside+curve_overshoot;
x2=lside-curve_overshoot;
x4-x.i4=x.i2-x2=curve;
fill superellipse(z4,z1,z2,z3,.655);
cullit;
unfill superellipse(z.i4,z.i1,z.i2,z.i3,.66);
if u=2: pickup thickpen; draw z.i2--z.i4; fi
labels(1,2,3,4);
endchar;
endfor;

beginchar(incr ccode,2/3loop_w#+2sidebar#,loop_h#,10u#);
pickup thickpen;
y1=y2;
top y1=h+2apex_overshoot;
lft x1=lside;
rt x2=rside;
x2=x4;
x1=x3;
y3=y4;
bot y4=-3apex_overshoot;
z5=(1/2[x1,x2],1/2[y1,y3]);
draw z1..z5..z3;
draw z2..z5..z4;
endchar;