Plan 9 from Bell Labs’s /usr/web/sources/contrib/steve/root/sys/lib/texmf/fonts/source/jknappen/tc/txsymbol.mf

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


% txsymbol.mf
%
% (c) Copyright 1995, 1996, 1997 J"org Knappen
%
% This file is part of ecfonts version 1.0
%
% Please read the files 00readme.txt, 00inst.txt, 00error.txt, and
% copyrite.txt for further information
%
% You find some documentation in ecdoc.tex (needs LaTeX2e)
%
% EC Version 1.0
% 31-DEC-1996
%
% Miscellaneous symbols for the TS1 encoding
%
% Heavily borrowing from existent fonts, like Computer Modern, AMS symbols
% and wasy symbols

version_check(1,0);  % |version_check| was introduced in dc1.3

ecchar"Single straight base quote"; % jk
beginchar(oct"015",7u#,asc_height#,0); 
 numeric shifth_down;
 adjust_fit(0,0);
 x1=x2=.5w; 
 y2=max(.5[bar_height,x_height]+.5vair,h-x_height)-the_shift;
 if serifs:
  y1=flare/2; the_shift=h-.5stem-y1;
  pickup crisp.nib;
  pos1(flare,0); pos2(vair,0); 
  filldraw circ_stroke (z1e--z2e); % stem and bulb
 else:
  top y1=stem; the_shift=h-y1;
  pickup fine.nib;
  pos1(stem,0); pos2(vair,0); 
  filldraw stroke z1e--z2e; % stem
 fi
 charht:=dot_size#; chardp:=desc_depth#;
 penlabels(1,2,3,4);
endchar;

ecchar"Double straight base quotes"; % from pl_cud (plfonts)
beginchar(oct"022",9u#,asc_height#,0); 
 numeric top_width#,spread#,shifth_down;
 top_width#=if serifs: flare# else: stem# fi;
 spread#=max(3u#,top_width#+.5u#); define_pixels(spread);
 adjust_fit(0,0);
 numeric the_shift;
 x1=x2; x3=x4=w-x1; x3-x1=spread+2; y1=y3;
 y2=y4=max(.5[bar_height,x_height]+.5vair,h-x_height)-the_shift;
 if serifs:
  y1=flare/2; the_shift=h-.5stem-y1;
  pickup crisp.nib;
  pos1(flare,0); pos2(vair,0); pos3(flare,0); pos4(vair,0);
  filldraw circ_stroke (z1e--z2e); % left stem and bulb
  filldraw circ_stroke (z3e--z4e); % right stem and bulb
 else:
  top y1=stem; the_shift=h-y1;
  pickup fine.nib;
  pos1(stem,0); pos2(vair,0); pos3(stem,0); pos4(vair,0);
  filldraw stroke z1e--z2e; % left stem
  filldraw stroke z3e--z4e; % right stem
 fi
 charht:=dot_size#; chardp:=desc_depth#;
 penlabels(1,2,3,4);
endchar;

ecchar "twelve u dash";
beginchar(oct"025",12u#,x_height#,0);
italcorr .61803x_height#*slant+.5u#;
adjust_fit(letter_fit#,letter_fit#);
pickup crisp.nib; pos1(vair,90); pos2(vair,90);
top y1r=top y2r=vround(.61803h+.5vair); lft x1=-eps; rt x2=w+eps;
filldraw stroke z1e--z2e;  % bar
penlabels(1,2); endchar;

ecchar "three quarters em dash";
beginchar(oct"026",13.5u#,x_height#,0);
italcorr .61803x_height#*slant+.5u#;
adjust_fit(letter_fit#,letter_fit#);
pickup crisp.nib; pos1(vair,90); pos2(vair,90);
top y1r=top y2r=vround(.61803h+.5vair); lft x1=-eps; rt x2=w+eps;
filldraw stroke z1e--z2e;  % bar
penlabels(1,2); endchar;

ecchar "Capital compound word mark";
beginchar(oct"027",0,cap_height#,0);
zero_width;
endchar;

ecchar "Leftward arrow"; % from sym.mf (cmfonts)
compute_spread(.45x_height#,.55x_height#);
beginchar(oct"030",18u#,v_center(spread#+rule_thickness#));
adjust_fit(0,0); pickup crisp.nib;
pos1(rule_thickness,90); pos2(rule_thickness,90);
pos3(rule_thickness,0); pos4(rule_thickness,0);
y0=y1=y2=math_axis; x1+.5rule_thickness=hround(w-u); lft x0=hround u;
y3-y0=y0-y4=if monospace:.24 else:.36 fi asc_height+eps;
x3=x4=x0+if monospace:3u else:4u fi+eps;
pos5(rule_thickness,angle(z4-z0)); z5l=z0;
pos6(rule_thickness,angle(z3-z0)); z6l=z0;
z9=.2[.5[z3,z4],z0];
numeric t; path p; p=z4r{z9-z4}..z6r;
t=xpart(p intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p;
filldraw z0..{z4-z9}z4l--subpath (0,t) of\\(z4r{z9-z4}..z6r)
 --z2l---z1l..z1r---z2r--subpath (t,0) of\\(z3r{z9-z3}..z5r)
 --z3l{z9-z3}..z0 & cycle;  % arrowhead and stem
penlabels(0,1,2,3,4,5,6,9); endchar;

ecchar "Rightward arrow"; % from sym.mf (cmfonts)
compute_spread(.45x_height#,.55x_height#);
beginchar(oct"031",18u#,v_center(spread#+rule_thickness#));
adjust_fit(0,0); pickup crisp.nib;
pos1(rule_thickness,90); pos2(rule_thickness,90);
pos3(rule_thickness,0); pos4(rule_thickness,0);
y0=y1=y2=math_axis; x1-.5rule_thickness=hround u; rt x0=hround(w-u);
y3-y0=y0-y4=if monospace:.24 else:.36 fi asc_height+eps;
x3=x4=x0-if monospace:3u else:4u fi-eps;
pos5(rule_thickness,angle(z4-z0)); z5l=z0;
pos6(rule_thickness,angle(z3-z0)); z6l=z0;
z9=.2[.5[z3,z4],z0];
numeric t; path p; p=z4l{z9-z4}..z6r;
t=xpart(p intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p;
filldraw z0..{z4-z9}z4r--subpath (0,t) of\\(z4l{z9-z4}..z6r)
 --z2l---z1l..z1r---z2r--subpath (t,0) of\\(z3l{z9-z3}..z5r)
 --z3r{z9-z3}..z0 & cycle;  % arrowhead and stem
penlabels(0,1,2,3,4,5,6,9); endchar;

ecchar"Tie accent"; % from italms (cmfonts)
beginchar(oct"032",5u#,asc_height#,0);
italcorr 4/9[x_height#,asc_height#]*slant+4.5u#+2letter_fit#+.5hair#;
adjust_fit(if monospace:2u#,2u# else:serif_fit#,serif_fit# fi);
pickup fine.nib; pos1(hair,180); pos2(vround 1/5[vair,stem],90); 
pos3(hair,0);
lft x1r=hround(.5w-.5hair); x2=.5[x1,x3];
rt x3r=hround(w+4u+2letter_fit+.5hair);
y1=y3=4/9[x_height,asc_height]; top y2r=vround 8/9[x_height,asc_height];
filldraw stroke super_arc.e(1,2) & super_arc.e(2,3);  % arc
penlabels(1,2,3); endchar;

ecchar"New tie accent"; % centered
beginchar(oct"034",9u#,asc_height#,0);
italcorr 4/9[x_height#,asc_height#]*slant+4.5u#+2letter_fit#+.5hair#;
adjust_fit(if monospace:2u#,2u# else:serif_fit#,serif_fit# fi);
pickup fine.nib; pos1(hair,180); pos2(vround 1/5[vair,stem],90); 
pos3(hair,0);
lft x1r=w-rt x3r=hround(2u-.5vair); x2=.5w;
y1=y3=4/9[x_height,asc_height]; top y2r=vround 8/9[x_height,asc_height];
filldraw stroke super_arc.e(1,2) & super_arc.e(2,3);  % arc
penlabels(1,2,3); endchar;

ecchar "Ascender height compound word mark";
beginchar(oct"037",0,asc_height#,0);
zero_width;
endchar;

iff not variant_g: % not italic
ecchar"Blank symbol"; % jk
beginchar(oct"040",10u#+serif_fit#,asc_height#,0);
italcorr .5x_height#*slant+min(.5curve#-u#,-.25u#);
adjust_fit(serif_fit#,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
put_cross(.5stem+if serifs: .9max(limit_dist,jut) else: 1.8u fi,.5stem+3u);
penlabels(0,1,2,3,4,5,6,7,8); endchar;

iff variant_g: % italic
ecchar"Blank symbol"; % jk
beginchar(oct"040",8u#,asc_height#,0);
italcorr .7x_height#*slant+.5curve#-u# if math_fitting:-.5u# fi;
adjust_fit(0,0); pickup tiny.nib;
pos1(stem,0); pos2(stem,0); x1=x2;
lft x1l=hround(1.5u-.5stem); top y1=h; y2=.5x_height;
filldraw stroke z1e--z2e;  % stem
sloped_serif.l(1,2,a,1/3,jut,serif_drop);  % serif
pickup fine.nib; pos2'(stem,-180); pos3(vair,-90);
pos4(curve,0); pos5(vair,90); pos0(hair,180);
z0=z2=z2'; x3=x5=.5[x2,x4]; rt x4r=hround(w-1.5u+.5curve);
bot y3r=-oo; top y5r=x_height+oo; y4=y2;
filldraw stroke pulled_arc.e(2',3) & pulled_arc.e(3,4)
 & pulled_arc.e(4,5) & super_arc.e(5,0);  % bowl
math_fit(-.3x_height#*slant+.5curve#-u#,ic#);
put_cross(.5stem+if serifs: .9max(limit_dist,jut) else: 1.8u fi,.5stem+3u);
penlabels(0,1,2,3,4,5); endchar;

ecchar"Dollar sign"; % from romanp (cm)
beginchar("$",9u#,body_height#,body_height#-asc_height#);
italcorr fig_height#*slant-.5u#; % same as for digits
adjust_fit(0,0);
numeric theta; theta=90-angle(50u,asc_height); slope:=-asc_height/50u;
pickup fine.nib; pos2(slab,-90);
pos0(cap_stem,theta); pos7(slab,-90);
x2=x0=x7=.5w; top y2l=asc_height+oo; bot y7r=-oo;
y0=.52asc_height; lft x3l=hround u; rt x6r=hround(w-u);
x3r-x3l=x6r-x6l=hround .35[slab,cap_stem]-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,0); pos8(hair,180);
 pos10(flare,0); pos9(flare,180);
 rt x1r=hround(w-u); lft x8r=hround u; y1=.5[y0,y2]; y8=.5[y0,y7];
 {{less_tense; pos2'(slab,90); z2'=z2; bulb(2',1,10);  % upper arc and bulb
 bulb(7,8,9)}};  % lower arc and bulb
else: pos1(.6[slab,flare],-100); pos8(flare,-100);
 rt x1l=hround(w-1.3u); lft x8r=hround .8u;
 top y1l=vround .92asc_height+oo; bot y8r=vround .1asc_height-oo;
 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
pickup crisp.nib; pos12(bar,0); pos11(bar,0);
lft x12l=lft x11l=hround(.5w-.5bar); top y12=h; bot y11=-d;
filldraw stroke z12e--z11e;  % vertical crossbar
penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12); endchar;


ecchar "Straight single quote"; % from romsub (cm)
beginchar(oct"047",5u#,asc_height#,0);
italcorr asc_height#*slant+.5 if serifs: flare# else: stem# fi -2u#;
adjust_fit(0,0);
x1=x2=.5w; y2=max(.5[bar_height,x_height]+.5vair,h-x_height);
if serifs: pickup crisp.nib; pos1(flare,0); pos2(vair,0);
 y1+.5stem=h; filldraw circ_stroke z1e--z2e;  % stem and bulb
else: pickup fine.nib; pos1(stem,0); pos2(vair,0);
 top y1=h; filldraw stroke z1e--z2e; fi  % stem
penlabels(1,2); endchar;

ecchar "Comma";
beginchar(",",5u#,pdot_diam#,comma_depth#);
adjust_fit(0,0);
x1-.5pdot_diam=hround(.5w-.5pdot_diam); y1-.5pdot_diam=0;
comma(1,a,pdot_diam,.2u,comma_depth);  % dot and tail
penlabels(1); endchar;

ecchar "Double hyphen or short equals sign"; % jk
compute_spread(.45x_height#,.55x_height#);
beginchar(oct"055",6u#,v_center(spread#+rule_thickness#));
italcorr h#*slant-.5u#;
adjust_fit(0,0);
numeric thickness; thickness=if hefty:bar else:.75[hair,stem] fi;
pickup crisp.nib; pos1(thickness,90); pos2(thickness,90);
pos3(thickness,90); pos4(thickness,90);
y1=y2; y3=y4;
top y1=vround .5h+.5thickness+.5spread;
top y3=vround .5h+.5thickness-.5spread;
rt x2=hround(w-u)+eps;
if monospace: x2=w-x1 else: lft x1=hround .2u-eps fi;
x3=x1; x4=x2;
filldraw stroke z1e--z2e;  % upper bar
filldraw stroke z3e--z4e;  % lower bar
penlabels(1,2,3,4); endchar;

ecchar "Period";
beginchar(".",5u#,pdot_diam#,0);
adjust_fit(0,0); pickup fine.nib;
pos1(pdot_diam,0); pos2(pdot_diam,90);
lft x1l=hround(.5w-.5pdot_diam); bot y2l=0; z1=z2; dot(1,2);  % dot
penlabels(1,2); endchar;

ecchar "Asterisk at the axis";  % from mathsy
beginchar(oct"052",9u#,v_center(x_height#));
adjust_fit(0,0);
numeric ast_flare; ast_flare=hround .7[thin_join,stem];
x0=.5w; y0=h-.5x_height;
for d=-150 step 60 until 150: z[d]=z0+.5dir d xscaled 7.5u yscaled x_height;
 numeric theta; theta=angle(z[d]-z0);
 fill z0+.5(0,-thin_join)rotated theta
  ---z[d]+.5(-ast_flare,-ast_flare)rotated theta
  ..z[d]..z[d]+.5(-ast_flare,ast_flare)rotated theta
  ---z0+.5(0,thin_join)rotated theta--cycle; endfor  % diagonal at angle |d|
labels(0,[-150],[-90],[-30],30,90,150); endchar;

ecchar "Fraction"; % from punct (cm)" Virgule (slash)"
beginchar("/",9u#,body_height#,paren_depth#);
italcorr body_height#*slant-.5u#;
adjust_fit(0,0); pickup rule.nib;
rt x1=hround(w-u)+eps; top y1=h+eps;
lft x2=hround u-eps; bot y2=-d-eps;
draw z1--z2;  % diagonal
penlabels(1,2); endchar;

ecchar "Left angle bracket";
beginchar(oct"074",7u#,body_height#,paren_depth#);
adjust_fit(0,0); pickup rule.nib;
rt x1=hround(w-u)+eps; x1=x3; lft x2=hround 2u-1-eps;
top y1=h+eps; .5[y1,y3]=y2=math_axis;
draw z1--z2--z3;  % diagonals
labels(1,2,3); endchar;

ecchar "Minus sign";
beginarithchar("="); pickup extra_rule.nib;
lft x3=hround u-eps; x4=w-x3; y3=y4=math_axis;
draw z3--z4;  % crossbar
labels(1,2,3,4); endchar;

ecchar "Right angle bracket";
beginchar(oct"076",7u#,body_height#,paren_depth#);
adjust_fit(0,0); pickup rule.nib;
rt(w-x1)=hround(w-u)+eps; x1=x3; lft(w-x2)=hround 2u-1-eps;
top y1=h+eps; .5[y1,y3]=y2=math_axis;
draw z1--z2--z3;  % diagonals
labels(1,2,3); endchar;

ecchar"Mho sign (turned Omega)"; % from lasy
beginchar(oct"115",13u#,cap_height#,0);
italcorr cap_height#*slant-.35u#;  %italcorr .75cap_height#*slant-.5u#;
adjust_fit(0,0);
pickup tiny.nib; pos1(vair,-90); pos2(cap_curve,0);
pos3(vair,0); pos4(cap_curve,180); pos5(vair,180);
x1=.5w; bot y1r=0-o; lft x4r=hround u; y2=y4=1/3h; x2=w-x4;
rt x5l=hround(1/3(w+.5u)+.5hair); top y3=top y5=h; x3=w-x5;
filldraw stroke z3e{down}...{down}z2e
 & pulled_super_arc.e(2,1)(.5superpull)
 & pulled_super_arc.e(1,4)(.5superpull)
 & z4e{up}...{up}z5e;        % bowl
numeric arm_thickness; path p; p=z3{down}...{down}z2;
arm_thickness=Vround(if hefty:slab+2stem_corr else:.75[slab,cap_vstem] fi);
pickup crisp.nib; pos6(arm_thickness,90); pos7(fudged.hair,0);
top y6r=h; x6=x3; rt x7r=hround (w-.8u); y7=good.y(y6l-.5beak)+eps;
(x,y)=p intersectionpoint((0,y6l)--(w+h,y6l)); x6l:=x;
arm(6,7,a,.5beak_darkness,1.2beak_jut);    % right arm and beak
pos8(arm_thickness,90); pos9(fudged.hair,180);
y8=y6; y9=y7; x8+x6=x9+x7=w; x8l:=w-x6l;
arm(8,9,b,.5beak_darkness,-1.2beak_jut);  % left arm and beak
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6,7,8,9); endchar;

ecchar"Big circle for copyright, etc";
beginchar("O",20u#,body_height#,max(paren_depth#,desc_depth#)); autorounded;
adjust_fit(if monospace:-3u#,-3u# else: 0,0 fi); pickup rule.nib;
if .5w <> good.x .5w: change_width; fi
lft x6=hround u; x2=w-x6; top y8=h+o; bot y4=-d-o;
circle_points; draw_circle;  % circle
labels(1,2,3,4,5,6,7,8); endchar;

ecchar"Ohm sign (ISO 6937)"; % from greeku (cmfonts)
beginchar(oct"127",13u#,cap_height#,0);
italcorr .75cap_height#*slant-.5u#;
adjust_fit(0,0);
pickup tiny.nib; pos1(vair,90); pos2(cap_curve,180);
pos3(vair,180); pos4(cap_curve,0); pos5(vair,0);
x1=.5w; top y1r=h+o; lft x2r=hround u; y2=y4=2/3h; x4=w-x2;
rt x3l=hround(1/3(w+.5u)+.5hair); bot y3=bot y5=0; x5=w-x3;
filldraw stroke z3e{up}...{up}z2e
 & pulled_super_arc.e(2,1)(.5superpull)
 & pulled_super_arc.e(1,4)(.5superpull)
 & z4e{down}...{down}z5e;  % bowl
numeric arm_thickness; path p; p=z3{up}...{up}z2;
arm_thickness=Vround(if hefty:slab+2stem_corr else:.75[slab,cap_vstem] fi);
pickup crisp.nib; pos6(arm_thickness,-90); pos7(fudged.hair,-180);
bot y6r=0; x6=x3; lft x7r=hround .8u; y7=good.y(y6l+.5beak)+eps;
(x,y)=p intersectionpoint((0,y6l)--(w,y6l)); x6l:=x;
arm(6,7,a,.5beak_darkness,-1.2beak_jut);  % left arm and beak
pos8(arm_thickness,-90); pos9(fudged.hair,0);
y8=y6; y9=y7; x8+x6=x9+x7=w; x8l:=w-x6l;
arm(8,9,b,.5beak_darkness,1.2beak_jut);  % right arm and beak
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6,7,8,9); endchar;

ecchar"Musical note (one eigth note)"; % jk
beginchar("n",11u#,asc_height#,0);
pickup rule.nib;
x1=3/5w; x2=x1; top y1=h; bot y2=.5bar_height;
lft x3=u; x5= x2; x4=x6=.5[x3,x5];
y3=y5=vround(.5bar_height); y4=y6-bar_height=-oo;
x7=x1; rt x9=w-u; x8=.5[x7,x9];
y7=y1; bot y9=vround(.5bar_height); y8=.5[y7,y9];
draw z1--z2; % stem
filldraw z3{down}...z4{right}...z5{up}...z6{left}...cycle; % body
draw z7{down}...z8...{down}z9; % flag
endchar;

ecchar "Left semantic bracket"; % [[ from stmaryrd
beginchar(oct"133",7.25u#,body_height#,paren_depth#);
adjust_fit(0,0);
pickup crisp.nib; pos1(rule_thickness,0); pos2(rule_thickness,0);
top y1=h; bot y2=-d; lft x1l=lft x2l=hround(2.5u-.5rule_thickness)-1-eps;
filldraw stroke z1e--z2e;  % left stem
pos7(rule_thickness,0); pos8(rule_thickness,0);
top y7=h; bot y8=-d; lft x7l=lft x8l=hround(4.75u-.5rule_thickness)-1-eps;
filldraw stroke z7e--z8e;  % right stem
pos3(rule_thickness,90); pos4(rule_thickness,90);
pos5(rule_thickness,90); pos6(rule_thickness,90);
x3=x5=x1l; rt x4=rt x6=ceiling(w-.4u)+eps; y3r=y4r=y1; y5l=y6l=y2;
filldraw stroke z3e--z4e;  % upper bar
filldraw stroke z5e--z6e;  % lower bar
penlabels(1,2,3,4,5,6,7,8); endchar;


ecchar "Right semantic bracket"; % ]] from stmaryrd
beginchar(oct"135",7.25u#,body_height#,paren_depth#);
adjust_fit(0,0);
pickup crisp.nib; pos1(rule_thickness,0); pos2(rule_thickness,0);
top y1=h; bot y2=-d; rt x1r=rt x2r=hround(w-2.5u+.5rule_thickness)+1+eps;
filldraw stroke z1e--z2e;  % left stem
pos7(rule_thickness,0); pos8(rule_thickness,0);
top y7=h; bot y8=-d; rt x7r=rt x8r=hround(w-4.75u+.5rule_thickness)+1+eps;
filldraw stroke z7e--z8e;  % right stem
pos3(rule_thickness,90); pos4(rule_thickness,90);
pos5(rule_thickness,90); pos6(rule_thickness,90);
x3=x5=x1l; lft x4=lft x6=ceiling(.4u)-eps; y3r=y4r=y1; y5l=y6l=y2;
filldraw stroke z3e--z4e;  % upper bar
filldraw stroke z5e--z6e;  % lower bar
penlabels(1,2,3,4,5,6,7,8); endchar;

ecchar "Upward arrow"; % from sym
beginchar(oct"136",9u#,asc_height#,asc_depth#);
italcorr .76asc_height#*slant+.5crisp#-u#;
adjust_fit(0,0); pickup crisp.nib;
pos1(rule_thickness,0); pos2(rule_thickness,0);
pos3(rule_thickness,90); pos4(rule_thickness,90);
lft x1l=hround(.5w-.5rule_thickness); y1-.5rule_thickness=-d;
x0=x1=x2; top y0=h; x0-x3=x4-x0=if monospace:3u else:4u fi+eps;
y3=y4=y0-if monospace:.24 else:.36 fi asc_height-eps;
pos5(rule_thickness,angle(z4-z0)); z5l=z0;
pos6(rule_thickness,angle(z3-z0)); z6l=z0;
z9=.2[.5[z3,z4],z0];
%numeric t; path p; p=z4l{z9-z4}..z6r;
numeric t; path p; p=z4l{z9-z4}..z6l;
t=xpart(p intersectiontimes((x2r,-d)--(x2r,h))); y2=ypart point t of p;
filldraw z0..{z4-z9}z4r--subpath (0,t) of\\(z4l{z9-z4}..z6r)
 --z2r---z1r..z1l---z2l--subpath (t,0) of\\(z3l{z9-z3}..z5r)
 --z3r{z9-z3}..z0 & cycle;  % arrowhead and stem
penlabels(0,1,2,3,4,5,6,9); endchar;

ecchar "Downward arrow"; % from sym
beginchar(oct"137",9u#,asc_height#,asc_depth#);
adjust_fit(0,0); pickup crisp.nib;
pos1(rule_thickness,0); pos2(rule_thickness,0);
pos3(rule_thickness,90); pos4(rule_thickness,90);
lft x1l=hround(.5w-.5rule_thickness); y1+.5rule_thickness=h;
x0=x1=x2; bot y0=-d; x0-x3=x4-x0=if monospace:3u else:4u fi+eps;
y3=y4=y0+if monospace:.24 else:.36 fi asc_height+eps;
pos5(rule_thickness,angle(z4-z0)); z5l=z0;
pos6(rule_thickness,angle(z3-z0)); z6l=z0;
z9=.2[.5[z3,z4],z0];
numeric t; path p; p=z4r{z9-z4}..z6r;
%t=xpart(p intersectiontimes((x2r,-d)--(x2r,h))); y2=ypart point t of p;
t=xpart(p intersectiontimes((x2l,-d)--(x2l,h))); y2=ypart point t of p;
filldraw z0..{z4-z9}z4l--subpath (0,t) of\\(z4r{z9-z4}..z6r)
 --z2r---z1r..z1l---z2l--subpath (t,0) of\\(z3r{z9-z3}..z5r)
 --z3l{z9-z3}..z0 & cycle;  % arrowhead and stem
penlabels(0,1,2,3,4,5,6,9); endchar;

ecchar"Backwards tick mark"; % from accent (cmfonts, grave accent)
beginchar(oct"140",9u#,min(asc_height#,2x_height#),0);
adjust_fit(0,0);
if serifs: pickup crisp.nib; x1-.5stem=hround 2u; x2=2/3[x1,w-x1];
 y1+.5stem=h+eps; y2=max(2/3[h,x_height],x_height+o+hair);
 numeric theta; theta=angle(z2-z1)+90;
 pos1(stem,theta); pos2(hair,theta);
 filldraw circ_stroke z1e--z2e;  % diagonal
else: pickup fine.nib; pos1(stem,0); pos2(vair,0);
 lft x1l=hround 1.5u; rt x2r=hround(.5w+.25u+.5vair);
 top y1=h; bot y2=vround 2/3[h,x_height];
 filldraw stroke z1e--z2e; fi  % diagonal
penlabels(1,2); endchar;

ecchar "Low lying tilde (squiggle)"; 
beginchar(oct"176",11u#,min(bar_height#,2/7x_height#),0);
italcorr h#*slant-u#;
adjust_fit(0,0);
if serifs: numeric theta; 
 theta=angle(1/8(7u if monospace: /expansion_factor fi-vair),1/4acc_height);
% theta=angle(1/6(6u-vair),1/4h);
 pickup crisp.nib; numeric mid_width; mid_width=.4[vair,stem];
 pos1(vair,theta+90); pos2(vair,theta+90);
 pos3(vair,theta+90); pos4(vair,theta+90);
 z2-z1=z4-z3=(mid_width-crisp)*dir theta;
 lft x1r=w-rt x4l=hround 1.5u; top y4r=h;
 bot y1l=0;
 pair delta; ypart delta=3(y3l-y1l); delta=whatever*dir theta;
 filldraw z1l..controls(z1l+delta)and(z3l-delta)..z3l..z4l
  --z4r..controls(z4r-delta)and(z2r+delta)..z2r..z1r--cycle;  % stroke
else: pickup fine.nib; pos1(vair,180); pos2(vair,90);
 pos3(.5[vair,slab],90); pos4(vair,90); pos5(vair,180);
 lft x1r=w-rt x5l=hround 1.5u; x2-x1=x3-x2=x4-x3=x5-x4;
 bot y1=bot y4l=0;
 top y2r=top y5=h; y3=.5[y2,y4];
 filldraw stroke z1e{up}...z2e{right}..z3e..{right}z4e...{up}z5e; fi % stroke
penlabels(1,2,3,4,5); endchar;

iff not monospace:
ecchar "Double hyphen-hyphenchar"; % jk
compute_spread(.45x_height#,.55x_height#);
beginchar(oct"177",3u#,v_center(spread#+rule_thickness#));
italcorr h#*slant-.5u#;
adjust_fit(0,0);
numeric thickness; thickness=if hefty:bar else:.75[hair,stem] fi;
pickup crisp.nib; pos1(thickness,90); pos2(thickness,90);
pos3(thickness,90); pos4(thickness,90);
y1=y2; y3=y4;
top y1=vround .5h+.5thickness+.5spread;
top y3=vround .5h+.5thickness-.5spread;
rt x2=hround(2w-u)+eps;
lft x1=hround .2u-eps;
x3=x1; x4=x2;
filldraw stroke z1e--z2e;  % upper bar
filldraw stroke z3e--z4e;  % lower bar
penlabels(1,2,3,4); endchar;

iff monospace:
ecchar "Double hyphen-hyphenchar"; % jk
compute_spread(.45x_height#,.55x_height#);
beginchar(oct"177",6u#,v_center(spread#+rule_thickness#));
italcorr h#*slant-.5u#;
adjust_fit(0,0);
numeric thickness; thickness=if hefty:bar else:.75[hair,stem] fi;
pickup crisp.nib; pos1(thickness,90); pos2(thickness,90);
pos3(thickness,90); pos4(thickness,90);
y1=y2; y3=y4; y1-y3=spread; .5[y1,y3]=math_axis;
rt x2=hround(w-u)+eps;
if monospace: x2=w-x1 else: lft x1=hround .2u-eps fi;
x3=x1; x4=x2;
filldraw stroke z1e--z2e;  % upper bar
filldraw stroke z3e--z4e;  % lower bar
penlabels(1,2,3,4); endchar;

ecchar"Breve";
beginchar(oct"200",11u#,min(asc_height#,2x_height#),0);
italcorr h#*slant+.5vair#-1.5u#;
adjust_fit(0,0);
pickup crisp.nib; pos1(vair,-180); pos3(vair,0);
top y1=top y3=h; lft x1r=w-rt x3r=hround(2u-.5vair);
numeric mid_thickness; mid_thickness=vround 1/3[vair,stem];
pos2(mid_thickness,-90); x2=.5w;
bot y2r=vround max(x_height+o+tiny,1/3[x_height,h]+o-.5mid_thickness);
filldraw stroke z1e{down}...z2e{right}...{up}z3e;  % stroke
penlabels(1,2,3); endchar;

ecchar "Hachek (Caron)"; 
beginchar(oct"201",11u#,min(asc_height#,2x_height#),0);
h':=vround min(asc_height,2x_height); % height of circumflex being inverted
if serifs: italcorr h#*slant+.5hair#-1.75u#;
 adjust_fit(0,0);
 pickup crisp.nib; pos2'(.5[vair,curve],90); top y2'r=h;
 pos2(.5[vair,curve],90); x2=.5w;
 x1=w-x3=good.x 2.25u; top y1=top y3=h; y1-y2=.5(y2'-x_height);
 pos1(hair,angle(z2-z1)+90); pos3(hair,angle(z3-z2)+90);
 filldraw stroke z1e--z2e--z3e;  % diagonals
else: italcorr h#*slant-.5stem#+.5vair#-.75u#;
 adjust_fit(0,0);
 pickup fine.nib; pos1(vair,0); pos3(vair,0); x1=w-x3;
 pos2(stem,0); bot y2=vround(1/12[x_height,h']+o); x2=.5w;
 top y1=top y3=h+o; lft x1l=hround(rt x2r-3.25u-.5vair);
 z0=whatever[z1r,z2r]=whatever[z2l,z3l];
 y4l=y4r=y2; x4l=good.x .2[x2l,x2]; x4r=w-x4l;
 filldraw z4l--z1l--z1r--z0--z3l--z3r--z4r--cycle; fi  % diagonals
penlabels(0,1,2,3,4); endchar;

ecchar"Double tick mark (inch sign)"; % from accent (hungarian long umlaut)
beginchar(oct"202",9u#,min(asc_height#,2x_height#),0);
italcorr h#*slant-u#;
adjust_fit(0,0);
x3-x1=x4-x2=hround 3u; y3=y1; y4=y2;
if serifs: pickup crisp.nib; x3+.5stem=hround(w-1.5u); x2=2.5u;
 y1+.5stem=h; y2=max(2/3[h,x_height],x_height+o+hair);
 numeric theta; theta=angle(z2-z1)+90;
 pos1(stem,theta); pos2(hair,theta);
 pos3(stem,theta); pos4(hair,theta);
 filldraw circ_stroke z1e--z2e;  % left diagonal
 filldraw circ_stroke z3e--z4e;  % right diagonal
else: pickup fine.nib; pos1(stem,0); pos2(vair,0);
 pos3(stem,0); pos4(vair,0);
 rt x3r=hround(w-1.5u); lft x4l=hround(.5w+u-.5vair);
 top y1=h; bot y2=vround 2/3[h,x_height];
 filldraw stroke z1e--z2e;  % left diagonal
 filldraw stroke z3e--z4e; fi  % right diagonal
penlabels(1,2,3,4); endchar;

ecchar"Double backwards tick mark"; % jk
beginchar(oct"203",9u#,min(asc_height#,2x_height#),0);
adjust_fit(0,0);
x3-x1=x4-x2=hround 3u; y3=y1; y4=y2;
if serifs: pickup crisp.nib; x1-.5stem=hround 1.5u; x2=3.5u;
 y1+.5stem=h; y2=max(2/3[h,x_height],x_height+o+hair);
 numeric theta; theta=angle(z2-z1)+90;
 pos1(stem,theta); pos2(hair,theta);
 pos3(stem,theta); pos4(hair,theta);
 filldraw circ_stroke z1e--z2e;  % left diagonal
 filldraw circ_stroke z3e--z4e;  % right diagonal
else: pickup fine.nib; pos1(stem,0); pos2(vair,0);
 pos3(stem,0); pos4(vair,0);
 lft x1l=hround 1.5u; rt x2r=hround(.5w-u+.5vair);
 top y1=h; bot y2=vround 2/3[h,x_height];
 filldraw stroke z1e--z2e;  % left diagonal
 filldraw stroke z3e--z4e; fi  % right diagonal
penlabels(1,2,3,4); endchar;


ecchar "Dagger mark"; % from mathsy
beginchar(oct"204",8u#,asc_height#,desc_depth#);
adjust_fit(0,0); pickup fine.nib;
pos1(stem,0); pos2(thin_join,0); pos3(stem,0); pos4(hair,0);
pos5(stem,90); pos2'(thin_join,90); pos6(stem,90); z2'=z2;
x1=x2=x3=x4; x1-.5stem=hround(.5w-.5stem); center_on(x1);
x5-.5stem=hround u; x6=w-x5;
y1+.5stem=h+oo; y2=y5=y6; y3=.57y2; bot y4=-d-o;
y5+.5stem=floor(x_height+.5stem);
filldraw circ_stroke z1e{down}..z2e{down}..z3e{down}..z4e;  % stem
filldraw circ_stroke z5e{right}..{right}z2'e;  % left bulb
filldraw circ_stroke z6e{left}..{left}z2'e;  % right bulb
penlabels(1,2,3,4,5,6); endchar;

ecchar "Double dagger mark"; % from mathsy
beginchar(oct"205",8u#,asc_height#,desc_depth#);
adjust_fit(0,0); pickup fine.nib;
pos1(stem,0); pos2(thin_join,0); pos3(stem,0);
pos4(stem,90); pos2'(thin_join,90); pos5(stem,90); z2'=z2;
x1=x2=x3; x1-.5stem=hround(.5w-.5stem); center_on(x1);
x4-.5stem=hround u; x5=w-x4;
y1+.5stem=h+oo; y2=y4=y5=.5[y1,y3]; y3-.5stem=ceiling(.5[-d,h]);
filldraw circ_stroke z1e{down}..{down}z2e;  % top stem
filldraw circ_stroke z3e{up}..{up}z2e;    % upper middle stem
filldraw circ_stroke z4e{right}..{right}z2'e;  % top left bulb
filldraw circ_stroke z5e{left}..{left}z2'e;  % top right bulb
pos6(stem,0); pos7(thin_join,0); pos8(stem,0);
pos9(stem,90); pos7'(thin_join,90); pos0(stem,90); z7'=z7;
x6=x7=x8=x1; x9=x4; x0=x5;
y6=y3-stem-1; y7=y9=y0=.5[y6,y8]; y8-.5stem=-d-oo;
filldraw circ_stroke z6e{down}..{down}z7e;  % lower middle stem
filldraw circ_stroke z8e{up}..{up}z7e;    % bottom stem
filldraw circ_stroke z9e{right}..{right}z7'e;  % bottom left bulb
filldraw circ_stroke z0e{left}..{left}z7'e;  % bottom right bulb
penlabels(1,2,3,4,5,6,7,8,9,0); endchar;

ecchar "Double vertical line (norm or cardinality)"; % from mathsy
% Change (jk): Made the two lines as close as in \P
beginchar(oct"206",9u#,body_height#,paren_depth#);
adjust_fit(0,0); pickup rule.nib;
x1=x2; top y1=h; .5[y1,y2]=math_axis;
x3=x4=w-x1; y3=y1; y4=y2;
x3-x1=ceiling(rule_thickness+1.25u);
draw z1--z2; draw z3--z4;  % stems
labels(1,2,3,4); endchar;

ecchar "Per mill sign"; % by Emma Pease
beginchar(oct"207",15u#+max(6u#,2fudge*(hair#+stem#)),
  body_height#,body_height#-asc_height#);
italcorr if hefty: .4asc_height#*slant-.5u# else: h#*slant-u# fi;
adjust_fit(0,0); pickup fine.nib;
numeric left_curve,right_curve;
left_curve=hround 5/6[fudged.hair,fudged.stem];
right_curve=max(fine.breadth,hround(fudged.hair if hefty:-2stem_corr fi));
pos1(vair,90); pos2(left_curve,180); pos3(vair,270); pos4(right_curve,360);
top y1r=h; lft x2r=hround u; rt x4r=hround(.5(w-6u)-1.5u);
bot y3r=floor(if monospace: .7 else: .5 fi\\ asc_height);
x1=x3=.5[x2,x4]; y2=y4=.5[y1,y3];
filldraw stroke pulled_super_arc.e(1,2)(superpull)
 & pulled_super_arc.e(2,3)(superpull);  % left half of upper bowl
filldraw stroke super_arc.e(3,4) & super_arc.e(4,1); % right half of upper bowl
%
pos5(vair,90); pos6(left_curve,180); pos7(vair,270); pos8(right_curve,360);
bot y7r=-d; rt x8r=hround(w-7u); lft x6r=hround(.5(w-6u)+1.5u);
top y5r=vround(if monospace: .3 else: .5 fi\\ asc_height);
x5=x7=.5[x6,x8]; y6=y8=.5[y5,y7];
filldraw stroke pulled_super_arc.e(5,6)(superpull)
 & pulled_super_arc.e(6,7)(superpull);  % left half of lower bowl
filldraw stroke super_arc.e(7,8) & super_arc.e(8,5); % right half of lower bowl
%
pos13(vair,90); pos14(left_curve,180); pos15(vair,270); 
pos16(right_curve,360);
bot y15r=-d; rt x16r=hround(w-u); lft x14r=hround(.5(w-6u)+1.5u+6u);
top y13r=vround(if monospace: .3 else: .5 fi\\ asc_height);
x13=x15=.5[x14,x16]; y14=y16=.5[y13,y15];
filldraw stroke pulled_super_arc.e(13,14)(superpull)
 & pulled_super_arc.e(14,15)(superpull);  % left half of lower bowl
filldraw stroke super_arc.e(15,16) & super_arc.e(16,13); % right half of lower bowl
%
pickup rule.nib; top y9=h; bot y10=-d;
if hefty: x9=good.x(x5-eps); x10=good.x(x1+eps);
 draw z9--z10;  % diagonal
else: rt x9=hround(w-6u-2.5u); lft x10=hround 2.5u; draw z9--z10;  % diagonal
 pickup fine.nib; pos9(rule_thickness,angle(z9-z10)+90);
 pos11(vair,angle(z1r-z4r)-90); pos12(vair,angle(z9-z10)+90);
 path p; p=super_arc.r(1,4); z11r=point 2/3 of p; z12r=z9r;
 filldraw stroke z11e{direction 2/3 of p}...{z9-z10}z12e; fi  % link
penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); endchar;

ecchar "Bullet"; % from mathsy
beginchar(oct"210",9u#,v_center(7u#));
adjust_fit(0,0); pickup rule.nib; autorounded;
if .5w <> good.x .5w: change_width; fi
lft x6=hround u; x2=w-x6; top y8=h; y2=math_axis; circle_points;
filldraw z8{right}...z1{z2-z8}...z2{down}...z3{z4-z2}...z4{left}
  ...z5{z6-z4}...z6{up}...z7{z8-z6}...cycle;  % circle and interior
labels(1,2,3,4,5,6,7,8); endchar;

ecchar"Centigrade sign";
if serifs: beginchar(oct"211",13u#,cap_height#,0);
 italcorr cap_height#*slant-.5u#;
 adjust_fit(4u#,0);
 pickup fine.nib; pos1(cap_hair,0); pos2(cap_band,90);
 pos3(cap_curve,180); pos4(cap_band,270); pos5(hair,360);
 rt x1r=rt x5r=hround(w-u); lft x3r=hround u; x2=x4=.55[x3,x1];
 top y2r=h+o; bot y4r=-o; y3=.5[y2,y4];
 bot y1=min(vround max(.6h,x_height-.5vair),bot y2l-eps);
 y5=max(good.y .95(h-y1),y4l+eps);
 (x2l',y2l)=whatever[z2r,z1l]; x2l:=min(x2l',x2l+.5u);
 (x4l',y4l)=whatever[z4r,z5l]; x4l:=min(x4l',x4l+.5u);
 filldraw stroke z1e{x2-x1,10(y2-y1)}
  ...pulled_arc.e(2,3) & pulled_arc.e(3,4)...{up}z5e; % arc
 pos6(.3[fine.breadth,cap_hair],0); x6r=x1r; top y6=h+o;
 x1r-x1'=2cap_curve-fine; y1'=y1;
 path upper_arc; upper_arc=z1{x2-x1,10(y2-y1)}..z2{left};
 numeric t; t=xpart(upper_arc intersectiontimes (z6l--z1'));
 filldraw z1r--z6r--z6l--subpath(t,0) of upper_arc--cycle; % barb
else: beginchar(oct"211",11.5u#,cap_height#,0);
 italcorr cap_height#*slant-.5u#;
 adjust_fit(4u#,0);
 pickup fine.nib; pos1(1.2flare,80); pos2(slab,90);
 pos3(cap_curve,180); pos4(slab,270); pos5(flare,275);
 rt x1r=hround(w-1.1u); x2=x4=.5w+1.25u;
 lft x3r=hround max(u,2u-.5cap_curve); rt x5r=hround(w-.9u);
 top y1r=vround .95h+o; top y2r=h+o; y3=.5h;
 bot y4r=-o; bot y5r=vround .08h-o; y5l:=good.y y5l; x5l:=good.x x5l;
 filldraw stroke rterm.e(2,1,right,.9,4) & super_arc.e(2,3)
  & super_arc.e(3,4) & term.e(4,5,right,.8,4); fi % arc and terminals
penlabels(1,1',2,3,4,5,6);
clearxy;
pickup rule.nib; autorounded;
lft x6=-4u; rt x2=0; top y8=h; y8-y2=x2-x8;
circle_points; draw_circle;  % circle
labels(1,2,3,4,5,6,7,8);
math_fit(-.3cap_height#*slant-.5u#,.5ic#);
endchar;

ecchar "Oldstyle dollar sign"; % based on romanp (cm)
beginchar(oct"212",11u#,body_height#,body_height#-asc_height#);
italcorr fig_height#*slant-.5u#; % same as for digits
adjust_fit(0,0);
numeric theta; theta=90-angle(50u,asc_height); slope:=-asc_height/50u;
pickup fine.nib; pos2(slab,-90);
pos0(cap_stem,theta); pos7(slab,-90);
x2=x0=x7=.5w; top y2l=asc_height+oo; bot y7r=-oo;
y0=.52asc_height; lft x3l=hround u; rt x6r=hround(w-u);
x3r-x3l=x6r-x6l=hround .35[slab,cap_stem]-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,0); pos8(hair,180);
 pos10(flare,0); pos9(flare,180);
 rt x1r=hround(w-u); lft x8r=hround u; y1=.5[y0,y2]; y8=.5[y0,y7];
 {{less_tense; pos2'(slab,90); z2'=z2; bulb(2',1,10);  % upper arc and bulb
 bulb(7,8,9)}};  % lower arc and bulb
else: pos1(.6[slab,flare],-100); pos8(flare,-100);
 rt x1l=hround(w-1.3u); lft x8r=hround .8u;
 top y1l=vround .92asc_height+oo; bot y8r=vround .1asc_height-oo;
 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
pickup crisp.nib; pos12(bar,0); pos11(bar,0); pos13(bar,0); pos14(bar,0);
x11=x12; x13=x14=w-x11; x13-x11=ceiling(rule_thickness+1.25u); 
top y12=top y14=h; bot y11=bot y13=-d;
filldraw stroke z12e--z11e;  % left vertical crossbar
filldraw stroke z14e--z13e;  %right  vertical crossbar
penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14); endchar;

ecchar "Oldstyle cent sign"; % jk, based on cm `c'
beginchar(oct"213",9u#,x_height#+.5desc_depth#,.5desc_depth#);
italcorr x_height#*slant-.2u#;
adjust_fit(0,0);
pickup fine.nib; pos2(vair',90); pos4(vair',270);
x2=x4=.5(w+u); top y2r=vround(x_height+1.5oo); bot y4r=-oo;
pos3(curve,180); lft x3r=hround max(.6u,1.35u-.5curve); y3=.5x_height;
if serifs: pos1(hair,0); pos0(flare,0);
 y1=min(bar_height+.5flare+2vair'+2,.9[bar_height,x_height]-.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
pickup crisp.nib; 
x7=x3; x6=w-x7; y6=h; y7=-d;
numeric theta; theta=angle(z7-z6)-90;
pos6(vair,theta); pos7(vair,theta);
filldraw stroke z6e--z7e; % diagonal
penlabels(0,1,2,3,4,5,6,7); endchar;

iff variant_g: % I use this as marker for italic fonts
ecchar "Italic florin sign (italic letter f)"; % from itall (cm)
beginchar(oct"214",max(1.5u#,stem#)+max(3.5u#,2flare#),
  asc_height#,desc_depth#);
italcorr asc_height#*slant+.75u#;
adjust_fit(if monospace:u#,u# else: 0,0 fi); pickup fine.nib;
numeric theta; z88=(.5w-.5u,h); z89=(.5w+.5u,-d); theta=angle(z88-z89);
pos0(flare,0); pos1(hair,0); pos2(vair,90);
pos3(.5[hair,stem],180); pos4(stem,theta+90);
pos5(stem,theta-90); pos6(.5[hair,stem],0);
pos7(vair,-90); pos8(hair,-180); pos9(flare,-180);
rt x1r=hround(w+.25u); lft x8r=hround-.35u; x2=.6[x1,x4]; x7=.6[x8,x5];
y9-.5flare=vround -.85d; y2-y0=y9-y7; top y2r=h+oo; bot y7r=-d-oo;
y4=.25[x_height,h]; y5=.5[-d,y4];
z4=whatever[z88,z89]; z5=whatever[z88,z89];
x3=.8[x2+x4-x88,x88]; x6=.8[x7+x5-x89,x89]; y3=.8[y4,y2]; y6=.8[y5,y7];
bulb(2,1,0); bulb(7,8,9);  % bulbs
filldraw stroke z2e{left}...z3e...{z89-z88}z4e;  % upper arc
filldraw z4r--z5l--z5r--z4l--cycle;  % stem
filldraw stroke z5e{z89-z88}...z6e...{left}z7e;  % lower arc
pickup crisp.nib; pos20(bar,90); pos21(bar,90);
top y20r=top y21r=x_height;
lft x20=lft x4r-.5stem-u; rt x21=rt x4l+.5stem+1.5u;
filldraw stroke z20e--z21e;  %  crossbar
math_fit(desc_depth#*slant+u#,x_height#*slant);
penlabels(0,1,2,3,4,5,6,7,8,9,20,21,88,89); endchar;


iff not variant_g:
ecchar "Florin sign (The letter f)"; % from romanl (cm)
beginchar(oct"214",5.5u#,asc_height#,0);
italcorr asc_height#*slant+if serifs:flare#-.25u# else: 1.25u# fi;
adjust_fit(stem_shift#,if monospace: .5u# else:-stem_shift# fi);
pickup tiny.nib; pos1(stem',0); lft x1l=hround(2.5u-.5stem');
pickup fine.nib; numeric bulb_diam;
if serifs: bulb_diam=hround .8[stem,flare];
 pos2(bulb_diam,0); y2+.5bulb_diam=.9[x_height,h+oo];
 if monospace: rt x2r=hround(w-.5u)+1 else: lft x2l=hround(w-.75u+.5) fi;
else: pos2(5/7[vair,flare],90); top y2r=h;
 rt x2=hround(if monospace:w-.5u else:w+.75u fi); fi
f_stroke(1,2,a,b,c,jut,if not monospace:1.25fi\\ jut); % stem, terminal, serif
pickup crisp.nib; top y3r=top y4r=x_height; lft x3=hround .5u-1;
pos3(bar,90); pos4(bar,90);
rt x4=hround(w-if monospace:.75u+1 else:1/3u fi);
filldraw stroke z3e--z4e;  % bar
penlabels(1,2,3,4); endchar;

ecchar"Colon sign or Cedi sign"; % Panamese or Ghanese currency
if serifs: beginchar(oct"215",13u#,body_height#,body_height#-asc_height#); 
 italcorr cap_height#*slant-.5u#;
 adjust_fit(0,0);
 pickup fine.nib; pos1(cap_hair,0); pos2(cap_band,90);
 pos3(cap_curve,180); pos4(cap_band,270); pos5(hair,360);
 rt x1r=rt x5r=hround(w-u); lft x3r=hround u; x2=x4=.55[x3,x1];
 numeric hh; hh=cap_height;
 top y2r=hh+o; bot y4r=-o; y3=.5[y2,y4];
 bot y1=min(vround max(.6hh,x_height-.5vair),bot y2l-eps);
 y5=max(good.y .95(hh-y1),y4l+eps);
 (x2l',y2l)=whatever[z2r,z1l]; x2l:=min(x2l',x2l+.5u);
 (x4l',y4l)=whatever[z4r,z5l]; x4l:=min(x4l',x4l+.5u);
 filldraw stroke z1e{x2-x1,10(y2-y1)}
  ...pulled_arc.e(2,3) & pulled_arc.e(3,4)...{up}z5e; % arc
 pos6(.3[fine.breadth,cap_hair],0); x6r=x1r; top y6=hh+o;
 x1r-x1'=2cap_curve-fine; y1'=y1;
 path upper_arc; upper_arc=z1{x2-x1,10(y2-y1)}..z2{left};
 numeric t; t=xpart(upper_arc intersectiontimes (z6l--z1'));
 filldraw z1r--z6r--z6l--subpath(t,0) of upper_arc--cycle; % barb
 pickup crisp.nib; pos12(bar,0); pos11(bar,0);
 lft x12l=lft x11l=hround(x2-.5bar); top y12=h; bot y11=-d;
 filldraw stroke z12e--z11e;  % vertical crossbar
else: beginchar(oct"215",11.5u#,body_height#,body_height#-asc_height#);
 italcorr cap_height#*slant-.5u#;
 adjust_fit(0,0);
 pickup fine.nib; pos1(1.2flare,80); pos2(slab,90);
 pos3(cap_curve,180); pos4(slab,270); pos5(flare,275);
 rt x1r=hround(w-1.1u); x2=x4=.5w+1.25u;
 lft x3r=hround max(u,2u-.5cap_curve); rt x5r=hround(w-.9u);
 numeric hh; hh=cap_height;
 top y1r=vround .95hh+o; top y2r=hh+o; y3=.5hh;
 bot y4r=-o; bot y5r=vround .08hh-o; y5l:=good.y y5l; x5l:=good.x x5l;
 filldraw stroke rterm.e(2,1,right,.9,4) & super_arc.e(2,3)
  & super_arc.e(3,4) & term.e(4,5,right,.8,4); % arc and terminals
 pickup crisp.nib; pos12(bar,0); pos11(bar,0);
 lft x12l=lft x11l=hround(x2-.5bar); top y12=h; bot y11=-d;
 filldraw stroke z12e--z11e;  % vertical crossbar
fi
math_fit(-.3cap_height#*slant-.5u#,.5ic#);
penlabels(1,1',2,3,4,5,6,11,12); endchar;

ecchar"Won sign"; % Korean currency
beginchar(oct"216",18u#,cap_height#,0);
italcorr cap_height#*slant+.25u#;
adjust_fit(cap_serif_fit#,cap_serif_fit#);
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 y45<upper_notch:(x45,upper_notch)+.5left{up}
   --(x45,upper_notch)+.5right{down} else: z45&z45 fi
 ...{z6-z5}diag_end(5l,6l,1,1,7r,8r)--diag_end(7r,8r,1,1,8l,7l){z7-z8}
 ...if y67>cap_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)
  --.5[z5l,z6l]--.5[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
pickup extra_rule.nib;  
x9=x11=x1l; x10=x12=x8r; y9=y10; 
top y9=bar_height; y11=y12; draw z9--z10; 
y11-y9=spread; draw z11--z12; % crossing bars
math_fit(.75u#-cap_height#*slant,ic#-2.5u#);
penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,23,45,67); endchar;

ecchar"Naira sign"; % Nigerian currency
beginchar(oct"217",13u#+width_adj#,cap_height#,0);
italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+
min(.5cap_stem#,u#);
adjust_fit(cap_serif_fit#+.25u#,cap_serif_fit#+.25u#);
numeric thin_stem; thin_stem=hround(fudged.hair+stem_corr);
pickup tiny.nib; pos1(thin_stem,0); pos2(thin_stem,0);
pos3(thin_stem,0); pos4(thin_stem,0);
pickup tiny.nib; top y1=top y3=h; bot y2=bot y4=0;
x1=x2; x3=x4; x1l=w-x3r;
rt x3r=hround min(w-2u,w-3u+.5fudged.cap_stem);
filldraw stroke z1e--z2e; % left stem
filldraw stroke z3e--z4e; % right stem
if hefty: penpos5(fudged.cap_stem,0); penpos6(fudged.cap_stem,0);
 x5l=x1; x6r=x4; y5=h; y6=0;
 numeric upper_notch,lower_notch;
 upper_notch=h-cap_notch_cut; lower_notch=cap_notch_cut;
 x1'=rt x1r; z1'=whatever[z5l,z6l]; x4'=lft x4l; z4'=whatever[z5r,z6r];
 fill z5l..
  if y1'<upper_notch: {right}(x1'+1,upper_notch){down}... fi
  {z6-z5}diag_in(5l,6l,1,6r)--z6r..
  if y4'>lower_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
pickup extra_rule.nib;  
x8=x10=0; x9=x11=w; y10=y11; 
top y8=bar_height; y8=y9; draw z8--z9; 
y10-y8=spread; draw z10--z11; % crossing bars
math_fit(0,max(.5ic#-.5u#,0));
penlabels(1,1',2,3,4,4',5,6,7,8,9,10,11); endchar;

ecchar"Guarani sign"; % Currency of Paraguay
if serifs: beginchar(oct"220",14u#,body_height#,body_height#-asc_height#);
 italcorr cap_height#*slant-1.5u#-.5cap_serif_fit#;
 adjust_fit(0,.5cap_serif_fit#);
 numeric hh; hh=cap_height;
 pickup tiny.nib; pos0(cap_stem,0); pos7(cap_stem,0);
 rt x0r=hround(w-2u); y0=good.y(.1[bar_height,x_height]+1); x7=x0;
 pickup fine.nib;
 if hefty: bot y7=0; pos5(cap_stem,0); x5=x0; top y5=tiny.top y0;
 else: pos5(cap_hair,0); pos8(cap_stem,0);
  y7=.5bar_height; z5l=z8l; z8=z7; x9=x8r; bot y9=0;
  filldraw z8l{down}..{4(x9-x8),y9-y8}z9--z8r--cycle; fi % spur
 pos1(cap_hair,0); pos2(cap_band,90);
 pos3(cap_curve,180); pos4(cap_band,270);
 rt x1r=hround(w-2u); lft x3r=hround u; x2=x4=.55[x3,x1];
 top y2r=hh+o; bot y4r=-o; y3=.5[y2,y4];
 bot y1=min(vround max(.6hh,x_height-.5vair),bot y2l-eps);
 (x2l',y2l)=whatever[z2r,z1l]; x2l:=min(x2l',x2l+.5u);
 (x4l',y4l)=whatever[z4r,z5l]; x4l:=min(x4l',x4l+.5u);
 filldraw stroke z1e{x2-x1,10(y2-y1)}
  ...pulled_arc.e(2,3) & pulled_arc.e(3,4)...z5e{up}; % arc
 pos6(.3[fine.breadth,cap_hair],0); x6r=x1r; top y6=hh+o;
 x1r-x1'=2cap_curve-fine; y1'=y1;
 path upper_arc; upper_arc=z1{x2-x1,10(y2-y1)}..z2{left};
 numeric t; t=xpart(upper_arc intersectiontimes (z6l--z1'));
 filldraw z1r--z6r--z6l--subpath(t,0) of upper_arc--cycle; % barb
 pickup tiny.nib; filldraw stroke z0e--z7e;  % stem
 dish_serif(0,7,a,1/3,max(cap_jut,2.25u),b,1/3,1.25u);  % serif
 pickup crisp.nib; pos12(bar,0); pos11(bar,0);
 lft x12l=lft x11l=hround(x2-.5bar); top y12=h; bot y11=-d;
 filldraw stroke z12e--z11e;  % vertical crossbar
 math_fit(-.3cap_height#*slant-.5u#,ic#);
else: beginchar(oct"220",14u#,body_height#,body_height#-asc_height#);
 italcorr cap_height#*slant-.5u#;
 adjust_fit(0,0);
 numeric hh; hh=cap_height;
 pickup fine.nib; pos1(1.2flare,80); pos2(slab,90);
 pos3(cap_curve,180); pos4(slab,270); pos5(flare,270);
 rt x1r=hround(w-1.35u); x2=x4=.5w+u;
 lft x3r=hround max(u,2u-.5cap_curve); rt x5l=hround(w-1.2u);
 top y1r=vround .93hh+o; top y2r=hh+o; y3=.5hh;
 bot y4r=-o; bot y5r=vround .07hh-o;
 filldraw stroke rterm.e(2,1,right,.9,4)&super_arc.e(2,3)
  & super_arc.e(3,4) & term.e(4,5,right,1,4); % arc and terminals
 pos0(stem,0); pos7(stem,0);
 z7r=z5r; x0=x7; top y0=1+vround .35[bar_height,x_height];
 filldraw stroke z0e--z7e;  % stem
 pos8(cap_bar,90); pos9(cap_bar,90);
 z0r=z9r; y8=y9; lft x8=hround x4;
 filldraw stroke z8e--z9e;  % bar
 pickup crisp.nib; pos12(bar,0); pos11(bar,0);
 lft x12l=lft x11l=hround(x2-.5bar); top y12=h; bot y11=-d;
 filldraw stroke z12e--z11e;  % vertical crossbar
 math_fit(-.3cap_height#*slant-.5u#,.5ic#); fi
penlabels(0,1,1',2,3,4,5,6,7,8,9,11,12); endchar;

ecchar"Peso sign";
beginchar(oct"221",12u#,cap_height#,0);
italcorr .75cap_height#*slant-.5u#;
adjust_fit(cap_serif_fit#+.25u#,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
pickup extra_rule.nib;
x8=0; x9=.5[x1r,x5r]; top y8=bar_height; y8=y9; draw z8--z9;
math_fit(0,ic#-2.5u#); penlabels(0,1,2,3,4,5,6,7); labels(8,9);
endchar;

ecchar "Lira sign"; % 
compute_spread(.35x_height#,.45x_height#);
beginchar(oct"222",12u#,asc_height#,0);
adjust_fit(0,.75asc_height#*slant-.5u#); pickup fine.nib;
pos0(flare,0); pos1(hair,0); pos2(vair,90); pos3(stem,180);
pos4(stem,180); pos4'(stem,0); pos5(vair,-90); z4'=z4;
x2=2/3w-.5u; rt x3l=rt x4l=hround(.5w-u+.5stem); x5=2.5u;
y1=y3=.75h; top y2=h+oo; y4=.25h; bot y5r=-oo;
rt x1r=hround(w-1.5u); bulb(2,1,0);  % bulb
filldraw stroke pulled_arc.e(2,3)..z4e;  % stem
numeric light_stem; light_stem=2/3[vair,vstem];
pos6(.5[hair,light_stem],-180); pos7(light_stem,-300);
pos8(light_stem,-300); pos9(hair,-180);
lft x6r=hround u; x7=3u; x8=w-3.5u; rt x9l=hround(w-u);
y6=.4[y5,y7]; top y7r=vround .2h; bot y8l=-oo; y9=good.y .2h;
filldraw stroke pulled_arc.e(4',5)...z6e{up}...z7e{right}
 ..{right}z8e...{up}z9e;  % loop and arm
pickup extra_rule.nib;
x10=3u; x11=w-4.5u; x12=3u; x13=w-4.5u;
top y12=bar_height;
y11=y10; y13=y12; y10-y12=spread; 
draw z10--z11;  % upper bar
draw z12--z13;  % lower bar
penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13); endchar;

ecchar"Recipe sign";
beginchar(oct"223",if serifs: 12u#+.5max(2u#,cap_curve#)
 else:12.5u#-.5width_adj# fi,cap_height#,0);
italcorr .75cap_height#*slant- if serifs: 1.75 else: .5 fi\\ u#;
adjust_fit(cap_serif_fit#,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,.5cap_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
x1:=x8; 
put_cross(.5cap_stem+if serifs: .9max(limit_dist,cap_jut) else: .8u fi,
 .5cap_stem+if serifs: 3u else: 4u fi);
math_fit(0,.75ic#); penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar;

iff not variant_g: % not italic
ecchar"Interrobang";
beginchar(oct"224",8.5u#,asc_height#,0);
italcorr .8asc_height#*slant;
adjust_fit(0,0);
pickup tiny.nib; pos7(dot_size,0); pos8(dot_size,90);
lft x7l=hround(.5w-.25u-.5dot_size); bot y8l=0; z7=z8; % dot(7,8);  % dot
numeric bot_width;
bot_width=if hefty:max(hround .8dot_size,fine.breadth) else: hair fi;
pickup fine.nib; pos2(vair,90); pos3(curve,0);
pos4(vair,-90); pos5(bot_width,0); pos6(bot_width,0);
x2=x4=x5=x6=x7; rt x3r=hround(w-u); bot y6=1+.25[top y8r,x_height];
top y2r=hround .9h+oo; y3=.75[y6,y2]; y4=.5[y6,y2]; y5=.1[y6,y2];
{{interim superness:=more_super;
filldraw stroke pulled_super_arc.e(2,3)(superpull)
 & subpath (0,1) of super_arc.e(3,4) .. z5e---z6e\\}};  % arc and stem
if serifs: pos1(hair,180); pos0(flare,180);
 lft x1r=hround u; y1=y3; bulb(2,1,0);  % bulb
else: pos1(Vround 5/7[vair,flare],110);
 lft x1r=hround u; top y1r=vround .9[y6,top y2r];
 filldraw stroke term.e(2,1,left,1,4); fi  % terminal
penlabels(0,1,2,3,4,5,6,7,8);
clearxy;
pickup tiny.nib; pos3(dot_size,0); pos4(dot_size,90);
lft x3l=hround(.5w-.5dot_size); bot y4l=0; z3=z4; dot(3,4);  % dot
numeric bot_width;
bot_width=if hefty:max(hround .8dot_size,fine.breadth) else: hair fi;
pickup fine.nib; pos1(dot_size,0); pos2(bot_width,0);
x1=x2=x3; bot y2=.25[top y4r,x_height]+1;
if square_dots: top y1=h;
 filldraw stroke z1e--z2e;  % stem
else: top z0=(x1,h+o); y1+.5dot_size=h+o;
 filldraw z1r...z0...z1l---z2l--z2r---cycle; fi  % stem and bulb
penlabels(0,1,2,3,4); endchar;

iff not variant_g: % not italic
ecchar"Gnaborretni";
beginchar(oct"225",8.5u#,asc_height#-desc_depth#,desc_depth#);
adjust_fit(0,0);
pickup tiny.nib; pos7(dot_size,0); pos8(dot_size,90);
lft x7l=hround(.5w-.25u-.5dot_size); top y8r=h; z7=z8; % dot(7,8);  % dot
numeric top_width;
top_width=if hefty:max(hround .8dot_size,fine.breadth) else: hair fi;
pickup fine.nib; pos2(vair,270); pos3(curve,180);
pos4(vair,90); pos5(top_width,180); pos6(top_width,180);
x2=x4=x5=x6=x7; lft x3r=hround u; top y6=.25[bot y8l,h-x_height]-1;
bot y2r=hround .1asc_height-d-oo; y3=.75[y6,y2]; y4=.5[y6,y2]; y5=.1[y6,y2];
{{interim superness:=more_super;
filldraw stroke pulled_super_arc.e(2,3)(superpull)
 & subpath (0,1) of super_arc.e(3,4) .. z5e---z6e\\}};  % arc and stem
if serifs: pos1(hair,0); pos0(flare,0);
 rt x1r=hround(w-u); y1=y3; bulb(2,1,0);  % bulb
else: pos1(Vround 5/7[vair,flare],-70);
 rt x1r=hround(w-u); bot y1r=vround .9[y6,bot y2r];
 filldraw stroke term.e(2,1,right,1,4); fi  % terminal
penlabels(0,1,2,3,4,5,6,7,8);
clearxy;
pickup tiny.nib; pos3(dot_size,0); pos4(dot_size,90);
lft x3l=hround(.5w-.5dot_size); top y4r=h; z3=z4; dot(3,4);  % dot
numeric top_width;
top_width=if hefty:max(hround .8dot_size,fine.breadth) else: hair fi;
pickup fine.nib; pos1(dot_size,0); pos2(top_width,0);
x1=x2=x3; top y2=.25[bot y4l,h-x_height]-1;
if square_dots: bot y1=-d;
 filldraw stroke z1e--z2e;  % stem
else: bot z0=(x1,-d-o); y1-.5dot_size=-d-o;
 filldraw z1l...z0...z1r---z2r--z2l---cycle; fi  % stem and bulb
penlabels(0,1,2,3,4); endchar;

iff variant_g: % italic
ecchar"Interrobang";
beginchar(oct"224",9u#,asc_height#,0);
italcorr asc_height#*slant-u#;
adjust_fit(0,0);
adjust_fit(0,0); pickup tiny.nib; pos10(dot_size,0); pos11(dot_size,90);
lft x10l=hround(.5w-.5dot_size); bot y11l=0; z10=z11; % dot(10,11);  % dot
pickup fine.nib; pos1(flare,180); pos2(hair,180); pos3(vair,90);
lft x1r=hround u; x3=.5w;
y1-.5flare=x_height; top y3r=hround .9h+o; bulb(3,2,1); % bulb
pos8(vair,-90); x8=.5w; bot y8r=.25[top y11r,x_height]+1;
numeric theta; theta=90+angle(10u,y3-y8); slope:=(y3-y8)/10u;
pos3'(vair,-90); z3'=z3; pos0(vstem,theta); x0=x3; y0=1/3[y8,y3];
rt x4l=hround(w-1.5u); lft x7r=hround 1/3w;
x4l-x4r=x7l-x7r=hround .5[vair,vstem]-fine;
ellipse_set(3'l,4l,5l,0l); ellipse_set(3'r,4r,5r,0r); y4=y4r;
ellipse_set(8l,7l,6l,0l); ellipse_set(8r,7r,6r,0r); y7=y7r;
pos9(hair,0); rt x9r=hround(2/3w+.5hair); y9=good.y .5[y8,y0];
filldraw stroke super_arc.e(3',4) & z4e{down}
 ..z5e---z6e..z7e{down} & super_arc.e(7,8)...{up}z9e;  % main stroke
penlabels(0,1,2,3,4,5,6,7,8,9,10,11);
clearxy;
pickup tiny.nib; pos3(dot_size,0); pos4(dot_size,90);
lft x3l=hround(.5w-.5dot_size); bot y4l=0; z3=z4; dot(3,4);  % dot
numeric bot_width;
bot_width=if hefty:max(hround .8dot_size,fine.breadth) else: hair fi;
pickup fine.nib; pos1(dot_size,0); pos2(bot_width,0);
x1=x2=x3; bot y2=.25[top y4r,x_height]+1;
if square_dots: top y1=h;
 filldraw stroke z1e--z2e;  % stem
else: top z0=(x1,h+o); y1+.5dot_size=h+o;
 filldraw z1r...z0...z1l---z2l--z2r---cycle; fi  % stem and bulb
penlabels(0,1,2,3,4); endchar;

iff variant_g: % italic
ecchar"Gnaborretni";
beginchar(oct"225",9u#,asc_height#-desc_depth#,desc_depth#);
adjust_fit(0,0);
pickup tiny.nib; pos10(dot_size,0); pos11(dot_size,90);
lft x10l=hround(.5w-.5dot_size); top y11r=h; z10=z11; % dot(10,11);  % dot
pickup fine.nib; pos1(flare,0); pos2(hair,0); pos3(vair,-90);
rt x1r=hround(w-u); x3=.5w; y1+.5flare=asc_height-x_height-d;
bot y3r=hround .1asc_height-d-o; bulb(3,2,1); % bulb
pos8(vair,90); x8=.5w; top y8r=.25[bot y11l,y1+.5flare]-1;
numeric theta; theta=angle(10u,y8-y3)-90; slope:=(y8-y3)/10u;
pos3'(vair,90); z3'=z3; pos0(vstem,theta); x0=x3; y0=1/3[y8,y3];
lft x4l=hround 1.5u; rt x7r=hround 2/3w;
x4r-x4l=x7r-x7l=hround .5[vair,vstem]-fine;
ellipse_set(3'l,4l,5l,0l); ellipse_set(3'r,4r,5r,0r); y4=y4r;
ellipse_set(8l,7l,6l,0l); ellipse_set(8r,7r,6r,0r); y7=y7r;
pos9(hair,180); lft x9r=hround(1/3w-.5hair); y9=good.y .5[y8,y0];
filldraw stroke super_arc.e(3',4) & z4e{up}
 ..z5e---z6e..z7e{up} & super_arc.e(7,8)...{down}z9e;  % main stroke
penlabels(0,1,2,3,4,5,6,7,8,9,10,11);
clearxy;
pickup tiny.nib; pos3(dot_size,0); pos4(dot_size,90);
lft x3l=hround(.5w-.5dot_size); top y4r=h; z3=z4; dot(3,4);  % dot
numeric top_width;
top_width=if hefty:max(hround .8dot_size,fine.breadth) else: hair fi;
pickup fine.nib; pos1(dot_size,0); pos2(top_width,0);
x1=x2=x3; top y2=.25[bot y4l,h-x_height]-1;
if square_dots: bot y1=-d;
 filldraw stroke z1e--z2e;  % stem
else: bot z0=(x1,-d-o); y1-.5dot_size=-d-o;
 filldraw z1l...z0...z1r---z2r--z2l---cycle; fi  % stem and bulb
penlabels(0,1,2,3,4); endchar;

iff not variant_g: % not italic
ecchar"Dong sign"; % Vietnamese currency
beginchar(oct"226",10u#+serif_fit#,body_height#,0);
italcorr asc_height#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(0,serif_fit#);
numeric hh; hh=asc_height;
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=hh;
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 if monospace: -hair fi;
lft x5r=hround max(1.35u-.5curve,.6u); y5=.5x_height if monospace: -.5hair fi;
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
%
  pos8(bar,90); pos9(bar,90);
  x8=.5[x4,x5];
  if serifs: x9=x2r+jut; else: x9=w; fi
  if serifs: y8=y9=.5[y.a2-.5slab,y4+.5vair];
  else: y8=y9=.5[x_height,asc_height-serif_drop]; fi
  filldraw stroke z8e--z9e;
currentpicture:=currentpicture shifted (0,body_height-asc_height);
pickup rule.nib;
x10=x5; x11=x9; top y10=0; y10=y11;
draw z10--z11;
penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar;

iff variant_g: %italic
ecchar"Italic Dong sign"; % Vietnamese currency
beginchar(oct"226",9u#,body_height#,0);
italcorr max(1/3x_height#*slant+.5hair#+.5u#,
  h#*slant+.5stem#-2u#) if math_fitting:-.5u# fi;
adjust_fit(0,0); pickup fine.nib;
pos0(hair,0); pos1(vair,90); pos2(curve,180); pos3(vair,270);
x0=x4; x1=x3=.5[x0,x2]; lft x2r=hround(1.5u-.5curve);
x4+.5stem=hround(w-2.5u+.5stem);
top y1r=x_height+oo; bot y3r=-oo; y0=y2=.5[y1,y3];
filldraw stroke super_arc.e(0,1) & pulled_arc.e(1,2)
 & pulled_arc.e(2,3) & super_arc.e(3,0);  % bowl
x5=x0; x7=w; hook_out(5,6,7);  % closing hook
pickup tiny.nib; pos5'(stem,0); pos4(stem,0);
z5'=z5; top y4=h; filldraw stroke z4e--z5'e;  % stem
sloped_serif.l(4,5',a,1/3,jut,serif_drop);  % serif
math_fit(-.3x_height#*slant+.5curve#-u#,ic#);
% the bar
  pos8(bar,90); pos9(bar,90);
  x8=x1; % .5[x1,x4];
  x9=x6;
  y8=y9=.5[y.a2-.5slab,y1+.5vair];
  filldraw stroke z8e--z9e;
currentpicture:=currentpicture shifted (0,body_height-asc_height);
pickup rule.nib;
x10=x2; x11=x9; top y10=0; y10=y11;
draw z10--z11;
penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar;

ecchar"Trademark"; % jk, design based on logo font
beginchar(oct"227",12u#,body_height#,0);
italcorr .7body_height#;
adjust_fit(0,0);
numeric ww, hh; ww=.5w; hh=vround .5body_height;
pickup pencircle xscaled hair yscaled vair;
lft x1=-eps; x2=ww-x1; x3=x4=.5ww;
y1=y2=y3; top y1=hh; bot y4=-o;
draw z1--z2; draw z3--z4;
labels(1,2,3,4); 
clearxy;
x1=x2=hround(ww+u); x4=x5=hround(w-u); x3=hround .5[x1,x4];
y1=y5; y2=y4; bot y1=-o;
top y2=hh+o; y3=vround (y1+.5bar_height);
draw z1--z2--z3--z4--z5;
labels(1,2,3,4,5);
currentpicture:=currentpicture shifted (0,hh);
endchar;

ecchar"Per ten thousand sign"; % Yannis, Unicode Computer Modern
beginchar(oct"230",9u#+max(6u#,2fudge*(hair#+stem#)),
  body_height#,body_height#-asc_height#);
italcorr if hefty: .4asc_height#*slant-.5u# else: h#*slant-u# fi;
adjust_fit(0,
 2*(.5*(9u#+max(6u#,2fudge*(hair#+stem#)))
    -2.5u#+5/6[fudged.hair#,fudged.stem#])); 
pickup fine.nib;
numeric left_curve,right_curve;
left_curve=hround 5/6[fudged.hair,fudged.stem];
right_curve=max(fine.breadth,hround(fudged.hair if hefty:-2stem_corr fi));
pos1(vair,90); pos2(left_curve,180); pos3(vair,270); pos4(right_curve,360);
top y1r=h; lft x2r=hround u; rt x4r=hround(.5w-1.5u);
bot y3r=floor(if monospace: .7 else: .5 fi\\ asc_height);
x1=x3=.5[x2,x4]; y2=y4=.5[y1,y3];
pos5(vair,90); pos6(left_curve,180); pos7(vair,270); pos8(right_curve,360);
bot y7r=-d; rt x8r=hround(w-u); lft x6r=hround(.5w+1.5u);
top y5r=vround(if monospace: .3 else: .5 fi\\ asc_height);
x5=x7=.5[x6,x8]; y6=y8=.5[y5,y7];
filldraw stroke pulled_super_arc.e(5,6)(superpull)
 & pulled_super_arc.e(6,7)(superpull);  % left half of lower bowl
filldraw stroke super_arc.e(7,8) & super_arc.e(8,5); % right half of lower bowl
hihi:=(.5*(9u#+max(6u#,2fudge*(hair#+stem#)))
      -2.5u#+5/6[fudged.hair#,fudged.stem#])
if monospace: *expansion_factor fi *hppp;
picture petit_zero; petit_zero := currentpicture;
pickup rule.nib; top y9=h; bot y10=-d;
if hefty: x9=good.x(x5-eps); x10=good.x(x1+eps);
 draw z9--z10;  % diagonal
else: rt x9=hround(w-2.5u); lft x10=hround 2.5u; draw z9--z10;  % diagonal
 pickup fine.nib; pos9(rule_thickness,angle(z9-z10)+90);
 pos11(vair,angle(z1r-z4r)-90); pos12(vair,angle(z9-z10)+90);
 path p; p=super_arc.r(1,4); z11r=point 2/3 of p; z12r=z9r;
 filldraw stroke z11e{direction 2/3 of p}...{z9-z10}z12e; fi  % link
pickup fine.nib;
filldraw stroke pulled_super_arc.e(1,2)(superpull)
 & pulled_super_arc.e(2,3)(superpull);  % left half of upper bowl
filldraw stroke super_arc.e(3,4) & super_arc.e(4,1); % right half of upper bowl
addto currentpicture also (petit_zero shifted (hihi,0));
addto currentpicture also (petit_zero shifted (2hihi,0));
picture petit_zero; % Release resources allocated to the picture variable
penlabels(1,2,3,4,5,6,7,8,9,10,11,12); endchar;

ecchar "Alternate pilcrow sign"; % one vertical bar only
beginchar(oct"231",8.5u#,asc_height#,desc_depth#);
adjust_fit(0,0); pickup rule.nib; autorounded;
top y1=h; bot y6=-d-eps; y4=y9=y1;
y3=y5=good.y .5[y1,y6];
lft x2=hround u; y2=.5[y1,y3]; rt x9=hround(w-.5u); x4=x5=x6=good.x(x9-1.5u);
x1=x3=min(.5w,x4);
filldraw z4..z1{left}...z2{down}...{right}z5--cycle;  % filled bowl
draw z9--z4--z6;  % left stem and upper serif
if serifs:
 x11=x9; x10-x6=x4-x9;
 bot y10=-d-eps; y10=y11;
 draw z10--z11; % lower serif
fi
labels(1,2,3,4,5,6,9,10,11); endchar;

ecchar"Baht sign"; % currency of Thailand
beginchar(oct"232",12.5u#,body_height#,body_height#-asc_height#);
italcorr .75cap_height#*slant-.5u#;
adjust_fit(cap_serif_fit#,0);
numeric hh; hh=cap_height;
numeric left_stem,right_curve,middle_weight;
left_stem=cap_stem-hround 2stem_corr; middle_weight=.6vair+.5;
pickup tiny.nib; pos1(left_stem,0); pos2(left_stem,0);
lft x1l=lft x2l=hround max(2u,3u-.5left_stem); top y1=hh; bot y2=0;
filldraw stroke z1e--z2e; % stem
penpos3(cap_band,90); penpos4(cap_band,90);
penpos6(middle_weight,-90); penpos7(middle_weight,-90);
penpos8(middle_weight,90); penpos9(middle_weight,90);
penpos5(right_curve-stem_corr,0); penpos10(right_curve,0);
penpos11(cap_band,-90); penpos12(cap_band,-90);
z3r=top z1; y4=y3; y5=.5[y4,y6]; y6=y7; y7l-y8l=vair;
z12r=bot z2; y11=y12; y10=.5[y11,y9]; y8=y9; .5[y7l,y8l]=.52hh;
x4=x6; x9=x11=x4+.5u; x7=x8=x1; x9l:=x4+.25u;
x5r=hround(w-1.5u); x10r=hround(w-u);
if serifs: right_curve=cap_curve-stem_corr; x4=.5[x1,w-1.5u];
else: right_curve=cap_curve-3stem_corr; x4=.5[x1,w-2.5u];
 x4l:=x4l-.5u; x9l:=x9l-.5u; fi
x6l:=x6l-.5u; x11l:=x11l-.5u;
fill stroke z3e..super_arc.e(4,5) & super_arc.e(5,6)..z7e;  % upper lobe
fill stroke z8e..super_arc.e(9,10) & super_arc.e(10,11)..z12e;  % lower lobe
if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut);  % upper serif
 nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi  % lower serif
pickup crisp.nib; pos13(bar,0); pos14(bar,0);
rt x13r=rt x14r=rt x4; top y13=h; bot y14=-d;
filldraw stroke z13e--z14e;  % vertical crossbar
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6,7,8,9,10,11,12); endchar;

ecchar"Numero sign"; % from wncyr
beginchar(oct"233",15u#+width_adj#,cap_height#,0); 
italcorr cap_height#*slant
         -cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); 
adjust_fit(cap_serif_fit# 
  if serifs: +.5(flare#+(cap_stem#-stem#)) fi ,cap_serif_fit#); 
w:=if serifs: 10u else: 11u fi; 
numeric thin_stem; 
thin_stem=hround(fudged.hair+stem_corr); 
pickup tiny.nib; 
pos1(thin_stem,0); pos2(thin_stem,0);
pos3(thin_stem,0); pos4(thin_stem,0); 
top y1=h; 
if serifs: top y3=.79h; bot y2=.21h;
else: top y3=h; bot y2=0; fi 
bot y4=0;
x1=x2; x3=x4; x1l=w-x3r; 
rt x3r=hround min(w-2u,w-3u+.5fudged.cap_stem);
x91=x2-.75flare; bot y91r=-oo; x92=w-x91; 
top y92l=h+oo;
pos91(thin_stem,-90); pos92(thin_stem,-90);
if serifs: 
 filldraw stroke z1e--z2e & pulled_arc.e(2,91); % left stem 
 filldraw stroke z4e--z3e & pulled_arc.e(3,92); % right stem
else:
 filldraw stroke z1e--z2e; filldraw stroke z4e--z3e; % stems 
fi 
if hefty: 
 penpos5(fudged.cap_stem,0); penpos6(fudged.cap_stem,0);
 x5l=x1; x6r=x4; y5=h; y6=0;
 numeric upper_notch,lower_notch; 
 upper_notch=h-cap_notch_cut; 
 lower_notch=cap_notch_cut;
 x1'=rt x1r; z1'=whatever[z5l,z6l]; x4'=lft x4l; 
 z4'=whatever[z5r,z6r]; 
 fill z5l..
 if y1'<upper_notch: {right}(x1'+1,upper_notch){down}... fi 
 {z6-z5}diag_in(5l,6l,1,6r)--z6r..  
 if y4'>lower_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;  % diagonal
fi 
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
fi
pickup tiny.nib; 
if serifs: 
 x93=x2-1.5flare; 
 y93=.75flare; 
 pos95(flare+(cap_stem-stem),-180);
 x94=x3+1.5flare; 
 y94=h-y93;
 pos96(flare+(cap_stem-stem),0);
 pos92'(thin_stem,90);
 z92'=z92; 
 pos93(cap_hair,-180);
 pos94(cap_hair,0);
 bulb(91,93,95); bulb(92',94,96); 
fi 
w:=15u; 
penpos71(vair,90); penpos73(vair',-90); penpos72(.8curve,180); 
penpos74(.8curve,0); x72r=hround max(.5u,1.25u-.4curve)+9.5u; 
x74r=w-x72r+9u; x71=x73=12u; y71r=h-3u+vround 1.5oo; y73r=x_height-3u-oo; 
y72=y74=.5[h,x_height]-3u-vair_corr; y72l:=y74l:=.52[h,x_height]-3u; 
penstroke pulled_arc.e(71,72) & pulled_arc.e(72,73) & pulled_arc.e(73,74) & 
pulled_arc.e(74,71) & cycle; 
x81=max(lft x72r,x73-(lft w-x73)); 
x82=min(rt x74r,lft w); y81=y82=.8x_height-3u;
pos81(bar,90); pos82(bar,90); 
filldraw stroke z81e--z82e;
math_fit(0,max(.5ic#-.5u#,0)); 
penlabels(1,1',2,3,4,4',5,6,7); endchar;

ecchar "Abzueglich sign"; % jk
beginchar(oct"234",9u#,body_height#,0);
italcorr body_height#*slant-.5u#;
adjust_fit(0,0); pickup rule.nib;
rt x1=hround(w-u)+eps; top y1=h+eps;
lft x2=hround u-eps; bot y2=-eps;
draw z1--z2;  % diagonal
x3=w-x5=good.x (lft x1 - .5dot_size);
bot y4 = good.y .5dot_size;
top y6 = good.y h-.5dot_size;
pos3(dot_size,0); pos4(dot_size,90); z3=z4;
pos5(dot_size,0); pos6(dot_size,90); z5=z6;
dot(3,4); dot(5,6);  % dots
penlabels(1,2,3,4,5,6); endchar;

ecchar"Aestimated sign (large e)";  % jk
beginchar(oct"235",(11.25u#+max(.75u#,.5cap_curve#)),cap_height#,0);
italcorr .76cap_height#*slant+.5min(curve#-1.5u#,0);
adjust_fit(if monospace: .25u#,.5u# else: 0,0 fi);
numeric left_curve,right_curve;
left_curve=right_curve+3stem_corr=cap_curve if not serifs: -1.5stem_corr fi;
if right_curve<tiny.breadth: right_curve:=tiny.breadth; fi
if left_curve<tiny.breadth: left_curve:=tiny.breadth; fi
pickup tiny.nib; 
pos1(right_curve,0); pos2(vair,90); pos3(left_curve,180);
y1=good.y .52h; top y2r=h+vround 1.5oo; y0l=bot y1;
rt x1r=hround min(w-.5u,w-u+.5right_curve);
lft x3r=hround max(.5u,1.25u-.5left_curve); x2=.5w+.25u;
{{interim superness:=more_super;
 filldraw stroke super_arc.e(1,2)}};  % right bowl
y3=.5[y2,y4]; bot y4r=-oo; x4=x2+.25u;
if serifs: pos4(vair',270); pos5(hair,360);
 y5=max(good.y(.5bar_height-.9),y4l+vair); x5r=x1r;
 (x,y4l)=whatever[z4r,z5]; x4l:=min(x,x4l+.5u);
 filldraw stroke pulled_arc.e(2,3) & pulled_arc.e(3,4)
  ...{x5-x4,5(y5-y4)}z5e; % left bowl, arc, and terminal
else: pos4(vair,270);
 filldraw stroke super_arc.e(2,3) & super_arc.e(3,4);  % left bowl and arc
 pickup fine.nib; pos4'(vair,270); z4=z4';
 pos5(.5[vair,flare],275); rt x5r=hround(w-.6u);
 y5r=good.y(y5r+1/3bar_height-y5); y5l:=good.y y5l; x5l:=good.x x5l;
 filldraw stroke term.e(4',5,right,1,4); fi  % terminal
path testpath; testpath=super_arc.r(2,3) & super_arc.r(3,4);
y1'r=y0r=y0l+.6[thin_join,vair]; y1'l=y0l; x1'l=x1'r=x1;
forsuffixes $=l,r:
 x0$=xpart(((0,y0$)--(x1,y0$)) intersectionpoint testpath); endfor
fill stroke z0e--z1'e;  % crossbar
penlabels(0,1,2,3,4,5); endchar;

ecchar "Open bullet"; % derived from Circle operator
beginchar(oct"236",9u#,v_center(7u#));
adjust_fit(0,0); pickup rule.nib; autorounded;
if .5w <> good.x .5w: change_width; fi
lft x6=hround u; x2=w-x6; top y8=h; y2=math_axis;
circle_points; draw_circle;  % circle
labels(1,2,3,4,5,6,7,8); endchar;

ecchar"Servicemark"; % jk, design based on logo font
beginchar(oct"237",12u#,body_height#,0);
italcorr .7body_height#;
adjust_fit(0,0);
numeric ww, hh; ww=.5w; hh=vround .5body_height;
pickup pencircle xscaled hair yscaled vair;
x3=x8= u;
x2=x4=.382[x3,ww-x3];
x1=ww-x3;
x5=x7=.618[x3,ww-x3];
x6=.5[ww-x3,lft ww];
top y1=hh; y4=good.y .55hh; bot y8=0;
y1=y2; y3=.5[y2,y4]; y4=y5; y6=.5[y5,y7]; y7=y8;
draw z1--z2; draw z4--z5; draw z7--z8;
super_crescent(2,3,4);
super_crescent(5,6,7);
labels(1,2,3,4,5,6,7,8);
clearxy;
x1=x2=hround(ww+u); x4=x5=hround(w-u); x3=hround .5[x1,x4];
y1=y5; y2=y4; bot y1=-o;
top y2=hh+o; y3=vround (y1+.5bar_height);
draw z1--z2--z3--z4--z5;
labels(1,2,3,4,5);
currentpicture:=currentpicture shifted (0,hh);
endchar;

ecchar "Left square bracket with quill"; % from Haralambous/Plaice
beginchar(oct"240",9u#,body_height#,paren_depth#);
italcorr math_axis#*slant+.5vair#-u#;
adjust_fit(if monospace: -1.5u#,u# else: -2.5u#,0 fi); 
pickup fine.nib;
forsuffixes $=1,1',4,4',7,7',11,11',17,17': 
  pos$(vair,0); endfor
forsuffixes $=2,3,5,6: pos$(stem,0); endfor
x2=x3=x5=x6; x1=x1'=x7=x7'=w-x4=w-x4';
rt x4r=hround(w-1.5u+.5vair); rt x2r=hround(.5w+.5stem);
top y1=h; bot y7=-d; .5[y4,y4']=.5[y1,y7]=.5[y2,y6]=.5[y3,y5];
y1-y2=y3-y4=(y1-y4)/4; 
y1-y1'=y4-y4'=y7'-y7=y11-y11'=y17-y17'=vair-fine; 
x11=x11'=x17=x17'; x11-x2=x2-x1; y11=y1; y17=y7;
filldraw z11'l{left}...z2r---z3r...{right}z4r
 --z4'r{left}...z5r---z6r...{right}z17l
 --z17r--z17'r{left}...z6l---z5l...{right}.5[z4l,z4'l]{left}
 ...z3l---z2l...{right}z11r--z11'r--cycle;  % stroke
penlabels(1,2,3,4,5,6,7); endchar;

ecchar "Right square bracket with quill"; % from Haralambous/Plaice
beginchar(oct"241",9u#,body_height#,paren_depth#);
italcorr body_height#*slant+.5vair#-u#;
adjust_fit(if monospace: u#,-1.5u# else: 0,-2.5u# fi); 
pickup fine.nib;
forsuffixes $=1,1',4,4',7,7',11,11',17,17': 
 pos$(vair,0); endfor
forsuffixes $=2,3,5,6: pos$(stem,0); endfor
x2=x3=x5=x6; x1=x1'=x7=x7'=w-x4=w-x4';
lft x4l=hround(1.5u-.5vair); lft x2l=hround(.5w-.5stem);
top y1=h; bot y7=-d; .5[y4,y4']=.5[y1,y7]=.5[y2,y6]=.5[y3,y5];
y1-y2=y3-y4=(y1-y4)/4; y1-y1'=y4-y4'=y7'-y7=vair-fine;
x11=x11'; x17=x17';
y11=y1; y17=y7;
x1-x2=x2-x11; x17=x11; y11-y11'=y17'-y17=vair-fine;
filldraw z11'r{right}...z2l---z3l...{left}z4l
 --z4'l{right}...z5l---z6l...{left}z17'r
--z17'l--z17l{right}...z6r---z5r...{left}.5[z4r,z4'r]{right}
 ...z3r---z2r...{left}z11l--z11'l--cycle;  % stroke
penlabels(1,2,3,4,5,6,7); endchar;

ecchar "Cent sign"; % from wasychr (wasy)
% Modified height and depth (jk)
% Modified: Bar instead of broken bar
beginchar(oct"242",9u#,x_height#+.5desc_depth#,.5desc_depth#);
italcorr x_height#*slant-.2u#;
adjust_fit(0,0);
pickup fine.nib; pos2(vair',90); pos4(vair',270);
x2=x4=.5(w+u); top y2r=vround(x_height+1.5oo); bot y4r=-oo;
pos3(curve,180); lft x3r=hround max(.6u,1.35u-.5curve); y3=.5x_height;
if serifs: pos1(hair,0); pos0(flare,0);
 y1=min(bar_height+.5flare+2vair'+2,.9[bar_height,x_height]-.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
pickup crisp.nib; 
x6=x7=x8=x9=x2; y7=y2; y8=y4; bot y9=-d; y6-y7 = y8-y9;
pos6(bar,0); pos7(bar,0);
pos8(bar,0); pos9(bar,0);
filldraw stroke z6e--z9e; % bar
%filldraw stroke z6e--z7e; % upper bar
%filldraw stroke z8e--z9e; % lower bar
penlabels(0,1,2,3,4,5,6,7,8,9); endchar;

ecchar "Sterling sign"; % from italp (cm)
% already contains bug fix found by Yannis Haralambous
beginchar(oct"243",12u#,asc_height#,0);
adjust_fit(0,.75asc_height#*slant-.5u#); pickup fine.nib;
pos0(flare,0); pos1(hair,0); pos2(vair,90); pos3(stem,180);
pos4(stem,180); pos4'(stem,0); pos5(vair,-90); z4'=z4;
x2=2/3w-.5u; rt x3l=rt x4l=hround(.5w-u+.5stem); x5=2.5u;
y1=y3=.75h; top y2=h+oo; y4=.25h; bot y5r=-oo;
rt x1r=hround(w-1.5u); bulb(2,1,0);  % bulb
filldraw stroke pulled_arc.e(2,3)..z4e;  % stem
numeric light_stem; light_stem=2/3[vair,vstem];
pos6(.5[hair,light_stem],-180); pos7(light_stem,-300);
pos8(light_stem,-300); pos9(hair,-180);
lft x6r=hround u; x7=3u; x8=w-3.5u; rt x9l=hround(w-u);
y6=.4[y5,y7]; top y7r=vround .2h; bot y8l=-oo; y9=good.y .2h;
filldraw stroke pulled_arc.e(4',5)...z6e{up}...z7e{right}
 ..{right}z8e...{up}z9e;  % loop and arm
pos10(bar,90); pos11(bar,90); x10=3u; x11=w-4.5u;
top y10r=top y11r=vround(.5h+.5bar); filldraw stroke z10e--z11e;  % bar
penlabels(1,2,3,4,5,6,7,8,9,10,11); endchar;

ecchar "Currency sign"; % from rsym (wasy)
beginchar(oct"244",1.13 min(asc_height#,9/7x_height#)+2u#,
 min(asc_height#,9/7x_height#),0);
italcorr x_height#*slant;
adjust_fit(if monospace: u#,u# else: 0,0 fi);
pickup rule.nib; autorounded;
x4 = good.x .5w; x2-x6=y8-y4; y2=good.y .5h; bot y4=-oo;
circle_points;
z9 = 1.30[z5,z1];
z10 = 1.30[z7,z3];
z11 = 1.30[z1,z5];
z12 = 1.30[z3,z7];
draw_circle;
draw z1--z9;
draw z3--z10;
draw z5--z11;
draw z7--z12;
labels(1,2,3,4,5,6,7,8,9,10,11,12); endchar;


ecchar "Yen symbol"; % from asymbols (msam) 
% Change (jk): Use correct pen for horizontal bars
compute_spread(.45x_height#, .55x_height#); 
beginchar(oct"245",13u#,cap_height#,0); %% adapted from "Y" 
italcorr cap_height#*slant+.45u#; 
adjust_fit(cap_serif_fit#,cap_serif_fit#); 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 & 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 
pickup extra_rule.nib;  
x7=x9=x1l; x8=x10=x4r; y9=y10; 
top y7=bar_height; y7=y8; draw z7--z8; 
y9-y7=spread; draw z9--z10; % crossing bars
penlabels(0,1,2,3,4,5,6,1',2',3',4',5',6',7,8,9,10); endchar;  

ecchar "Broken vertical bar"; % jk
beginchar(oct"246",3u#,body_height#,paren_depth#);
italcorr body_height#*slant - u#;
adjust_fit(0,0); pickup rule.nib;
top y1=h; .5[y1,y4]=math_axis;
compute_spread(.45x_height#,.55x_height#); y2-y3=spread;
.5[y2,y3]=math_axis;
x1=x2=x3=x4=good.x .5w;
draw z1--z2; draw z3--z4;
labels(1,2,3,4); endchar;

ecchar "Section sign"; % from mathsy, renovated (jk)
beginchar(oct"247",6.5u#+max(1.5u#,stem#),asc_height#,desc_depth#);
adjust_fit(0,0); pickup fine.nib;
numeric s_slab; s_slab=if serifs:slab else:vround .2[slab,cap_stem] fi;
numeric ess'; ess'=max(fine.breadth,cap_ess);
numeric sstem; sstem=hround .5[s_slab,ess']-fine;
if sstem < fine.breadth: sstem:=fine.breadth; fi
pos2(vair,90); pos3(sstem,180); 
pos4(ess',270); pos4'(vair,270);
pos5'(sstem,0); pos5(sstem,180);
pos6(ess',90); pos6'(vair,90); pos7(sstem,0); 
pos8(vair,-90);
top y2r=h+oo; bot y8r=-d-oo;
y3=.52[y4,y2]; y5=.52[y4,y6]; y7=.52[y6,y8]; y5'=.52[y6,y4];
y2-y4=y4-y6=y6-y8;
bot z4'=bot z4; top z6'=top z6;
lft x3r=hround 1.25u;
x2=x4=x6=x8=.5w; x5=x7=w-x3; x5'=x3;
if serifs:
 pos0(stem,0); pos1(hair,0); pos9(hair,-180); pos10(stem,-180);
 rt x1r=hround(w-1.5u); x9=w-x1; y2-y1=y9-y8=(y2-y8)/8;
 bulb(2,1,0); bulb(8,9,10);  % bulbs
else:
 pos1(.6[slab,flare],-100); pos9(flare,-100); pos2'(vair,-90);
 rt x1l=hround(w-1.3u); lft x9r=hround .8u; z2'=z2;
 top y1l=vround .92asc_height+oo; bot y9r=vround .1asc_height-d-oo;
 filldraw stroke term.e(2',1,right,.9,4);  % upper arc and terminal
 filldraw stroke term.e(8,9,left,.9,4);   % lower arc and terminal
fi
filldraw stroke z2e{left}...z3e{down}...z4e{3(x5-x3),y5-y3}
 ...z5e{down}...{left}z6'e;  % upper stroke
filldraw stroke z4'e{left}...z5'e{down}...z6e{3(x7-x5'),y7-y5'}
 ...z7e{down}...{left}z8e;  % upper stroke
penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar;

ecchar "Umlaut (double dot) accent"; % from accent (cm)
numeric dot_diam#,dot_diam;
dot_diam#=max(dot_size#,cap_curve#);
beginchar(oct"250",9u#,min(asc_height#,10/7x_height#+.5dot_diam#),0);
dot_diam=max(tiny.breadth,hround(max(dot_size,cap_curve)-2stem_corr));
italcorr h#*slant+.5dot_diam#-2.25u#;
adjust_fit(0,0);
pickup tiny.nib; pos1(dot_diam,0); pos2(dot_diam,90);
x1=x2=2.75u; top y2r=h+1;
if bot y2l<x_height+o+slab: y2l:=min(y2r-eps,x_height+o+slab+.5tiny); fi
y1=.5[y2l,y2r]; dot(1,2);  % left dot
pos3(dot_diam,0); penpos4(y2r-y2l,90); y3=y4=y1; x3=x4=w-x1;
dot(3,4);  % right dot
penlabels(1,2,3,4); endchar;

ecchar"Copyright";
beginchar(oct"251",20u#,body_height#,max(paren_depth#,desc_depth#));
autorounded;
adjust_fit(if monospace:-3u#,-3u# else: 0,0 fi); pickup rule.nib;
if .5w <> good.x .5w: change_width; fi
lft x6=hround u; x2=w-x6; top y8=h+o; bot y4=-d-o;
circle_points; draw_circle;  % circle
labels(1,2,3,4,5,6,7,8); 
clearxy; autorounding:=0;
numeric hh,ll,rr; hh=vround .7cap_height; ll=hround(.5w-6u);
rr=hround(.5w+5u);
if serifs:
 pickup fine.nib; pos1(cap_hair,0); pos2(cap_band,90);
 pos3(cap_curve,180); pos4(cap_band,270); pos5(hair,360);
 rt x1r=rt x5r=hround(rr-u); lft x3r=hround(ll+u); x2=x4=.55[x3,x1];
 top y2r=hh+o; bot y4r=-o; y3=.5[y2,y4];
 bot y1=min(vround max(.6hh,.7x_height-.5vair),bot y2l-eps);
 y5=max(good.y .95(hh-y1),y4l+eps);
 (x2l',y2l)=whatever[z2r,z1l]; x2l:=min(x2l',x2l+.5u);
 (x4l',y4l)=whatever[z4r,z5l]; x4l:=min(x4l',x4l+.5u);
 filldraw stroke z1e{x2-x1,10(y2-y1)}
  ...pulled_arc.e(2,3) & pulled_arc.e(3,4)...{up}z5e; % arc
 pos6(.3[fine.breadth,cap_hair],0); x6r=x1r; top y6=hh+o;
 x1r-x1'=2cap_curve-fine; y1'=y1;
 path upper_arc; upper_arc=z1{x2-x1,10(y2-y1)}..z2{left};
 numeric t; t=xpart(upper_arc intersectiontimes (z6l--z1'));
 filldraw z1r--z6r--z6l--subpath(t,0) of upper_arc--cycle; % barb
else:
 pickup fine.nib; pos1(1.2flare,80); pos2(slab,90);
 pos3(cap_curve,180); pos4(slab,270); pos5(flare,275);
 rt x1r=hround(rr-1.1u); x2=x4=.5w+1.25u;
 lft x3r=ll+hround max(u,2u-.5cap_curve); rt x5r=hround(rr-.9u);
 top y1r=vround .95hh+o; top y2r=hh+o; y3=.5hh;
 bot y4r=-o; bot y5r=vround .08hh-o; y5l:=good.y y5l; x5l:=good.x x5l;
 filldraw stroke rterm.e(2,1,right,.9,4) & super_arc.e(2,3)
  & super_arc.e(3,4) & term.e(4,5,right,.8,4); fi % arc and terminals
penlabels(1,1',2,3,4,5,6); endchar;

ecchar"Copyleft";
beginchar(oct"253",20u#,body_height#,max(paren_depth#,desc_depth#));
autorounded;
adjust_fit(if monospace:-3u#,-3u# else: 0,0 fi); pickup rule.nib;
if .5w <> good.x .5w: change_width; fi
lft x6=hround u; x2=w-x6; top y8=h+o; bot y4=-d-o;
circle_points; draw_circle;  % circle
labels(1,2,3,4,5,6,7,8); 
clearxy; autorounding:=0;
numeric hh,ll,rr; hh=vround .7cap_height; ll=hround(.5w-5u);
rr=hround(.5w+6u);
if serifs:
 pickup fine.nib; pos1(cap_hair,0); pos2(cap_band,-90);
 pos3(cap_curve,-180); pos4(cap_band,-270); pos5(hair,-360);
 lft x1l=lft x5l=hround(ll+u); rt x3l=hround(rr-u); x2=x4=.55[x3,x1];
 top y2l=hh+o; bot y4l=-o; y3=.5[y2,y4];
 bot y1=min(vround max(.6hh,.7x_height-.5vair),bot y2r-eps);
 y5=max(good.y .95(hh-y1),y4r+eps);
 (x2r',y2r)=whatever[z2l,z1r]; x2r:=min(x2r',x2r+.5u);
 (x4r',y4r)=whatever[z4l,z5r]; x4r:=min(x4r',x4r+.5u);
 filldraw stroke z1e{x2-x1,10(y2-y1)}
  ...pulled_arc.e(2,3) & pulled_arc.e(3,4)...{up}z5e; % arc
 pos6(.3[fine.breadth,cap_hair],0); x6l=x1l; top y6=hh+o;
 x1l-x1'=2cap_curve-fine; y1'=y1;
 path upper_arc; upper_arc=z1{x2-x1,10(y2-y1)}..z2{right};
 numeric t; t=xpart(upper_arc intersectiontimes (z6r--z1'));
 filldraw z1l--z6l--z6r--subpath(t,0) of upper_arc--cycle; % barb
else:
 pickup fine.nib; pos1(1.2flare,-80); pos2(slab,-90);
 pos3(cap_curve,-180); pos4(slab,-270); pos5(flare,-275);
 lft x1l=hround(ll+1.1u); x2=x4=.5w-1.25u;
 rt x3l=rr-hround max(u,2u-.5cap_curve); lft x5l=hround(ll+.9u);
 top y1l=vround .95hh+o; top y2l=hh+o; y3=.5hh;
 bot y4l=-o; bot y5l=vround .08hh-o; y5r:=good.y y5r; x5r:=good.x x5r;
 filldraw stroke rterm.e(2,1,left,.9,4) & super_arc.e(2,3)
  & super_arc.e(3,4) & term.e(4,5,left,.8,4); fi % arc and terminals
penlabels(1,1',2,3,4,5,6); endchar;

ecchar "Logical not sign"; % from sym
beginchar(oct"254",12u#,x_height#,0);
italcorr x_height#*slant-.5u#;
adjust_fit(0,0); pickup rule.nib;
lft x1=hround u-eps; x2=x3=w-x1;
y1=y2=good.y .5[bar_height,h]; y2-y3=1.2(h-bar_height);
draw z1--z2--z3;  % bar and stem
labels(1,2,3); endchar;

ecchar"Circled P"; % Sound recording copyright sign % jk
beginchar(oct"255",20u#,body_height#,max(paren_depth#,desc_depth#));
autorounded;
adjust_fit(if monospace:-3u#,-3u# else: 0,0 fi); pickup rule.nib;
if .5w <> good.x .5w: change_width; fi
lft x6=hround u; x2=w-x6; top y8=h+o; bot y4=-d-o;
circle_points; draw_circle;  % circle
labels(1,2,3,4,5,6,7,8); 
clearxy; autorounding:=0;
numeric hh,ll,rr; hh=vround .7cap_height; ll=hround(.5w-6u);
rr=hround(.5w+6u);
pickup tiny.nib; pos1(cap_stem',0); pos2(cap_stem',0);
pos0(cap_stem',0); pos0'(cap_stem,0);
lft x1l=ll+hround max(2u,3u-.5cap_stem'); top y1=hh; 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(.5hh); x4=x6=.5w+.75u; x5r=hround(rr-u);
x4l:=x6l:=x4-.25cap_curve;
filldraw stroke z1e--z2e; % stem
fill stroke z3e..pulled_arc.e(4,5) & pulled_arc.e(5,6)..z7e;  % lobe
if serifs: 
 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
fi 
penlabels(0,1,2,3,4,5,6); endchar;

ecchar"Registered"; % jk
beginchar(oct"256",20u#,body_height#,max(paren_depth#,desc_depth#));
autorounded;
adjust_fit(if monospace:-3u#,-3u# else: 0,0 fi); pickup rule.nib;
if .5w <> good.x .5w: change_width; fi
lft x6=hround u; x2=w-x6; top y8=h+o; bot y4=-d-o;
circle_points; draw_circle;  % circle
labels(1,2,3,4,5,6,7,8); 
clearxy; autorounding:=0;
numeric hh,ll,rr; hh=vround .7cap_height; ll=hround(.5w-6u);
rr=hround(.5w+6u);
pickup tiny.nib; pos1(cap_stem',0); pos2(cap_stem',0);
lft x1l=lft x2l=ll+hround max(2u,3u-.5cap_stem'); top y1=hh; 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(.5hh+.5vair); x4=x6;
if serifs: x4=.5w-.5u; x5r=hround(rr-2.25u);
else: x4=.5w+.5u; x5r=hround(rr-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(rr-.25u); y10=1/3[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(rr-.5u); y9=0;
 fill z8l--diag_end(8l,9l,.5,1,9r,8r)--z8r--cycle; fi  % tail
penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar;

ecchar"High bar (Macron)"; % jk
beginchar(oct"257",14u#,min(asc_height#,2x_height#),0);
adjust_fit(0,0); pickup rule.nib;
lft x1=hround 1.5u-eps; x2=w-x1; top y1=top y2=h;
draw z1--z2;  % bar
labels(1,2); endchar;

ecchar "Plus-or-minus sign"; % from sym
beginarithchar(oct"261"); pickup rule.nib;
numeric shiftup; shiftup=vround 1.5u;
x1=x2=.5w; lft x3=lft x5=hround u-eps; x4=x6=w-x3;
.5[y1,y2]=y3=y4=math_axis+shiftup; top y1=h+shiftup; y5=y6=y2;
draw z1--z2;  % stem
draw z3--z4;  % plus bar
draw z5--z6;  % minus bar
labels(1,2,3,4,5,6); endchar;

ecchar"Degree sign"; % Yannis, Unicode Computer Modern
beginchar(oct"260",4u#,cap_height#,0);
adjust_fit(if monospace: 1.5u#,1.5u# else: u#,u# fi); 
pickup rule.nib; autorounded;
if .5w <> good.x .5w: change_width; fi
lft x6=0; x2=w-x6; top y8=h; y8-y2=x2-x8;
circle_points; draw_circle;  % circle
labels(1,2,3,4,5,6,7,8); endchar;

ecchar"Tick mark"; % from accent (cmfonts, acute accent)
beginchar(oct"264",9u#,min(asc_height#,2x_height#),0);
italcorr h#*slant-if serifs: 1.5 fi u#;
adjust_fit(0,0);
if serifs: pickup crisp.nib; x1+.5stem=hround(w-2u); x2=2/3[x1,w-x1];
 y1+.5stem=h+eps; y2=max(2/3[h,x_height],x_height+o+hair);
 numeric theta; theta=angle(z2-z1)+90;
 pos1(stem,theta); pos2(hair,theta);
 filldraw circ_stroke z1e--z2e;  % diagonal
else: pickup fine.nib; pos1(stem,0); pos2(vair,0);
 rt x1r=hround(w-1.5u); lft x2l=hround(.5w-.25u-.5vair);
 top y1=h; bot y2=vround 2/3[h,x_height];
 filldraw stroke z1e--z2e; fi  % diagonal
penlabels(1,2); endchar;

iff not variant_g:
ecchar"Micro sign"; % jk, based on cm `u'
beginchar(oct"265",10u#,x_height#,desc_depth#);
italcorr x_height#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
numeric light_vair; light_vair=vair if hefty: -vround 2vair_corr fi;
if light_vair<fine.breadth: light_vair:=fine.breadth; fi
pickup tiny.nib; pos1(stem,0); pos2(stem,0); pos7(stem,0);
pos3(stem,0); pos4(stem',0);
lft x1l=hround(2.5u-.5stem); x1=x2=x7; x3=w-x1; x3r=x4r;
if serifs: top y1=h+min(oo,serif_drop); bot y4=-min(oo,serif_drop);
else: top y1=h; bot y4=0; fi
pos0(stem,0); pos0'(stem',0);
x0=x3; x0'=x4; y0=y0'; bot y7=-d;
penpos2'(stem-fine,-180); z2'=z2; y3=y1; y2=.5bar_height;
penpos5(max(eps,light_vair-fine),-90); penpos6(thin_join-fine,0);
y6=y0=2/3bar_height;
filldraw stroke z1e--z7e;  % left stem
filldraw stroke z3e..z0e--z0'e..z4e;  % right stem
pickup fine.nib; bot y5r=-oo; x5l=.5w-.25u; lft x6l=tiny.lft x0l;
(x,y5r)=whatever[z5l,z6l]; x5r:=max(x,.5[x5,x2'r]);
filldraw stroke {{interim superness:=hein_super;
  pulled_arc.e(2',5)}} & z5e{right}...{up}z6e;  % arc
if serifs: sloped_serif.l(1,2,a,1/3,jut,serif_drop); % upper left serif
 sloped_serif.l(3,0,b,1/3,jut,serif_drop); % upper right serif
 sloped_serif.r(4,0',c,1/3,jut,min(oo,serif_drop));  % lower right serif
 pickup crisp.nib;
 dish_serif(7,1,d,1/3,jut,e,1/3,jut); fi  % lower left serif
penlabels(1,2,3,4,5,7); labels(6); endchar;

iff variant_g: % This triggers italics
ecchar "Micro sign"; % from greekl (cm)
beginchar(oct"265",9u#,x_height#,desc_depth#);
italcorr 1/3x_height#*slant+.5hair#+.5u#;
adjust_fit(0,0); pickup fine.nib; interim superness:=more_super;
pos1(stem,-180); pos2(stem,-180); x1=x2=x3; lft x1r=hround(1.5u-.5stem);
y1+.5stem=h+oo; y2-.5stem=-d-o;
filldraw z1r---z2r..z2l---z1l..cycle;  % left stem
pos3(stem,-180); pos4(vair,-90); pos5(hair,0); x4=.5[x3,x5];
pos6(stem,0); rt x6r=hround(w-2.5u+.5stem);
x5=x6=x7; x9=w; hook_out(7,8,9);  % closing hook
y3=.7[y4,y5]; bot y4r=-oo; y5=.57h; y6+.5stem=h;
filldraw stroke super_arc.e(3,4)...{up}z5e; % left stem and arc
filldraw circ_stroke z6e--z7e;  % right stem
math_fit(desc_depth#*slant+.5stem#-u#,ic#);
penlabels(1,2,3,4,5,6,7,8,9); endchar;

ecchar "Paragraph mark"; % from mathsy
beginchar(oct"266",11u#,asc_height#,desc_depth#);
adjust_fit(0,0); pickup rule.nib; autorounded;
top y1=h; bot y6=-d-eps; y4=y7=y9=y1;
y8=y6; y3=y5=good.y .5[y1,y6];
x7-x4=ceiling(rule_thickness+1.25u);
lft x2=hround u; y2=.5[y1,y3]; x4=x5=x6; rt x9=hround(w-.5u);
x7=x8=good.x(x9-1.5u); x1=x3=min(.5w,x4);
filldraw z4..z1{left}...z2{down}...{right}z5--cycle;  % filled bowl
draw z9--z4--z6;  % left stem and upper serif
draw z7--z8;  % right stem
if serifs:
 x11=x9; x10-x8=x4-x9;
 bot y10=-d-eps; y10=y11;
 draw z10--z11; % lower serif
fi
labels(1,2,3,4,5,6,7,8,9,10,11); endchar;

ecchar "Centered dot"; % reengineered for catalan l.l
beginchar(oct"267",(11u#-width_adj#-2max(2u#+.5cap_stem#,3u#)),
   x_height#,0);
adjust_fit(0,0); 
pickup fine.nib;
pos1(udot_diam,0); pos2(udot_diam,90);
lft x1l=hround(.5w-.5udot_diam); y1+.5udot_diam=vround(bar_height+.5udot_diam);
z1=z2; dot(1,2);  % dot
penlabels(1,2); endchar;

ecchar "Reference mark"; % From Haralambous/Plaice
beginchar(oct"270",1/3[x_height#,asc_height#],
  1/3[x_height#,asc_height#],0); 
italcorr .5x_height#*slant-.5u#;
adjust_fit(if monospace: 
 -1/3[x_height#,asc_height#] + mono_charwd#, 
 -1/3[x_height#,asc_height#] + mono_charwd# 
 else: u#,u# fi); 
pickup rule.nib;
Dot_size:=min(dot_size,max(1,.25h-rule_thickness));
lft x1=0; top y1=h;
x2=x3=w-x1; x4=x1; .5[y1,y2]=.5[y3,y4]=.5h; y2=y4;
draw z1--z2; draw z3--z4;  % diagonals
top z1'=.5[top z1,top z3]-(0,.5Dot_size); 
rt z3'=.5[rt z3,rt z2]-(.5Dot_size,0); 
bot z2'=.5[bot z2,bot z4]+(0,.5Dot_size); 
lft z4'=.5[lft z4,lft z1]+(.5Dot_size,0);
z1'=z1''; z2'=z2''; z3'=z3''; z4'=z4'';
penpos1'(Dot_size,0); 
penpos1''(Dot_size,90); dot(1',1''); 
penpos2'(Dot_size,0); 
penpos2''(Dot_size,90); dot(2',2''); 
penpos3'(Dot_size,0);
penpos3''(Dot_size,90); dot(3',3''); 
penpos4'(Dot_size,0);
penpos4''(Dot_size,90); dot(4',4''); 
labels(1,2,3,4,1',2',3',4',1'',2'',3'',4'',1'r,1'l,1''r,1''l); 
endchar;

ecchar"Root sign"; % textsurd, from wnri
beginchar(oct"273",8.5u#,body_height#,paren_depth#-rule_thickness#);
italcorr body_height#*slant;
adjust_fit(0,-letter_fit#); 
pickup rule.nib;
 w':=7u;
 x1=good.x (1/9w'+2.5u); x2=good.x (.65w'+2.5u);
 bot y1=-.5d; bot y2=asc_height;
 draw z1--z2;  % diagonal
 pickup crisp.nib;
 pos3(if hefty: else: .7 fi max(curve,rule_thickness),0);
 x3l=1.5[x2,x1]; y3=.5[y1,y2];
 pos4(rule_thickness,0); x4=x1; bot y4=-.5d;
 pos5(vair,-45); x5l=good.x(x3l-u); z5l=whatever[z3r,z2];
 z6=z5r+whatever*(z2-z3r)=whatever[z3l,z4l];
 z7=whatever[z1,z2]=z3r+whatever*(z4l-z3l);
 filldraw z5r--z6--z4l--z4--z7--z3r--z5l--cycle;  % left diagonal and serif
x8=x2+2u; y8=y2;
pickup rule.nib;
draw z2--z8;
penlabels(1,2,3,4,5,6,7,8); 
endchar;   
 
ecchar "Euro currency sign"; % jk
beginchar(oct"277",14u#,cap_height#,0);
italcorr cap_height#*slant-beak_jut#-.5u#;
adjust_fit(0,0);
pickup fine.nib;
pos2(slab,90); pos1(hair,0);
top y2r=h; x2=hround 9u; rt x1r=hround(w-u); y1=good.y(y2l-beak)-eps;
arm(2,1,a,beak_darkness,beak_jut);  % upper arm and beak
pos3(cap_curve,180); pos4(slab,270); pos5(hair,0);
bot y4r=0; x4=x2; rt x5r=hround(w-u); y5=good.y(y4l+7/6beak)+eps;
arm(4,5,b,beak_darkness,1.5beak_jut);  % lower arm and beak
lft x3r =hround 2.5u; y3=.52h;
filldraw stroke super_arc.e(2,3) & super_arc.e(3,4); % arc
pos6(slab,-90); pos7(hair,0); pos8(slab,90); pos9(hair,0); 
bot y6r=top y8r+if hefty: 1.333 else: 2 fi vair
       =vround(y3+if hefty: .667 fi vair+eps);
y7=good.y(y6l+beak)+eps; y9=good.y(y8l-beak)-eps;
x6=x8=hround u; rt x7r=rt x9r=hround 10u;
arm(6,7,c,beak_darkness,0); arm(8,9,d,beak_darkness,0); % middle arms
penlabels(1,2,3,4,5,6,7,8,9); endchar;

ecchar "Times operator"; % from mathsy
beginarithchar(oct"326"); pickup rule.nib;
x1=good.x(1/sqrt2)[.5w,rt u]; y1=good.y(1/sqrt2)[math_axis,bot h];
x2=x3=w-x1; x4=x1; .5[y1,y2]=.5[y3,y4]=math_axis; y2=y4;
draw z1--z2; draw z3--z4;  % diagonals
labels(1,2,3,4); endchar;

ecchar "Elementary division operator"; % from mathsy
beginarithchar(oct"366"); pickup rule.nib;
numeric del; del=dot_size-currentbreadth;
x3-.5del=good.x(.5w-.5del); center_on(x3);
y3+.5del=good.y(math_axis+math_spread[.5x_height,.6x_height]+.5del);
lft x1=hround u-eps; x2=w-x1; y1=y2=math_axis;
draw z1--z2;  % bar
pos3(dot_size,0); pos4(dot_size,90); z3=z4;
pos5(dot_size,0); pos6(dot_size,90); z5=z6; x5=x3; .5[y3,y5]=math_axis;
dot(3,4); dot(5,6);  % dots
penlabels(1,2,3,4,5,6); endchar;


endinput;

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.