Plan 9 from Bell Labs’s /usr/web/sources/contrib/steve/root/sys/lib/texmf/fonts/source/public/cm/sym.mf

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


% This file generates the following characters when their codes are known:
% |minus|, |plus_minus|, |o_plus|, |o_times|,
% |cup|, |cap|, |meet|, |join|,
% |down_arrow|, |up_arrow|,
% |left_arrow|, |right_arrow|, |double_arrow|,
% |subset|, |superset|, |elt|,
% |for_all|, |there_exists|, |false_that|,
% |less|, |greater|, |underbar|,
% |neq|, |leq|, |geq|, |eqv|,
% |backslash|, |vertical|,
% |cdot|, |diamond|,
% |left_brace|, |right_brace|,
% |straight_quotes|, |infty|, |integral|.

iff known minus: cmchar "Minus sign";
beginarithchar(minus); pickup rule.nib;
lft x1=hround 1.5u-eps; x2=w-x1; y1=y2=math_axis;
draw z1--z2;  % bar
labels(1,2); endchar;

iff known plus_minus: cmchar "Plus-or-minus sign";
beginarithchar(plus_minus); 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;

iff known o_plus: cmchar "Circle-plus operator";
beginarithchar(o_plus); pickup light_rule.nib; autorounded;
lft x6=hround u; x2=w-x6; y2=math_axis; top y8=h;
circle_points; draw_circle;  % circle
draw z2--z6; draw z4--z8;  % bar and stem
labels(1,2,3,4,5,6,7,8); endchar;

iff known o_times: cmchar "Circle-times operator";
beginarithchar(o_times); pickup light_rule.nib; autorounded;
lft x6=hround u; x2=w-x6; y2=math_axis; top y8=h;
circle_points; draw_circle;  % circle
draw z1--z5; draw z3--z7;  % diagonals
labels(1,2,3,4,5,6,7,8); endchar;

