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

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


%%% ====================================================================
%%%  @METAFONT-file{
%%%     author-1        = "Jeremy Gibbons",
%%%     author-2        = "Alan Jeffrey",
%%%     version         = "1.1",
%%%     date            = "02 June 1992",
%%%     time            = "15:06:36 BST",
%%%     filename        = "stmaryjg.mf",
%%%     address-1       = "Department of Computer Science
%%%                        University of Aukland
%%%                        Private Bag
%%%                        Aukland
%%%                        New Zealand",
%%%     address-2       = "School of Cognitive and Computing Sciences
%%%                        University of Sussex
%%%                        Brighton BN1 9QH
%%%                        UK",
%%%     telephone-1     = "+64 9 373 7599 x 5120",
%%%     telephone-2     = "+44 273 606755 x 3238",
%%%     FAX-1           = "+64 9 373 7453",
%%%     FAX-2           = "+44 273 678188",
%%%     checksum        = "58461 600 2192 23548",
%%%     email-1         = "jeremy@cs.aukuni.ac.nz",
%%%     email-2         = "alanje@cogs.sussex.ac.uk",
%%%     codetable       = "ISO/ASCII",
%%%     keywords        = "metafont symbols math fonts",
%%%     supported       = "yes",
%%%     abstract        = "This is part of the metafont program for
%%%                        the St Mary's Road symbol font.",
%%%     docstring       = "This is part of the metafont program for
%%%                        the St Mary's Road symbol font.  The font
%%%                        contains a number of mathematical
%%%                        characters which are not present in the
%%%                        standard TeX and AMS symbol fonts.
%%%
%%%                        It is described in stmaryrd.tex.
%%%
%%%                        Copyright 1992 Jeremy Gibbons and Alan Jeffrey.
%%%
%%%                        The checksum field above contains a CRC-16
%%%                        checksum as the first value, followed by the
%%%                        equivalent of the standard UNIX wc (word
%%%                        count) utility output of lines, words, and
%%%                        characters.  This is produced by Robert
%%%                        Solovay's checksum utility.",
%%%     package         = "St Mary's Road",
%%%     dependencies    = "none",
%%%  }
%%% ====================================================================
%%%
%%% 20 May 1991, v1.0: Created the file out of galileo.mf.
%%%
%%% 2 Jun 1992, v1.1: added the headers.

% These are Jeremy's symbols for the St Mary's Road font, stmaryrd.mf.