iff known cup: cmchar "Set union sign";
beginchar(cup,12u#,.8asc_height#,0);
italcorr .8asc_height#*slant-.5u#;
adjust_fit(0,0); pickup rule.nib; autorounded;
lft x1=hround u; x2=x1; x3=w-x3; x4=x5=w-x1;
y1=good.y h+o; bot y3=-o; y2=y4=2/3[y1,y3]; y5=y1;
draw z1---z2...z3...z4---z5;  % stems and cup
labels(1,2,3,4,5); endchar;

iff known cap: cmchar "Set intersection sign";
beginchar(cap,12u#,.8asc_height#,0);
italcorr .8asc_height#*slant-.5u#;
adjust_fit(0,0); pickup rule.nib; autorounded;
lft x1=hround u; x2=x1; x3=w-x3; x4=x5=w-x1;
y3=good.y h+o; bot y1=-o; y2=y4=2/3[y1,y3]; y5=y1;
draw z1---z2...z3...z4---z5;  % stems and cap
labels(1,2,3,4,5); endchar;

iff known meet: cmchar "Lattice infimum (logical and) sign";
beginchar(meet,12u#,.8asc_height#,0);
italcorr .8asc_height#*slant-.5u#;
adjust_fit(0,0); pickup rule.nib;
lft x1=hround u-eps; x3=w-x3; x5=w-x1;
y3=good.y h+o; bot y1=-o; y5=y1;
draw z1--z3--z5;  % diagonals
labels(1,3,5); endchar;

iff known join: cmchar "Lattice supremum (logical or) sign";
beginchar(join,12u#,.8asc_height#,0);
italcorr .8asc_height#*slant-.5u#;
adjust_fit(0,0); pickup rule.nib;
lft x1=hround u-eps; x3=w-x3; x5=w-x1;
y1=good.y h+o; bot y3=-o; y5=y1;
draw z1--z3--z5;  % diagonals
labels(1,3,5); endchar;

iff known down_arrow: cmchar "Downward arrow";
beginchar(down_arrow,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;
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;

iff known up_arrow: cmchar "Upward arrow";
beginchar(up_arrow,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;
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;

iff known left_arrow: cmchar "Leftward arrow";
compute_spread(.45x_height#,.55x_height#);
beginchar(left_arrow,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;

iff known right_arrow: cmchar "Rightward arrow";
compute_spread(.45x_height#,.55x_height#);
beginchar(right_arrow,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;

iff known double_arrow: cmchar "Left-and-right arrow";
compute_spread(.45x_height#,.55x_height#);
beginchar(double_arrow,18u#,
 v_center(if monospace:.6asc_height#+fi 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 if monospace:+vround.3asc_height fi; lft x0=hround u;
if monospace: x1+.5rule_thickness=hround(w-u) else: x1=.5w fi;
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;  % left arrowhead and stem
pos11(rule_thickness,90); pos12(rule_thickness,90);
pos13(rule_thickness,0); pos14(rule_thickness,0);
y10=y11=y12=math_axis if monospace:-vround.3asc_height fi;
rt x10=hround(w-u);
if monospace: x11-.5rule_thickness=hround u else: x11=.5w fi;
y13-y10=y10-y14=if monospace:.24 else:.36 fi asc_height+eps;
x13=x14=x10-if monospace:3u else:4u fi-eps;
pos15(rule_thickness,angle(z14-z10)); z15l=z10;
pos16(rule_thickness,angle(z13-z10)); z16l=z10;
z19=.2[.5[z13,z14],z10];
numeric t; path p; p=z14l{z19-z14}..z16r;
t=xpart(p intersectiontimes((0,y12l)--(w,y12l))); x12=xpart point t of p;
filldraw z10..{z14-z19}z14r--subpath (0,t) of\\(z14l{z19-z14}..z16r)
 --z12l---z11l..z11r---z12r--subpath (t,0) of\\(z13l{z19-z13}..z15r)
 --z13r{z19-z13}..z10 & cycle;  % right arrowhead and stem
penlabels(0,1,2,3,4,5,6,9,10,11,12,13,14,15,16,19); endchar;

iff known subset: cmchar "Proper subset sign";
compute_spread(5/4x_height#,3/2x_height#);
beginchar(subset,14u#,v_center(spread#+rule_thickness#));
italcorr h#*slant-u#;
adjust_fit(0,0); pickup rule.nib; autorounded;
lft x2=hround 1.5u-eps; x1=x3=w-x2;
y1-y3=spread; y2=.5[y1,y3]=math_axis;
x4=x5=.5w; y4=y1; y5=y3;
draw z1---z4...z2{down}...z5---z3;  % arc and bars
labels(1,2,3,4,5); endchar;

iff known superset: cmchar "Proper superset sign";
compute_spread(5/4x_height#,3/2x_height#);
beginchar(superset,14u#,v_center(spread#+rule_thickness#));
italcorr h#*slant-u#;
adjust_fit(0,0); pickup rule.nib; autorounded;
lft x1=hround 1.5u-eps; x2=w-x1; x3=x1;
y1-y3=spread; y2=.5[y1,y3]=math_axis;
x4=x5=.5w; y4=y1; y5=y3;
draw z1---z4...z2{down}...z5---z3;  % arc and bars
labels(1,2,3,4,5); endchar;

iff known elt: cmchar "Element sign";
compute_spread(5/4x_height#,3/2x_height#);
beginchar(elt,12u#,v_center(spread#+rule_thickness#));
italcorr h#*slant-u#;
adjust_fit(0,0); pickup rule.nib; autorounded;
lft x2=hround 1.5u-eps; x1=x3=x6=w-x2;
y1-y3=spread; y2=y6=.5[y1,y3]=math_axis;
x4=x5=.5w+u; y4=y1; y5=y3;
draw z1---z4...z2{down}...z5---z3;  % arc and bars
draw z2--z6;  % middle bar
labels(1,2,3,4,5,6); endchar;

iff known for_all: cmchar "Universal quantifier";
beginchar(for_all,10u#,asc_height#,0);
italcorr asc_height#*slant;
adjust_fit(0,0); pickup rule.nib;
x2=good.x .5w; center_on(x2);
lft x1=0; x3=w-x1;
top y1=h; bot y2=-o; y3=y1; y4=y5=good.y x_height;
z4=whatever[z1,z2]; z5=whatever[z2,z3];
draw z1--z2--z3;  % diagonals
draw z4--z5;  % bar
labels(1,2,3,4,5); endchar;

iff known there_exists: cmchar "Existential quantifier";
beginchar(there_exists,10u#,asc_height#,0);
italcorr asc_height#*slant;
adjust_fit(0,0); pickup rule.nib;
lft x1=hround u-eps; x2=x3=x5=w-x1; x4=x6-.25u=x1;
top y1=h; bot y4=0; y2=y1; y5=y6=.5[y1,y3]; y3=y4;
draw z1--z2--z3--z4;  % upper bar, stem, lower bar
draw z5--z6;  % middle bar
labels(1,2,3,4,5,6); endchar;

iff known false_that: cmchar "Logical not sign";
beginchar(false_that,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;

iff known less: cmchar "Less than sign";
compute_spread(5/4x_height#,3/2x_height#);
beginchar(less,14u#,v_center(spread#+rule_thickness#));
italcorr h#*slant-u#;
adjust_fit(0,0); pickup rule.nib;
lft x2=hround 1.5u-eps; x1=x3=w-x2;
y1-y3=spread; y2=.5[y1,y3]=math_axis;
draw z1--z2--z3;  % diagonals
labels(1,2,3); endchar;

iff known greater: cmchar "Greater than sign";
compute_spread(5/4x_height#,3/2x_height#);
beginchar(greater,14u#,v_center(spread#+rule_thickness#));
italcorr math_axis#*slant-u#;
adjust_fit(0,0); pickup rule.nib;
rt x2=hround(w-1.5u)+eps; x1=x3=w-x2;
y1-y3=spread; y2=.5[y1,y3]=math_axis;
draw z1--z2--z3;  % diagonals
labels(1,2,3); endchar;

iff known underbar: cmchar "Underbar suitable for < and >";
compute_spread((5/8+.45)*x_height#,(3/4+.55)*x_height#);
beginchar(underbar,14u#,0,spread#-math_axis#+.5rule_thickness#);
adjust_fit(0,0); pickup rule.nib;
lft x1=hround 1.5u-eps; x2=w-x1; bot y1=bot y2=-d;
draw z1--z2;  % bar
labels(1,2); endchar;

iff known neq: cmchar "Unequals sign";
compute_spread(.45x_height#,.55x_height#);
beginchar(neq,14u#,v_center(4spread#+rule_thickness#));
italcorr h#*slant-.5u#;
adjust_fit(0,0); pickup rule.nib;
lft x1=hround u-eps; x3=x1; x2=x4=w-x1;
y1=y2; y3=y4; y1-y3=spread; .5[y1,y3]=math_axis;
draw z1--z2; draw z3--z4;  % bars
lft x6=hround 3.5u-eps; x5=w-x6; top y5=h+o; bot y6=-d-o;
draw z5--z6;  % diagonal
labels(1,2,3,4,5,6); endchar;

iff known leq: cmchar "Less than or equal to sign";
compute_spread(.45x_height#,.55x_height#);
spread#':=spread#; spread':=spread; % the spread of `$=$'
compute_spread(5/4x_height#,3/2x_height#);
beginchar(leq,14u#,v_center(spread#'+spread#+rule_thickness#));
italcorr h#*slant-u#;
adjust_fit(0,0); pickup rule.nib;
lft x2=hround 1.5u-eps; x1=x3=w-x2;
y1-y3=spread; y2=.5[y1,y3]; top y1=h;
draw z1--z2--z3;  % diagonals
x8=x1; x9=x2; y8=y9; y3-y9=spread'; draw z8--z9;  % bar
labels(1,2,3,8,9); endchar;

iff known geq: cmchar "Greater than or equal to sign";
compute_spread(.45x_height#,.55x_height#);
spread#':=spread#; spread':=spread; % the spread of `$=$'
compute_spread(5/4x_height#,3/2x_height#);
beginchar(geq,14u#,v_center(spread#'+spread#+rule_thickness#));
italcorr h#*slant-u#;
adjust_fit(0,0); pickup rule.nib;
lft x1=hround 1.5u-eps; x2=w-x1; x3=x1;
y1-y3=spread; y2=.5[y1,y3]; top y1=h;
draw z1--z2--z3;  % diagonals
x8=x1; x9=x2; y8=y9; y3-y9=spread'; draw z8--z9;  % bar
labels(1,2,3,8,9); endchar;

iff known eqv: cmchar "Equivalence or congruence sign";
compute_spread(.45x_height#,.55x_height#);
beginchar(eqv,14u#,v_center(2spread#+rule_thickness#));
italcorr h#*slant-.5u#;
adjust_fit(0,0); pickup rule.nib;
lft x1=hround u-eps; x3=x5=x1; x2=x4=x6=w-x1;
y1=y2; y3=y4=math_axis; y5=y6; y1-y3=y3-y5=spread;
draw z1--z2;  % upper bar
draw z3--z4;  % middle bar
draw z5--z6;  % lower bar
labels(1,2,3,4,5,6); endchar;

iff known backslash: cmchar "Reverse slash (backslash)";
beginchar(backslash,9u#,body_height#,paren_depth#);
adjust_fit(0,0); pickup rule.nib;
lft x1=hround u-eps; top y1=h+eps;
rt x2=hround(w-u)+eps; bot y2=-d-eps;
draw z1--z2;  % diagonal
labels(1,2); endchar;

iff known vertical: cmchar "Vertical line";
beginchar(vertical,5u#,body_height#,paren_depth#);
italcorr body_height#*slant+.5rule_thickness#-2u#;
adjust_fit(0,0); pickup rule.nib;
x1=x2=good.x .5w; top y1=h+eps; bot y2=-d-eps;
draw z1--z2;  % stem
labels(1,2); endchar;

iff known cdot: cmchar "Period raised to axis height";
beginchar(cdot,5u#,v_center(7u#));
adjust_fit(0,0); pickup fine.nib;
numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#;
define_whole_blacker_pixels(dot_diam);
pos1(dot_diam,0); pos2(dot_diam,90);
lft x1l=hround(.5w-.5dot_diam); y1+.5dot_diam=vround(math_axis+.5dot_diam);
z1=z2; dot(1,2);  % dot
penlabels(1,2); endchar;

iff known diamond: cmchar "Diamond operator";
beginchar(diamond,9u#,v_center(7u#));
italcorr math_axis#*slant;
adjust_fit(0,0); pickup rule.nib;
numeric a; a=(lft 3.5u)*sqrt(3.14159/2); % an attempt to match circle area
x4=x8=good.x .5w; center_on(x4); x2=w-x6=good.x(x4+a);
y2=y6=.5[y4,y8]=math_axis; y8=good.y(y2+a);
draw z2--z4--z6--z8--cycle;  % bowl
labels(2,4,6,8); endchar;

iff known left_brace: cmchar "Left curly brace";
beginchar(left_brace,9u#,body_height#,paren_depth#);
italcorr body_height#*slant+.5vair#-u#;
adjust_fit(0,0); pickup fine.nib;
forsuffixes $=1,1',4,4',7,7': 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;
filldraw z1l{left}...z2l---z3l...{left}z4l
 --z4'l{right}...z5l---z6l...{right}z7l
 --z7r--z7'r{left}...z6r---z5r...{left}.5[z4r,z4'r]{right}
 ...z3r---z2r...{right}z1'r--z1r--cycle;  % stroke
penlabels(1,2,3,4,5,6,7); endchar;

iff known right_brace: cmchar "Right curly brace";
beginchar(right_brace,9u#,body_height#,paren_depth#);
italcorr math_axis#*slant+.5vair#-u#;
adjust_fit(0,0); pickup fine.nib;
forsuffixes $=1,1',4,4',7,7': 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=vair-fine;
filldraw z1r{right}...z2r---z3r...{right}z4r
 --z4'r{left}...z5r---z6r...{left}z7r
 --z7l--z7'l{right}...z6l---z5l...{right}.5[z4l,z4'l]{left}
 ...z3l---z2l...{left}z1'l--z1l--cycle;  % stroke
penlabels(1,2,3,4,5,6,7); endchar;

iff known straight_quotes: cmchar "Straight double quotes";
beginchar(straight_quotes,9u#,asc_height#,0);
numeric top_width#,spread#; top_width#=if serifs: flare# else: stem# fi;
spread#=max(3u#,top_width#+.5u#); define_pixels(spread);
italcorr asc_height#*slant+.5top_width#+.5spread#-4u#;
adjust_fit(0,0);
x1=x2; x3=x4=w-x1; x3-x1=spread+2; y1=y3;
y2=y4=max(.5[bar_height,x_height]+.5vair,h-x_height);
if serifs: pickup crisp.nib; pos1(flare,0); pos2(vair,0);
 pos3(flare,0); pos4(vair,0);
 y1+.5stem=h; filldraw circ_stroke z1e--z2e;  % left stem and bulb
 filldraw circ_stroke z3e--z4e;  % right stem and bulb
else: pickup fine.nib; pos1(stem,0); pos2(vair,0);
 pos3(stem,0); pos4(vair,0);
 top y1=h; filldraw stroke z1e--z2e;  % left stem
 filldraw stroke z3e--z4e; fi  % right stem
penlabels(1,2,3,4); endchar;

iff known infty: cmchar "Infinity";
beginchar(infty,18u#,x_height#,0);
italcorr .7x_height#*slant-.5u#;
adjust_fit(0,0); pickup fine.nib;
numeric theta,phi;
if monospace: phi=-theta=90;
else: phi=angle(4u,h); theta=angle(6u,-h); fi
pos1(vair,180); pos2(.5[vair,curve],90+.5theta); pos3(curve,90+theta);
pos4(curve,90+theta); pos5(.5[vair,curve],90+.5theta);
pos6(vair,180); pos7(.2[vair,curve],270+.5phi);
pos8(.3[vair,curve],270+phi); pos9(.2[vair,curve],270+.5phi);
lft x1r=w-rt x6l=hround u; x2=x9=.4[x1,x8]; x5=x7=.6[x8,x6];
if monospace: x2l:=x2r; x5r:=x5l; x7r:=x7l; x9l:=x9r; fi
y1=y6=.5h; top y2r=top y7l=h+oo; bot y5l=bot y9r=-oo;
x8=.5[x3,x4]=.5w; y8=.5[y3,y4]=.5h;
y3-y4=h/3; z3-z4=whatever*dir theta;
filldraw stroke z1e{up}...z2e{right}...z3e---z4e...z5e{right}
 ...z6e{up}...z7e{left}...{-dir phi}z8e...{left}z9e...z1e{up}; % bowls
penlabels(1,2,3,4,5,6,7,8,9); endchar;

iff known integral: cmchar "Integral sign";
beginchar(integral,5.25u#+max(1.25u#,stem#)+2max(1.5u#,curve#),
 asc_height#,desc_depth#);
italcorr asc_height#*slant-.5u#;
adjust_fit(0,0); pickup fine.nib;
pos1(curve,0); pos2(hair,0); pos3(vair,90); pos4(.6[hair,stem],180);
pos5(stem,180); pos5'(stem,0); z5'=z5; pos6(.6[hair,stem],0);
pos7(vair,-90); pos8(hair,-180); pos9(curve,-180);
x7=w-x3=2.4u; rt x1r=max(rt x3+eps,hround(w-u)); x9=w-x1;
x5=.5[x4,x6]; x4-x6=1.5u; lft x5r=hround(.5w-.5stem);
y9-.5curve=vround(-.9d-o+vair); y3-y1=y9-y7;
top y3r=h+o; bot y7r=-d-o; y5=.5[y3,y7]=.5[y4,y6]; y4-y6=2/3(y3-y7);
bulb(3,2,1); bulb(7,8,9);  % bulbs
filldraw stroke z3e{left}...z4e{(z5e-z4e)xscaled 1.1}
 ..tension atleast 1 and atleast .8..{z5-z4}z5e;  % upper stem
filldraw stroke z5'e{z6-z5}..tension atleast.8 and atleast 1
 ..{(z6e-z5'e)xscaled 1.1}z6e...{left}z7e;  % lower stem
math_fit(0,-2u#); penlabels(1,2,3,4,5,6,7,8,9); endchar;

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.