iff known short_left_arrow: cmchar "Short leftwards arrow";
compute_spread(.45x_height#,.55x_height#);
beginchar(short_left_arrow,14u#,v_center(spread#+rule_thickness#));
adjust_fit(0,0); pickup crisp.nib;
pos1(rule_thickness,90); pos2(rule_thickness,90); pos3(bar,0); pos4(bar,0);
y0=y1=y2=math_axis; x1+.5rule_thickness=hround(w-u); lft x0=hround u;
y3-y0=y0-y4=.24asc_height+eps; x3=x4=x0+3u+eps;
pos5(bar,angle(z4-z0)); z5l=z0; pos6(bar,angle(z3-z0)); z6l=z0;
z9=.381966[.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 short_right_arrow: cmchar "Short rightwards arrow";
compute_spread(.45x_height#,.55x_height#);
beginchar(short_right_arrow,14u#,v_center(spread#+rule_thickness#));
adjust_fit(0,0); pickup crisp.nib;
pos1(rule_thickness,90); pos2(rule_thickness,90); pos3(bar,0); pos4(bar,0);
y0=y1=y2=math_axis; x1-.5rule_thickness=hround u; rt x0=hround(w-u);
y3-y0=y0-y4=.24asc_height+eps; x3=x4=x0-3u-eps;
pos5(bar,angle(z4-z0)); z5l=z0; pos6(bar,angle(z3-z0)); z6l=z0;
z9=.381966[.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 short_up_arrow: cmchar "Upward arrow";
beginchar(short_up_arrow,9u#,
   if monospace: 27/7u#+math_axis#,27/7u#-math_axis#
           else: 6u#+math_axis#,6u#-math_axis#
   fi);
italcorr .76asc_height#*slant+.5crisp#-u#;
adjust_fit(0,0); pickup crisp.nib;
pos1(rule_thickness,0); pos2(rule_thickness,0);
pos3(bar,90); pos4(bar,90);
lft x1l=hround(.5w-.5rule_thickness); y1-.5rule_thickness=-d;
x0=x1=x2; top y0=h; x0-x3=x4-x0=3u+eps;
y3=y4=y0-.24asc_height-eps;
pos5(bar,angle(z4-z0)); z5l=z0;
pos6(bar,angle(z3-z0)); z6l=z0;
z9=.381966[.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 short_down_arrow: cmchar "Downward arrow";
beginchar(short_down_arrow,9u#,
   if monospace: 27/7u#+math_axis#,27/7u#-math_axis#
           else: 6u#+math_axis#,6u#-math_axis#
   fi);
italcorr .76asc_height#*slant+.5crisp#-u#;
adjust_fit(0,0); pickup crisp.nib;
pos1(rule_thickness,0); pos2(rule_thickness,0);
pos3(bar,90); pos4(bar,90);
lft x1l=hround(.5w-.5rule_thickness); y1+.5rule_thickness=h;
x0=x1=x2; bot y0=-d; x0-x3=x4-x0=3u+eps;
y3=y4=y0+.24asc_height+eps;
pos5(bar,angle(z4-z0)); z5l=z0;
pos6(bar,angle(z3-z0)); z6l=z0;
z9=.381966[.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 Y_up: cmchar "Fork (upside-down Y)";
beginchar(Y_up,10u#,6u#+math_axis#,5u#-math_axis#); pickup rule.nib;
adjust_fit(0,0);
x1=.5w; top y1=h-u;
x2=x1; y2=math_axis;
lft x3=u; rt x4=w-u; bot y3 = -d+u; y4=y3;
draw z1--z2; draw z3--z2--z4;
labels(1,2,3,4); endchar;

iff known Y_down: cmchar "Join (Y)";
beginchar(Y_down,10u#,5u#+math_axis#,6u#-math_axis#); pickup rule.nib;
adjust_fit(0,0);
x1=.5w; bot y1=-d+u;
x2=x1; y2=math_axis;
lft x3=u; rt x4=w-u; top y3 = h-u; y4=y3;
draw z1--z2; draw z3--z2--z4;
labels(1,2,3,4); endchar;

iff known Y_left: cmchar "Leftwards pointing Y -<";
beginchar(Y_left,11u#,5u#+math_axis#,5u#-math_axis#); pickup rule.nib;
adjust_fit(0,0);
lft x1=hround u; x2=6u; y1=y2=vround math_axis;
rt x3=rt x4=hround(w-u); top y3=vround(h-u)+eps; bot y4=vround(u-d)+eps;
draw z1--z2; draw z3--z2--z4;
labels(1,2,3,4); endchar;

iff known Y_right: cmchar "Rightwards pointing Y >-";
beginchar(Y_right,11u#,5u#+math_axis#,5u#-math_axis#); pickup rule.nib;
adjust_fit(0,0);
rt x1=hround(w-u); x2=5u; y1=y2=vround math_axis;
lft x3=lft x4=hround u; top y3=vround(h-u)+eps; bot y4=vround(u-d)+eps;
draw z1--z2; draw z3--z2--z4;
labels(1,2,3,4); endchar;

iff known var_curly_vee: cmchar "Zipwith symbol";
beginchar(var_curly_vee,12u#,asc_height#,asc_depth#);
adjust_fit(0,0); pickup rule.nib;
x2=good.x .5w; w:=r:=2x2;
lft x1=0; x3=w-x1;
top y1=h; bot y2=-d-o; y3=y1;
x4=x2; y4=x_height;
draw z1{z4-z1}..{down}z2;  % left arm
draw z3{z4-z3}..{down}z2;  % right arm
labels(1,2,3,4); endchar;

iff known var_curly_wedge: cmchar "Upside-down zipwith symbol";
beginchar(var_curly_wedge,12u#,asc_height#,asc_depth#);
adjust_fit(0,0); pickup rule.nib;
x2=good.x .5w; w:=r:=2x2;
lft x1=0; x3=w-x1;
top y2=h; bot y1=-d-o; y3=y1;
x4=x2; y4=h-(x_height+d);
draw z1{z4-z1}..{up}z2;  % left arm
draw z3{z4-z3}..{up}z2;  % right arm
labels(1,2,3,4); endchar;

iff known minus_o: cmchar "Above sign";    % Parts nicked from "plus"
beginchar(minus_o,14u#,5u#+math_axis#,5u#-math_axis#); pickup rule.nib;
adjust_fit(0,0);
%x11=x12=good.x .5w; top y11=h+eps; .5[y11,y12]=math_axis;
lft x13=hround u-eps; x14=w-x13; y13=y14=math_axis;
%draw z11--z12;  % stem
draw z13--z14;  % crossbar
top y8=vround h-u-eps; y8-math_axis = math_axis-y4; x4=.5w; .5(y8-y4) = x2-x4;
circle_points; draw_circle;  % circle
labels(1,2,3,4,5,6,7,8,13,14); endchar;

iff known bar_o: cmchar "Beside sign";
beginchar(bar_o,10u#,6u#+math_axis#,6u#-math_axis#); pickup rule.nib;
adjust_fit(0,0);
x11=x12=good.x .5w; top y11=h+eps; .5[y11,y12]=math_axis;
%lft x3=hround u-eps; x4=w-x3; y3=y4=math_axis;
draw z11--z12;  % stem
%draw z3--z4;  % crossbar
lft x6=hround u; x2=w-x6; y2=math_axis; y8-y2 = .5(x2-x6);
circle_points; draw_circle;  % circle
penlabels(1,2,3,4,5,6,7,8,11,12); endchar;

iff known sslash: cmchar "Double forwards slash";
beginchar(sslash,9u#+slash_separation#,body_height#, paren_depth#);
adjust_fit(0,0); pickup rule.nib;
lft x2=hround u-eps; bot y4=bot y2=-d-eps;
rt x3=hround(w-u)+eps; top y3=top y1= h+eps;
x1=x3-hround slash_separation;
x4=x2+hround slash_separation;
draw z1--z2; draw z3--z4;
penlabels(1,2,3,4);
endchar;

iff known bbslash: cmchar "Double backwards slash";
beginchar(bbslash,9u#+slash_separation#,body_height#, paren_depth#);
adjust_fit(0,0); pickup rule.nib;
lft x2=hround u-eps; bot y3=bot y1=-d-eps;
rt x3=hround(w-u)+eps; top y4=top y2= h+eps;
x1=x3-hround slash_separation;
x4=x2+hround slash_separation;
draw z1--z2; draw z3--z4;
penlabels(1,2,3,4);
endchar;

iff known moo: cmchar "Moo (Chinese for `tree')";
beginarithchar(moo); pickup rule.nib;
if .5w <> good.x .5w: change_width; fi
x1= .5w; y1-y3=y3-y7;
lft x3=hround 2u-eps; x4=w-x3; y3=y4=math_axis;
z2 = .5[z3,z4];
lft x5=hround 2u-eps; x6=w-x5; y6=y5=.3[y7,y3];
x7 = .4[x5,x1]; x8=w-x7; bot y7 = vround -o; y8=y7;
draw z1--z2{down}..z7{left}..z5;  % left leg
draw z1--z2{down}..z8{right}..z6;  % right leg
draw z3--z4;  % crossbar
labels(1,2,3,4,5,6,7,8); endchar;

iff known var_o_times: cmchar "Circular circle-times operator";
begincircle(var_o_times);
draw z1--z5; draw z3--z7;  % diagonals
labels(1,2,3,4,5,6,7,8); endchar;

iff known var_o_ast: cmchar "Circular circle-asterisk operator";
begincircle(var_o_ast);
z0=.5[z2,z6]; % centre of circle
numeric ast_flare; ast_flare=hround .7[thin_join,stem];
for d=-150 step 60 until 150: z[d]=z0+.7dir d scaled (y8-y2); % ie scaled radius
 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,1,2,3,4,5,6,7,8); endchar;

iff known var_o_bar: cmchar "Circular circle-bar operator";
begincircle(var_o_bar);
draw z4--z8;  % bar
labels(1,2,3,4,5,6,7,8); endchar;

iff known var_o_dot: cmchar "Circle-dot operator";
begincircle(var_o_dot);
fill fullcircle scaled(1.3dot_size+eps) shifted(.5[z4,z8]);  % dot
labels(1,2,3,4,5,6,7,8); endchar;

iff known var_o_slash: cmchar "Circular circle-slash operator";
begincircle(var_o_slash);
draw z1--z5;  % diagonal
labels(1,2,3,4,5,6,7,8); endchar;

iff known var_o_bslash: cmchar "Circular circle-backslash operator";
begincircle(var_o_bslash);
draw z3--z7;  % diagonal
labels(1,2,3,4,5,6,7,8); endchar;

iff known var_o_circle: cmchar "Circular circle-circle operator";
begincircle(var_o_circle);
z0=.5[z2,z6]; % centre of circle
for i = 1 upto 8:
   z[i+8]=.5[z0,z[i]];
endfor;
draw z16{right}...z9{z10-z16}...z10{down}...z11{z12-z10}...z12{left}
  ...z13{z14-z12}...z14{up}...z15{z16-z14}...cycle; % inner circle
labels(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); endchar;

iff known var_o_plus: cmchar "Circular circle-plus operator";
begincircle(var_o_plus);
draw z2--z6; draw z4--z8;  % bar and stem
labels(1,2,3,4,5,6,7,8); endchar;

iff known var_o_minus: cmchar "Circular circle-minus operator";
begincircle(var_o_minus);
draw z2--z6;  % bar
labels(1,2,3,4,5,6,7,8); endchar;

% Changed hround to floor in the following to make sure that x1<>x2,
% otherwise theta ends up being angle(0,0).   AJ.

iff known box_ast: cmchar "Box_ast operator";
beginbox(box_ast);
z0=.5[z1,z3];
numeric ast_flare; ast_flare=hround .7[thin_join,stem];
for d=-150 step 60 until 150: z[d]=z0+.7dir d scaled .5(x2-x1); % ie scaled `radius'
 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,1,2,3,4); endchar;

iff known box_bar: cmchar "Box_bar operator";
beginbox(box_bar);
draw .5[z1,z2]--.5[z3,z4];
labels(1,2,3,4); endchar;

iff known box_dot: cmchar "Box_dot operator";
beginbox(box_dot);
fill fullcircle scaled(1.3dot_size+eps) shifted(.5[z1,z3]);  % dot
labels(1,2,3,4); endchar;

iff known box_slash: cmchar "Box_slash operator";
beginbox(box_slash);
draw z2--z4;
labels(1,2,3,4); endchar;

iff known box_bslash: cmchar "Box_bslash operator";
beginbox(box_bslash);
draw z1--z3;
labels(1,2,3,4); endchar;

iff known box_circle: cmchar "Box_circle operator";
beginarithchar(box_circle);
if .5w <> good.x .5w: change_width; fi
pickup rule.nib; autorounded;
lft x11=hround 1.5u; x12=w-x11; x13=x12; x14=x11;
y11-y14 = x12-x11; .5[y11,y14]=math_axis; y11=y12; y13=y14;
lft x6=hround .25[x11,x12]; x2=w-x6; y2=math_axis; y8-y2 = .5(x2-x6);
circle_points; draw_circle;  % circle
draw z11--z12--z13--z14--cycle; % box
labels(11,12,13,14); endchar;

iff known box_box: cmchar "Box_box operator";
beginbox(box_box);
z0=.5[z1,z3];
for i = 1 upto 4: z[i+4]=.4[z0,z[i]]; endfor
draw z5--z6--z7--z8--cycle;
labels(1,2,3,4); endchar;

iff known box_empty: cmchar "Box operator";
beginbox(box_empty);
labels(1,2,3,4); endchar;   % like LaTeX Box, only with less side bearing

iff known lightning: cmchar "Lightning strike";    % Adapted from sswarrow
beginchar(lightning,11u#,asc_height#,asc_depth#);
adjust_fit(0,0); pickup crisp.nib;
x1+.5rule_thickness=hround(w-u); lft x0=hround 3u;
y1+.5rule_thickness=h; bot y0=-d;
numeric theta,delta; theta=angle(z1-z0); delta=3u++.24asc_height;
if abs(theta-45)<2.5: theta:=45; y1:=y0+x1-x0; fi % near-45$^\circ$ angle
pos1(rule_thickness,-90+theta); pos2(rule_thickness,-90+theta);
pos3(bar,-180+theta); pos4(bar,-180+theta);
    %y3=y0; x4=x0; x3-x0=y4-y0=delta+eps;
y10=y0; x11=x0; x10-x0=y11-y0=delta+eps;   % Can now do arrows of any angle
z3=z10 rotatedaround(z0,theta-45);
z4=z11 rotatedaround(z0,theta-45);
pos5(bar,theta+45); z5l=z0; pos6(bar,theta-45); z6l=z0;
z9=.381966[.5[z3,z4],z0];
numeric t; path p; p=z4l{z9-z4}..z6r;
t=xpart(p intersectiontimes (z1l--(z1l+2(z0-z1)))); z2l=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
z20=.45[z1,z2];
z21=z22 + .55(z2-z1);
x22=x1-3u; y22=y1;
pickup rule.nib; draw z2--z20--z21--z22; % stem
penlabels(0,1,2,3,4,5,6,9); endchar;

iff known merge: cmchar "Merge symbol";
beginchar(merge,16u#,asc_height#,0);
adjust_fit(0,0); pickup rule.nib;
lft x1=hround 1.1u; x3 = .65[x1,x6]; x2 = .5[x1,x3];
y2=h+o; bot y1=0; y3 = y1;
x6=w-x1; y6=y1;
z4-z1 = z5-z2 = z6-z3;
draw z1---z2---z3;  % left-hand
draw z4--z5--z6;  % right-hand
labels(1,2,3,4,5,6); endchar;

iff known var_times: cmchar "Cartesian Product operator";  % bits of this taken
beginchar(var_times,10u#,asc_height#,0);                   % from "exists"
adjust_fit(0,0); pickup rule.nib;
lft x1=hround u-eps; x2=x3=w-x1; x4=x1;
top y1=h; bot y4=0; y2=y1; y3=y4;
draw z1--z3; draw z2--z4;  % diagonals
labels(1,2,3,4); endchar;

iff known fat_semi: cmchar "Fat semicolon";
beginchar(fat_semi,6u#,0.5[x_height#,asc_height#],comma_depth#);
adjust_fit(0,0); pickup rule.nib; autorounded;
lft x3=lft x7=hround u; rt x1=rt x5=hround(w-u); x2=x4=x6=x8=w/2;
top y4=h; bot y6=0; y4-y2=y8-y6=x1-x3; y1=y3=0.5[y2,y4];
y5=y7=0.5[y6,y8]; lft x9=2u; bot y9=-d;
draw z1..z2..z3..z4..cycle;
draw z5{down}..z6..z7..z8..z5{down}..{curl 0}z9;
labels(1,2,3,4,5,6,7,8,9); endchar;

iff known ssw_arrow: cmchar "Southsouthwest arrow";
beginchar(ssw_arrow,11u#,asc_height#,asc_depth#);
adjust_fit(0,0); pickup crisp.nib;
x1+.5rule_thickness=hround(w-u); lft x0=hround 3u;  % This 3u used to be a u in
y1+.5rule_thickness=h; bot y0=-d;                   % the program for swarrow.
                                                    % 3u (with width 11u) gives
                                                    % arrow parallel to langle.
numeric theta,delta; theta=angle(z1-z0); delta=3u++.24asc_height;
if abs(theta-45)<2.5: theta:=45; y1:=y0+x1-x0; fi % near-45$^\circ$ angle
pos1(rule_thickness,-90+theta); pos2(rule_thickness,-90+theta);
pos3(bar,-180+theta); pos4(bar,-180+theta);
    %y3=y0; x4=x0; x3-x0=y4-y0=delta+eps;
y10=y0; x11=x0; x10-x0=y11-y0=delta+eps;   % Can now do arrows of any angle
z3=z10 rotatedaround(z0,theta-45);
z4=z11 rotatedaround(z0,theta-45);
pos5(bar,theta+45); z5l=z0; pos6(bar,theta-45); z6l=z0;
z9=.381966[.5[z3,z4],z0];
numeric t; path p; p=z4l{z9-z4}..z6r;
t=xpart(p intersectiontimes (z1l--(z1l+2(z0-z1)))); z2l=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 sse_arrow: cmchar "Southsoutheast arrow";
beginchar(sse_arrow,11u#,asc_height#,asc_depth#);
adjust_fit(0,0); pickup crisp.nib;
x1-.5rule_thickness=hround u; rt x0=hround(w-3u);
y1+.5rule_thickness=h; bot y0=-d;
numeric theta,delta; theta=angle(z0-z1); delta=3u++.24asc_height;
if abs(theta+45)<2.5: theta:=-45; y1:=y0+x0-x1; fi % near-45$^\circ$ angle
pos1(rule_thickness,90+theta); pos2(rule_thickness,90+theta);
pos3(bar,theta); pos4(bar,theta);
   %x3=x0; y4=y0; y3-y0=x0-x4=delta+eps;
x10=x0; y11=y0; y10-y0=x0-x11=delta+eps;
z3=z10 rotatedaround(z0,theta+45);
z4=z11 rotatedaround(z0,theta+45);
pos5(bar,theta+225); z5l=z0; pos6(bar,theta+135); z6l=z0;
z9=.381966[.5[z3,z4],z0];
numeric t; path p; p=z4l{z9-z4}..z6r;
t=xpart(p intersectiontimes (z1l--(z1l+2(z0-z1)))); z2l=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 curly_wedge_up_arrow:
cmchar "Upwards accumulate symbol";
beginchar(curly_wedge_up_arrow,12u#,asc_height#,asc_depth#);
adjust_fit(0,0); pickup rule.nib;
x2=good.x .5w; w:=r:=2x2;
lft x1=0; x3=w-x1;
bot y1=-d; top y2=h+o; y3=y1;
x4=x2; y4=h-(x_height+d);
pickup crisp.nib;
pos11(rule_thickness,0); pos12(rule_thickness,0);     % arrow head nicked from
pos13(bar,90); pos14(bar,90);                         % up_arrow
lft x11l=hround(.5w-.5rule_thickness); y11-.5rule_thickness=-d;
x10=x11=x12; top y10=top y2; x10-x13=x14-x10=3u+eps;
y13=y14=y10-.24asc_height-eps;
pos15(bar,angle(z14-z10)); z15l=z10;
pos16(bar,angle(z13-z10)); z16l=z10;
z19=.381966[.5[z13,z14],z10];
numeric t; path p; p=z14l{z19-z14}..z16r;
t=xpart(p intersectiontimes((x12r,-d)--(x12r,h))); y12=ypart point t of p;
filldraw z10..{z14-z19}z14r--subpath (0,t) of\\(z14l{z19-z14}..z16r)
 --z12r
 -- % ---z11r..z11l---
 z12l--subpath (t,0) of\\(z13l{z19-z13}..z15r)
 --z13r{z19-z13}..z10 & cycle;  % arrowhead
pickup rule.nib;
numeric t; path p; p=z1{z4-z1}..{up}z2;
t=xpart(p intersectiontimes((0,y12)--(w,y12)));
draw subpath (0,t) of\\(z1{z4-z1}..{up}z2);  % left arm
draw subpath (0,t) of\\(z3{z4-z3}..{up}z2);  % right arm
penlabels(10,11,12,13,14,15,16,19);
labels(1,2,3,4); endchar;

iff known curly_wedge_down_arrow:
cmchar "Downwards accumulate symbol";
beginchar(curly_wedge_down_arrow,12u#,asc_height#,asc_depth#);
adjust_fit(0,0); pickup rule.nib;
x2=good.x .5w; w:=r:=2x2;
lft x1=0; x3=w-x1;
bot y1=-d; top y2=h+o; y3=y1;
x4=x2; y4=h-(x_height+d);
pickup crisp.nib;
numeric theta,delta; theta=angle(z4-z1); delta=3u++.24asc_height;
pos11(rule_thickness,-90+theta); pos12(rule_thickness,-90+theta);
pos13(bar,-180+theta); pos14(bar,-180+theta);
lft x10=0; bot y10=-d;
x11=w; z11=z10+whatever*(dir theta);  % where the arrow stem would go
y13a=y10; x14a=x10; x13a-x10=y14a-y10=delta+eps;
z13=z13a rotatedaround(z10,theta-45);
z14=z14a rotatedaround(z10,theta-45);
pos15(bar,theta+45); z15l=z10; pos16(bar,theta-45); z16l=z10;
z19=.381966[.5[z13,z14],z10];
numeric t; path p; p=z14l{z19-z14}..z16r;
t=xpart(p intersectiontimes (z11l--(z11l+2(z10-z11)))); z12l=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;  % left arrowhead
numeric theta,delta; theta=angle(z3-z4); delta=3u++.24asc_height;
pos21(rule_thickness,90+theta); pos22(rule_thickness,90+theta);
pos23(bar,theta); pos24(bar,theta);
rt x20=w; bot y20=-d;
x21=0; z21=z20+whatever*-(dir theta);  % where the arrow stem would go
x23a=x20; y24a=y20; y23a-y20=x20-x24a=delta+eps;
z23=z23a rotatedaround(z20,theta+45);
z24=z24a rotatedaround(z20,theta+45);
pos25(bar,theta+225); z25l=z20; pos26(bar,theta+135); z26l=z20;
z29=.381966[.5[z23,z24],z20];
numeric t; path p; p=z24l{z29-z24}..z26r;
t=xpart(p intersectiontimes (z21l--(z21l+2(z20-z21)))); z22l=point t of p;
filldraw z20..{z24-z29}z24r
 --subpath (0,t) of\\(z24l{z29-z24}..z26r)
 --z22l
 -- % ---z21l..z21r---
 z22r
 --subpath (t,0) of\\(z23l{z29-z23}..z25r)
 --z23r{z29-z23}..z20 & cycle;  % right arrowhead
pickup rule.nib;
numeric t; path p; p=z2{down}..{z1-z4}z1;
t=xpart(p intersectiontimes(z12l--z12r));
draw subpath (0,t) of\\(z2{down}..{z1-z4}z1);  % left arm
draw subpath (0,t) of\\(z2{down}..{z3-z4}z3);  % right arm
penlabels(10,11,12,13,14,15,16,19);
labels(1,2,3,4); endchar;

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

iff known fat_bslash: cmchar "Fat reverse slash";
beginchar(fat_bslash,13u#,body_height#,paren_depth#);
numeric fatness; fatness = w-9u;
adjust_fit(0,0); pickup rule.nib;
lft x1=hround u-eps; top y1=h+eps; z4 = z1+fatness*right;
rt x2=hround(w-fatness-u)+eps; bot y2=-d-eps; z3 = z2+fatness*right;
draw z1--z2--z3--z4--z1;  % diagonal
labels(1,2); endchar;

iff known l_bag: cmchar "Left bag bracket";
beginchar(l_bag,8u#,body_height#,paren_depth#);
      % ht and dp from "left parenthesis" symbol
adjust_fit(0,0); pickup rule.nib;
lft x0=u; y0=h-2u;
x1=1/2[x0,x2]; top y1=h;
x2=2/3[x0,x3]; y2=y0;
bot rt z3=(w-u,-d);
draw z0..z1{right}..z2{down}..{right}z3;
penlabels(0,1,2,3); endchar;

iff known r_bag: cmchar "Right bag bracket";
beginchar(r_bag,8u#,body_height#,paren_depth#);
adjust_fit(0,0); pickup rule.nib;
rt x0=w-u; y0=h-2u;
x1=1/2[x0,x2]; top y1=h;
x2=2/3[x0,x3]; y2=y0;
bot lft z3=(u,-d);
draw z0..z1{left}..z2{down}..{left}z3;
penlabels(0,1,2,3); endchar;

iff known var_big_circ: cmchar "Circular circle for copyright, etc.";
beginchar(var_big_circ,18u#,asc_height#,desc_depth#); autorounded;
adjust_fit(if monospace:-3u#,-3u# else: 0,0 fi); pickup rule.nib;
lft x6=hround u; x2=w-x6; y2=.5[h+o,-d-o]; y8-y2 = .5(x2-x6);
circle_points; draw_circle;  % circle
labels(1,2,3,4,5,6,7,8); 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.