summaryrefslogtreecommitdiff
path: root/fonts/knot
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /fonts/knot
Initial commit
Diffstat (limited to 'fonts/knot')
-rw-r--r--fonts/knot/README45
-rw-r--r--fonts/knot/bits.mf207
-rw-r--r--fonts/knot/do2knots.mf53
-rw-r--r--fonts/knot/doknots.mf52
-rw-r--r--fonts/knot/found.mf177
-rw-r--r--fonts/knot/knot.mf37
-rw-r--r--fonts/knot/knot.tex37
-rw-r--r--fonts/knot/knot1.mf39
-rw-r--r--fonts/knot/knot2.mf39
-rw-r--r--fonts/knot/knot3.mf39
-rw-r--r--fonts/knot/knot4.mf39
-rw-r--r--fonts/knot/knot5.mf39
-rw-r--r--fonts/knot/knot6.mf39
-rw-r--r--fonts/knot/knot7.mf39
-rw-r--r--fonts/knot/knots.mf39
-rw-r--r--fonts/knot/sides.mf195
-rw-r--r--fonts/knot/soloman.mf125
-rw-r--r--fonts/knot/testknot.tex51
-rw-r--r--fonts/knot/tri.mf38
19 files changed, 1329 insertions, 0 deletions
diff --git a/fonts/knot/README b/fonts/knot/README
new file mode 100644
index 0000000000..c24f860d81
--- /dev/null
+++ b/fonts/knot/README
@@ -0,0 +1,45 @@
+ Celtic Knotwork Font
+
+ The metafont source comprises the following files.
+
+ knot1.mf These are the base files for seven different
+ knot2.mf styles of knotwork. You can create your own
+ knot3.mf by modifying the parameters set in these.
+ knot4.mf
+ knot5.mf
+ knot6.mf
+ knot7.mf
+
+ doknots.mf This files sets up the macros according to the
+ base parpameters.
+ soloman.mf This creates the parts for the Soloman Knot.
+ found.mf This creates the parts for the Foundation Knot.
+ sides.mf This has different styles of intersections.
+ bits.mf This has general box drawing characters and
+ bits for ornamentation.
+
+ testknot.tex This is a comprehensive display of the seven
+ knotwork types and how one might display them.
+
+ In general to use them in TeX you must set up a box with
+\obeylines, \obeyspaces, \baselineskip=0pt, and \lineskip=0pt. This is
+to ensure there are no gaps between vertical characters.
+ The best way I've discovered in LaTeX is to use a center
+environment with a \nointerlineskip after each \\.
+ I would greatly appreciate any macros people work out for using
+the knotwork characters in. I would especially like to see some sort of
+tabular environment or a border creation macro.
+
+ Known bugs:
+ I don't think it works at other than normal magnification.
+ I'm probably using an unshapred value where I should be using
+ a sharped value or vice versa.
+ The width of the path appears to change on the
+ straight vertical or horizontal strokes.
+ My screen driver shows gaps between some characters. I do
+ not see these on my printer though.
+ Some joints appear a bit kinked. Not badly enough to
+ detract from sight.
+
+ Send all comments, bugs and improvementes to Jo Jaquina,
+ jaymin@maths.tcd.ie
diff --git a/fonts/knot/bits.mf b/fonts/knot/bits.mf
new file mode 100644
index 0000000000..2693d47d44
--- /dev/null
+++ b/fonts/knot/bits.mf
@@ -0,0 +1,207 @@
+beginchar ("0", sqwid#, sqht#, 0); "bit 0";
+ pickup thin_pen;
+
+ z1 = (0,0);
+ z2 = (w,0);
+ z3 = (w,h);
+ z4 = (0,h);
+ draw z1--z2--z3--z4--cycle;
+endchar;
+
+beginchar ("1", sqwid#, sqht#, 0); "bit 1";
+ pickup thin_pen;
+
+ z1 = (0,0);
+ z2 = (w,0);
+ z3 = (w,h);
+ z4 = (0,h);
+ z5 = (1/7w,1/7h);
+ z6 = (6/7w,1/7h);
+ z7 = (6/7w,6/7h);
+ z8 = (1/7w,6/7h);
+ draw z1--z2--z3--z4--cycle;
+ draw z5--z6--z7--z8--cycle;
+ pickup pensquare xscaled (1/7w) yscaled (1/7h) shifted (1/14w, 1/14h);
+ drawdot (1/7w, 1/7h);
+ drawdot (3/7w, 1/7h);
+ drawdot (5/7w, 1/7h);
+ drawdot (2/7w, 2/7h);
+ drawdot (4/7w, 2/7h);
+ drawdot (1/7w, 3/7h);
+ drawdot (3/7w, 3/7h);
+ drawdot (5/7w, 3/7h);
+ drawdot (2/7w, 4/7h);
+ drawdot (4/7w, 4/7h);
+ drawdot (1/7w, 5/7h);
+ drawdot (3/7w, 5/7h);
+ drawdot (5/7w, 5/7h);
+endchar;
+
+beginchar ("2", sqwid#, sqht#, 0); "bit 2";
+ pickup thin_pen;
+
+ z1 = (0,0);
+ z2 = (w,0);
+ z3 = (w,h);
+ z4 = (0,h);
+ z5 = (0,.75h);
+ z6 = (.25w,.75h);
+ z7 = (.25w,.5h);
+ z8 = (.75w,.5h);
+ z9 = (.75w,.25h);
+ z10= (w,.25h);
+ z11= (.25w,0);
+ z12= (.25w,.25h);
+ z13= (.5w,.25h);
+ z14= (.5w,.75h);
+ z15= (.75w,.75h);
+ z16= (.75w,h);
+ z17= (.125w,.125h);
+ z18= (.125w,.625h);
+ z19= (.125w,.375h);
+ z20= (.375w,.375h);
+ z21= (.875w,.125h);
+ z22= (.375w,.125h);
+ z23= (.625w,.125h);
+ z24= (.625w,.375h);
+ z25= (.875w,.375h);
+ z26= (.875w,.875h);
+ z27= (.625w,.625h);
+ z28= (.875w,.625h);
+ z29= (.375w,.625h);
+ z30= (.375w,.875h);
+ z31= (.125w,.875h);
+ z32= (.625w,.875h);
+
+ draw z1--z2--z3--z4--cycle;
+ draw z5--z6--z7--z8--z9--z10;
+ draw z11--z12--z13--z14--z15--z16;
+ draw z17--z18; draw z19--z20; draw z21--z22;
+ draw z23--z24; draw z25--z26; draw z27--z28;
+ draw z29--z30; draw z31--z32;
+endchar;
+
+beginchar ("3", sqwid#, sqht#, 0); "bit 3";
+ z1 = (w/2,h/4);
+ z2 = (3w/4,h/2);
+ z3 = (w/2,3h/4);
+ z4 = (w/4,h/2);
+ fill z1--z2--z3--z4--cycle;
+endchar;
+
+beginchar ("4", sqwid#, sqht#, 0); "bit 4";
+ z1 = (w/2,h/4);
+ z2 = (3w/4,h/2);
+ z3 = (w/2,3h/4);
+ z4 = (w/4,h/2);
+ fill z1..z2..z3..z4..cycle;
+endchar;
+
+beginchar ("5", sqwid#, sqht#, 0); "bit 5";
+ pickup thin_pen;
+
+ z1 = (0,0);
+ z2 = (w,0);
+ z3 = (w,h);
+ z4 = (0,h);
+ z5 = (1/7w,1/7h);
+ z6 = (6/7w,1/7h);
+ z7 = (6/7w,6/7h);
+ z8 = (1/7w,6/7h);
+ z9 = (w/2, 2/7h);
+ z10= (5/7w, h/2);
+ z11= (w/2, 5/7h);
+ z12= (2/7w, h/2);
+ draw z1--z2--z3--z4--cycle;
+ fill z5--z9--z6--cycle;
+ fill z6--z10--z7--cycle;
+ fill z7--z11--z8--cycle;
+ fill z8--z12--z5--cycle;
+endchar;
+
+def ulsq =
+ pickup knot_pen;
+ lft x1 = 0;
+ y1 = 0;
+ lft x2 = 0;
+ top y2 = h;
+ x3 = w;
+ top y3 = h;
+ draw z1--z2--z3;
+
+ pickup thin_pen;
+ z4 = (.2w, 0);
+ z5 = (.2w, .8h);
+ z6 = (w, .8h);
+ draw z4--z5--z6;
+
+ pickup thin_pen;
+ z7 = (.8w, 0);
+ z8 = (.8w, .2h);
+ z9 = (w, .2h);
+ draw z7--z8--z9;
+
+ pickup knot_pen;
+ rt x10 = w;
+ y10 = 0;
+ rt x11 = w;
+ bot y11 = 0;
+ x12 = w;
+ bot y12 = 0;
+ draw z10--z11--z12;
+enddef;
+
+beginchar (":", sqwid#, sqht#, 0); "ul square";
+ ulsq;
+endchar;
+
+beginchar (";", sqwid#, sqht#, 0); "ur square";
+ ulsq;
+ currentpicture := currentpicture rotated 270 shifted (0, h);
+endchar;
+
+beginchar ("=", sqwid#, sqht#, 0); "lr square";
+ ulsq;
+ currentpicture := currentpicture rotated 180 shifted (w, h);
+endchar;
+
+beginchar ("<", sqwid#, sqht#, 0); "ll square";
+ ulsq;
+ currentpicture := currentpicture rotated 90 shifted (w, 0);
+endchar;
+
+def vtsq =
+ pickup knot_pen;
+ lft x1 = 0;
+ y1 = 0;
+ lft x2 = 0;
+ y2 = h;
+ draw z1--z2;
+ pickup thin_pen;
+ x3 = .2w;
+ y3 = 0;
+ x4 = .2w;
+ y4 = h;
+ draw z3--z4;
+ pickup thin_pen;
+ x5 = .8w;
+ y5 = 0;
+ x6 = .8w;
+ y6 = h;
+ draw z5--z6;
+ pickup knot_pen;
+ rt x7 = w;
+ y7 = 0;
+ rt x8 = w;
+ y8 = h;
+ draw z7--z8;
+enddef;
+
+beginchar (">", sqwid#, sqht#, 0); "vert square";
+ vtsq;
+endchar;
+
+beginchar ("?", sqwid#, sqht#, 0); "horiz square";
+ vtsq;
+ currentpicture := currentpicture rotated 90 shifted (w, 0);
+endchar;
diff --git a/fonts/knot/do2knots.mf b/fonts/knot/do2knots.mf
new file mode 100644
index 0000000000..bfcece09b8
--- /dev/null
+++ b/fonts/knot/do2knots.mf
@@ -0,0 +1,53 @@
+pickup pencircle scaled thick;
+knot_pen := savepen;
+pickup pencircle scaled thin;
+thin_pen := savepen;
+
+numeric a[];
+a1 := angle(sqwid#, sqht#);
+a2 := 180 - a1;
+a3 := 180 + a1;
+a4 := 360 - a1;
+
+pair x[]ll, x[]rr, x[]c;
+pair y[]ll, y[]rr, y[]c;
+path parp_.l, parp_.r, parp_.c, parp_.ll, parp_.rr;
+
+def llrrexp(expr max_num) =
+ for ii := 0 upto max_num:
+ z[ii].c = z[ii];
+ z[ii].ll = indist[z[ii].l, z[ii].r];
+ z[ii].rr = indist[z[ii].r, z[ii].l];
+ endfor;
+enddef;
+
+def penstroke text t =
+ forsuffixes e = c,l,r,ll,rr: parp_.e:=t; endfor
+ if cycle parp_.l: cyclestroke_
+ else:
+ unfill parp_.ll -- reverse parp_.rr -- cycle;
+ cullit;
+ forsuffixes e = c,l,r,ll,rr:
+ if knotstyle.e = 2:
+ pickup knot_pen; draw parp_.e;
+ elseif knotstyle.e = 1:
+ pickup thin_pen; draw parp_.e;
+ elseif knotstyle.e = -1:
+ pickup thin_pen; undraw parp_.e;
+ elseif knotstyle.e = -2:
+ pickup knot_pen; undraw parp_.e;
+ fi
+ endfor
+ if knotstyle.solid = 1:
+ fill parp_.l -- reverse parp_.r -- cycle;
+ elseif knotstyle.solid = 2:
+ fill parp_.ll -- reverse parp_.rr -- cycle;
+ elseif knotstyle.solid = 3:
+ fill parp_.ll -- reverse parp_.l -- cycle;
+ fill parp_.rr -- reverse parp_.r -- cycle;
+ fi
+ cullit;
+ fi
+enddef;
+
+input tri
diff --git a/fonts/knot/doknots.mf b/fonts/knot/doknots.mf
new file mode 100644
index 0000000000..e67e894294
--- /dev/null
+++ b/fonts/knot/doknots.mf
@@ -0,0 +1,52 @@
+pickup pencircle scaled thick;
+knot_pen := savepen;
+pickup pencircle scaled thin;
+thin_pen := savepen;
+
+numeric a[];
+a1 := angle(sqwid#, sqht#);
+a2 := 180 - a1;
+a3 := 180 + a1;
+a4 := 360 - a1;
+
+pair x[]ll, x[]rr, x[]c;
+pair y[]ll, y[]rr, y[]c;
+path parp_.l, parp_.r, parp_.c, parp_.ll, parp_.rr;
+
+def llrrexp(expr max_num) =
+ for ii := 0 upto max_num:
+ z[ii].c = z[ii];
+ z[ii].ll = indist[z[ii].l, z[ii].r];
+ z[ii].rr = indist[z[ii].r, z[ii].l];
+ endfor;
+enddef;
+
+def penstroke text t =
+ forsuffixes e = c,l,r,ll,rr: parp_.e:=t; endfor
+ if cycle parp_.l: cyclestroke_
+ else:
+ forsuffixes e = c,l,r,ll,rr:
+ if knotstyle.e = 2:
+ pickup knot_pen; draw parp_.e;
+ elseif knotstyle.e = 1:
+ pickup thin_pen; draw parp_.e;
+ elseif knotstyle.e = -1:
+ pickup thin_pen; undraw parp_.e;
+ elseif knotstyle.e = -2:
+ pickup knot_pen; undraw parp_.e;
+ fi
+ endfor
+ if knotstyle.solid = 1:
+ fill parp_.l -- reverse parp_.r -- cycle;
+ elseif knotstyle.solid = 2:
+ fill parp_.ll -- reverse parp_.rr -- cycle;
+ elseif knotstyle.solid = 3:
+ fill parp_.ll -- reverse parp_.l -- cycle;
+ fill parp_.rr -- reverse parp_.r -- cycle;
+ fi
+ fi
+enddef;
+
+input soloman
+input found
+input sides
diff --git a/fonts/knot/found.mf b/fonts/knot/found.mf
new file mode 100644
index 0000000000..7bef786f9d
--- /dev/null
+++ b/fonts/knot/found.mf
@@ -0,0 +1,177 @@
+def foundation_left =
+ z0 = (.5w,h);
+ penpos0(croswid, a3);
+ z1 = z0;
+ penpos1(knotwid, a3);
+ z2 = (.75w, .75h);
+ penpos2(knotwid, a3);
+ z7 = (w, .75h);
+ penpos7(knotwid, a4);
+ z3 = z0r;
+ penpos3(knotwid, a2);
+ z4 = (.25w,.75h);
+ penpos4(knotwid, a2);
+ z5 = (.25w,.25h);
+ penpos5(knotwid, a3);
+ z6 = (w, .25h);
+ penpos6(knotwid, a3);
+
+ llrrexp(7);
+ penstroke z1e---z2e{right}---z7e;
+ penstroke z3e---z4e---z5e{right}---z6e;
+enddef;
+
+def foundation_right =
+ z0 = (.5w,h);
+ penpos0(croswid, a3);
+ z1 = z0;
+ penpos1(knotwid, a3);
+ z2 = (.75w,.75h);
+ penpos2(knotwid, a3);
+ z3 = (.75w,.25h);
+ penpos3(knotwid, a2);
+ z4 = (0w,.25h);
+ penpos4(knotwid, a1);
+ z5 = z0r;
+ penpos5(knotwid, a2);
+ z6 = (.25w,.75h);
+ penpos6(knotwid, a2);
+ z7 = (0w,.75h);
+ penpos7(knotwid, a2);
+
+ llrrexp(7);
+ penstroke z1e---z2e---z3e{left}---z4e;
+ penstroke z5e---z6e{left}---z7e;
+enddef;
+
+def foundation_ileft =
+ z0 = (.5w,h);
+ penpos0(croswid, a3);
+ z1 = z0;
+ penpos1(knotwid, a3);
+ z2 = z3r;
+ penpos2(knotwid, a3);
+ z3 = (w,.5h);
+ penpos3(croswid, a2);
+ z4 = z3;
+ penpos4(knotwid, a2);
+ z5 = (.75w,.25h);
+ penpos5(knotwid, a2);
+ z6 = (0w,.25h);
+ penpos6(knotwid, a1);
+ z7 = z0r;
+ penpos7(knotwid, a2);
+ z8 = (.25w,.75h);
+ penpos8(knotwid, a2);
+ z9 = (0w,.75h);
+ penpos9(knotwid, a2);
+
+ llrrexp(9);
+ penstroke z1e---z2e;
+ penstroke z4e---z5e{left}---z6e;
+ penstroke z7e---z8e{left}---z9e;
+enddef;
+
+def foundation_iright =
+ z0 = (.5w,h);
+ penpos0(croswid, a3);
+ z1 = z0;
+ penpos1(knotwid, a3);
+ z2 = (.75w,.75h);
+ penpos2(knotwid, a3);
+ z3 = (w,.75h);
+ penpos3(knotwid, a4);
+ z4 = z0r;
+ penpos4(knotwid, a2);
+ z5 = (0w,.5h);
+ penpos5(knotwid, a2);
+ z6 = z5;
+ penpos6(croswid, a2);
+ z7 = z6l;
+ penpos7(knotwid, a3);
+ z8 = (.25w,.25h);
+ penpos8(knotwid, a3);
+ z9 = (w,.25h);
+ penpos9(knotwid, a3);
+
+ llrrexp(9);
+ penstroke z1e---z2e{right}---z3e;
+ penstroke z4e---z5e;
+ penstroke z7e---z8e{right}---z9e;
+enddef;
+
+beginchar ("I", sqwid#, sqht#, 0); "found-b left";
+ foundation_left;
+endchar;
+
+beginchar ("J", sqwid#, sqht#, 0); "found-b right";
+ foundation_right;
+endchar;
+
+beginchar ("K", sqwid#, sqht#, 0); "found-b mid-l";
+ foundation_ileft;
+endchar;
+
+beginchar ("L", sqwid#, sqht#, 0); "found-b mid-r";
+ foundation_iright;
+endchar;
+
+beginchar ("M", sqwid#, sqht#, 0); "found-t right";
+ foundation_left;
+ currentpicture := currentpicture rotated 180 shifted (w, h);
+endchar;
+
+beginchar ("N", sqwid#, sqht#, 0); "found-b left";
+ foundation_right;
+ currentpicture := currentpicture rotated 180 shifted (w, h);
+endchar;
+
+beginchar ("O", sqwid#, sqht#, 0); "found-b mid-l";
+ foundation_ileft;
+ currentpicture := currentpicture rotated 180 shifted (w, h);
+endchar;
+
+beginchar ("P", sqwid#, sqht#, 0); "found-b mid-r";
+ foundation_iright;
+ currentpicture := currentpicture rotated 180 shifted (w, h);
+endchar;
+
+beginchar ("Q", sqwid#, sqht#, 0); "found-l top";
+ foundation_left;
+ currentpicture := currentpicture rotated 270 shifted (0, h);
+endchar;
+
+beginchar ("R", sqwid#, sqht#, 0); "found-l bot";
+ foundation_right;
+ currentpicture := currentpicture rotated 270 shifted (0, h);
+endchar;
+
+beginchar ("S", sqwid#, sqht#, 0); "found-l mid-t";
+ foundation_ileft;
+ currentpicture := currentpicture rotated 270 shifted (0, h);
+endchar;
+
+beginchar ("T", sqwid#, sqht#, 0); "found-l mid-b";
+ foundation_iright;
+ currentpicture := currentpicture rotated 270 shifted (0, h);
+endchar;
+
+beginchar ("U", sqwid#, sqht#, 0); "found-r bot";
+ foundation_left;
+ currentpicture := currentpicture rotated 90 shifted (w, 0);
+endchar;
+
+beginchar ("V", sqwid#, sqht#, 0); "found-r top";
+ foundation_right;
+ currentpicture := currentpicture rotated 90 shifted (w, 0);
+endchar;
+
+beginchar ("W", sqwid#, sqht#, 0); "found-r mid-b";
+ foundation_ileft;
+ currentpicture := currentpicture rotated 90 shifted (w, 0);
+endchar;
+
+beginchar ("X", sqwid#, sqht#, 0); "found-r mid-t";
+ foundation_iright;
+ currentpicture := currentpicture rotated 90 shifted (w, 0);
+endchar;
diff --git a/fonts/knot/knot.mf b/fonts/knot/knot.mf
new file mode 100644
index 0000000000..497d2977fe
--- /dev/null
+++ b/fonts/knot/knot.mf
@@ -0,0 +1,37 @@
+mode_setup;
+
+scale# := 0.25pt#;
+knotwid# = 8scale#;
+croswid# = 1.25knotwid#;
+thin# = 1scale#;
+thick# = 2scale#;
+sqwid# = 25scale#;
+sqht# = 25scale#;
+define_pixels(scale, thick, thin);
+define_blacker_pixels(knotwid, croswid);
+font_normal_space sqwid#;
+def --- = .. tension 2 .. enddef;
+numeric indist;
+numeric knotstyle.ll, knotstyle.rr, knotstyle.l, knotstyle.r, knotstyle.c;
+numeric knotstyle.solid;
+% A knotstroke is composed of up to five strokes: l ll c rr r
+% Each line can be drawn five ways. If knotstyle.x | | | | |
+% is 0 it is not drawn, if it is 1 it is drawn with | | | | |
+% the thin pen and if 2 it is drawn with the thick pen. | | | | |
+% -1 and -2 undraw it with the thin & thick pen | | | | |
+% respectively. knotstyle.solid can have four different | | | | |
+% values. If it is zero, no solid filling is done. If | | | | |
+% 1 then the stroke is filled from l to r. If it is |xxxxxxxxxxx|
+% 2 it is filled from ll to rr. Lastly if it is | |xxxxxxx| |
+% 3 it is filled from l to ll and rr to r. |x| | |x|
+
+indist := 1/4;
+knotstyle.l = 1;
+knotstyle.r = 1;
+knotstyle.ll = 0;
+knotstyle.rr = 0;
+knotstyle.c = 0;
+knotstyle.solid = 0;
+input do2knots
+
+end.
diff --git a/fonts/knot/knot.tex b/fonts/knot/knot.tex
new file mode 100644
index 0000000000..9f37ad94bb
--- /dev/null
+++ b/fonts/knot/knot.tex
@@ -0,0 +1,37 @@
+\documentstyle{article}
+\font\knot=knot4
+\begin{document}
+\begin{center}
+BASIC KNOT:\\
+\bigskip
+\knot CDB\hskip1cm\tt CDB\\\nointerlineskip
+\knot FHG\hskip1cm\tt FHG\\\nointerlineskip
+\knot @EA\hskip1cm\tt @EA\\
+\bigskip
+SOLOMAN KNOT:\\
+\bigskip
+\knot NPOM\hskip1cm\tt NPOM\\\nointerlineskip
+\knot FHHG\hskip1cm\tt FHHG\\\nointerlineskip
+\knot IKLJ\hskip1cm\tt IKLJ\\
+\bigskip
+\knot QDV\hskip1cm\tt QDV\\\nointerlineskip
+\knot SHX\hskip1cm\tt SHX\\\nointerlineskip
+\knot THW\hskip1cm\tt THW\\\nointerlineskip
+\knot REU\hskip1cm\tt REU\\
+\bigskip
+INTERLACED KNOT:\\
+\bigskip
+\knot CD`DB\hskip1cm\tt CD`DB\\\nointerlineskip
+\knot FHeHG\hskip1cm\tt FHeHG\\\nointerlineskip
+\knot bgHfc\hskip1cm\tt bgHfc\\\nointerlineskip
+\knot FHdHG\hskip1cm\tt FHdHG\\\nointerlineskip
+\knot @EaEA\hskip1cm\tt @EaEA\\
+SQURES :\\
+\bigskip
+\knot :??;\hskip1cm\tt :??;\\\nointerlineskip
+\knot >01>\hskip1cm\tt >01>\\\nointerlineskip
+\knot >23>\hskip1cm\tt >23>\\\nointerlineskip
+\knot >45>\hskip1cm\tt >45>\\\nointerlineskip
+\knot <??=\hskip1cm\tt <??=\\\nointerlineskip
+\end{center}
+\end{document}
diff --git a/fonts/knot/knot1.mf b/fonts/knot/knot1.mf
new file mode 100644
index 0000000000..d27aec0244
--- /dev/null
+++ b/fonts/knot/knot1.mf
@@ -0,0 +1,39 @@
+mode_setup;
+
+scale# := 0.5pt#;
+knotwid# = 8scale#;
+croswid# = 1.25knotwid#;
+thin# = 1scale#;
+thick# = 2scale#;
+sqwid# = 25scale#;
+sqht# = 25scale#;
+define_pixels(scale, thick, thin);
+define_blacker_pixels(knotwid, croswid);
+font_normal_space sqwid#;
+def --- = .. tension 2 .. enddef;
+numeric indist;
+numeric knotstyle.ll, knotstyle.rr, knotstyle.l, knotstyle.r, knotstyle.c;
+numeric knotstyle.solid;
+% A knotstroke is composed of up to five strokes: l ll c rr r
+% Each line can be drawn five ways. If knotstyle.x | | | | |
+% is 0 it is not drawn, if it is 1 it is drawn with | | | | |
+% the thin pen and if 2 it is drawn with the thick pen. | | | | |
+% -1 and -2 undraw it with the thin & thick pen | | | | |
+% respectively. knotstyle.solid can have four different | | | | |
+% values. If it is zero, no solid filling is done. If | | | | |
+% 1 then the stroke is filled from l to r. If it is |xxxxxxxxxxx|
+% 2 it is filled from ll to rr. Lastly if it is | |xxxxxxx| |
+% 3 it is filled from l to ll and rr to r. |x| | |x|
+
+indist := 1/4;
+knotstyle.l = 0;
+knotstyle.r = 0;
+knotstyle.ll = 0;
+knotstyle.rr = 0;
+knotstyle.c = 0;
+knotstyle.solid = 1;
+input doknots
+
+input bits
+
+end.
diff --git a/fonts/knot/knot2.mf b/fonts/knot/knot2.mf
new file mode 100644
index 0000000000..8978882f2b
--- /dev/null
+++ b/fonts/knot/knot2.mf
@@ -0,0 +1,39 @@
+mode_setup;
+
+scale# := 0.5pt#;
+knotwid# = 8scale#;
+croswid# = 1.25knotwid#;
+thin# = 1scale#;
+thick# = 2scale#;
+sqwid# = 25scale#;
+sqht# = 25scale#;
+define_pixels(scale, thick, thin);
+define_blacker_pixels(knotwid, croswid);
+font_normal_space sqwid#;
+def --- = .. tension 2 .. enddef;
+numeric indist;
+numeric knotstyle.ll, knotstyle.rr, knotstyle.l, knotstyle.r, knotstyle.c;
+numeric knotstyle.solid;
+% A knotstroke is composed of up to five strokes: l ll c rr r
+% Each line can be drawn five ways. If knotstyle.x | | | | |
+% is 0 it is not drawn, if it is 1 it is drawn with | | | | |
+% the thin pen and if 2 it is drawn with the thick pen. | | | | |
+% -1 and -2 undraw it with the thin & thick pen | | | | |
+% respectively. knotstyle.solid can have four different | | | | |
+% values. If it is zero, no solid filling is done. If | | | | |
+% 1 then the stroke is filled from l to r. If it is |xxxxxxxxxxx|
+% 2 it is filled from ll to rr. Lastly if it is | |xxxxxxx| |
+% 3 it is filled from l to ll and rr to r. |x| | |x|
+
+indist := 1/4;
+knotstyle.l = 2;
+knotstyle.r = 2;
+knotstyle.ll = 0;
+knotstyle.rr = 0;
+knotstyle.c = 0;
+knotstyle.solid = 0;
+input doknots
+
+input bits
+
+end.
diff --git a/fonts/knot/knot3.mf b/fonts/knot/knot3.mf
new file mode 100644
index 0000000000..5684b78ac2
--- /dev/null
+++ b/fonts/knot/knot3.mf
@@ -0,0 +1,39 @@
+mode_setup;
+
+scale# := 0.5pt#;
+knotwid# = 8scale#;
+croswid# = 1.25knotwid#;
+thin# = 1scale#;
+thick# = 2scale#;
+sqwid# = 25scale#;
+sqht# = 25scale#;
+define_pixels(scale, thick, thin);
+define_blacker_pixels(knotwid, croswid);
+font_normal_space sqwid#;
+def --- = .. tension 2 .. enddef;
+numeric indist;
+numeric knotstyle.ll, knotstyle.rr, knotstyle.l, knotstyle.r, knotstyle.c;
+numeric knotstyle.solid;
+% A knotstroke is composed of up to five strokes: l ll c rr r
+% Each line can be drawn five ways. If knotstyle.x | | | | |
+% is 0 it is not drawn, if it is 1 it is drawn with | | | | |
+% the thin pen and if 2 it is drawn with the thick pen. | | | | |
+% -1 and -2 undraw it with the thin & thick pen | | | | |
+% respectively. knotstyle.solid can have four different | | | | |
+% values. If it is zero, no solid filling is done. If | | | | |
+% 1 then the stroke is filled from l to r. If it is |xxxxxxxxxxx|
+% 2 it is filled from ll to rr. Lastly if it is | |xxxxxxx| |
+% 3 it is filled from l to ll and rr to r. |x| | |x|
+
+indist := 1/4;
+knotstyle.l = 1;
+knotstyle.r = 1;
+knotstyle.ll = 1;
+knotstyle.rr = 1;
+knotstyle.c = 0;
+knotstyle.solid = 0;
+input doknots
+
+input bits
+
+end.
diff --git a/fonts/knot/knot4.mf b/fonts/knot/knot4.mf
new file mode 100644
index 0000000000..1608ffa2f4
--- /dev/null
+++ b/fonts/knot/knot4.mf
@@ -0,0 +1,39 @@
+mode_setup;
+
+scale# := 0.5pt#;
+knotwid# = 8scale#;
+croswid# = 1.25knotwid#;
+thin# = 1scale#;
+thick# = 2scale#;
+sqwid# = 25scale#;
+sqht# = 25scale#;
+define_pixels(scale, thick, thin);
+define_blacker_pixels(knotwid, croswid);
+font_normal_space sqwid#;
+def --- = .. tension 2 .. enddef;
+numeric indist;
+numeric knotstyle.ll, knotstyle.rr, knotstyle.l, knotstyle.r, knotstyle.c;
+numeric knotstyle.solid;
+% A knotstroke is composed of up to five strokes: l ll c rr r
+% Each line can be drawn five ways. If knotstyle.x | | | | |
+% is 0 it is not drawn, if it is 1 it is drawn with | | | | |
+% the thin pen and if 2 it is drawn with the thick pen. | | | | |
+% -1 and -2 undraw it with the thin & thick pen | | | | |
+% respectively. knotstyle.solid can have four different | | | | |
+% values. If it is zero, no solid filling is done. If | | | | |
+% 1 then the stroke is filled from l to r. If it is |xxxxxxxxxxx|
+% 2 it is filled from ll to rr. Lastly if it is | |xxxxxxx| |
+% 3 it is filled from l to ll and rr to r. |x| | |x|
+
+indist := 1/4;
+knotstyle.l = 2;
+knotstyle.r = 2;
+knotstyle.ll = 0;
+knotstyle.rr = 0;
+knotstyle.c = 1;
+knotstyle.solid = 0;
+input doknots
+
+input bits
+
+end.
diff --git a/fonts/knot/knot5.mf b/fonts/knot/knot5.mf
new file mode 100644
index 0000000000..cbe52ef84c
--- /dev/null
+++ b/fonts/knot/knot5.mf
@@ -0,0 +1,39 @@
+mode_setup;
+
+scale# := 0.5pt#;
+knotwid# = 8scale#;
+croswid# = knotwid#;
+thin# = 1scale#;
+thick# = 2scale#;
+sqwid# = 25scale#;
+sqht# = 25scale#;
+define_pixels(scale, thick, thin);
+define_blacker_pixels(knotwid, croswid);
+font_normal_space sqwid#;
+def --- = .. tension 2 .. enddef;
+numeric indist;
+numeric knotstyle.ll, knotstyle.rr, knotstyle.l, knotstyle.r, knotstyle.c;
+numeric knotstyle.solid;
+% A knotstroke is composed of up to five strokes: l ll c rr r
+% Each line can be drawn five ways. If knotstyle.x | | | | |
+% is 0 it is not drawn, if it is 1 it is drawn with | | | | |
+% the thin pen and if 2 it is drawn with the thick pen. | | | | |
+% -1 and -2 undraw it with the thin & thick pen | | | | |
+% respectively. knotstyle.solid can have four different | | | | |
+% values. If it is zero, no solid filling is done. If | | | | |
+% 1 then the stroke is filled from l to r. If it is |xxxxxxxxxxx|
+% 2 it is filled from ll to rr. Lastly if it is | |xxxxxxx| |
+% 3 it is filled from l to ll and rr to r. |x| | |x|
+
+indist := 1/4;
+knotstyle.l = 1;
+knotstyle.r = 1;
+knotstyle.ll = 1;
+knotstyle.rr = 1;
+knotstyle.c = 1;
+knotstyle.solid = 0;
+input doknots
+
+input bits
+
+end.
diff --git a/fonts/knot/knot6.mf b/fonts/knot/knot6.mf
new file mode 100644
index 0000000000..716aefc776
--- /dev/null
+++ b/fonts/knot/knot6.mf
@@ -0,0 +1,39 @@
+mode_setup;
+
+scale# := 0.5pt#;
+knotwid# = 8scale#;
+croswid# = 1.25knotwid#;
+thin# = 1scale#;
+thick# = 2scale#;
+sqwid# = 25scale#;
+sqht# = 25scale#;
+define_pixels(scale, thick, thin);
+define_blacker_pixels(knotwid, croswid);
+font_normal_space sqwid#;
+def --- = .. tension 2 .. enddef;
+numeric indist;
+numeric knotstyle.ll, knotstyle.rr, knotstyle.l, knotstyle.r, knotstyle.c;
+numeric knotstyle.solid;
+% A knotstroke is composed of up to five strokes: l ll c rr r
+% Each line can be drawn five ways. If knotstyle.x | | | | |
+% is 0 it is not drawn, if it is 1 it is drawn with | | | | |
+% the thin pen and if 2 it is drawn with the thick pen. | | | | |
+% -1 and -2 undraw it with the thin & thick pen | | | | |
+% respectively. knotstyle.solid can have four different | | | | |
+% values. If it is zero, no solid filling is done. If | | | | |
+% 1 then the stroke is filled from l to r. If it is |xxxxxxxxxxx|
+% 2 it is filled from ll to rr. Lastly if it is | |xxxxxxx| |
+% 3 it is filled from l to ll and rr to r. |x| | |x|
+
+indist := 1/4;
+knotstyle.l = 0;
+knotstyle.r = 0;
+knotstyle.ll = 0;
+knotstyle.rr = 0;
+knotstyle.c = -1;
+knotstyle.solid = 1;
+input doknots
+
+input bits
+
+end.
diff --git a/fonts/knot/knot7.mf b/fonts/knot/knot7.mf
new file mode 100644
index 0000000000..493e064d9e
--- /dev/null
+++ b/fonts/knot/knot7.mf
@@ -0,0 +1,39 @@
+mode_setup;
+
+scale# := 0.5pt#;
+knotwid# = 8scale#;
+croswid# = 1.05knotwid#;
+thin# = 1scale#;
+thick# = 2scale#;
+sqwid# = 25scale#;
+sqht# = 25scale#;
+define_pixels(scale, thick, thin);
+define_blacker_pixels(knotwid, croswid);
+font_normal_space sqwid#;
+def --- = .. tension 2 .. enddef;
+numeric indist;
+numeric knotstyle.ll, knotstyle.rr, knotstyle.l, knotstyle.r, knotstyle.c;
+numeric knotstyle.solid;
+% A knotstroke is composed of up to five strokes: l ll c rr r
+% Each line can be drawn five ways. If knotstyle.x | | | | |
+% is 0 it is not drawn, if it is 1 it is drawn with | | | | |
+% the thin pen and if 2 it is drawn with the thick pen. | | | | |
+% -1 and -2 undraw it with the thin & thick pen | | | | |
+% respectively. knotstyle.solid can have four different | | | | |
+% values. If it is zero, no solid filling is done. If | | | | |
+% 1 then the stroke is filled from l to r. If it is |xxxxxxxxxxx|
+% 2 it is filled from ll to rr. Lastly if it is | |xxxxxxx| |
+% 3 it is filled from l to ll and rr to r. |x| | |x|
+
+indist := 1/4;
+knotstyle.l = 1;
+knotstyle.r = 1;
+knotstyle.ll = 0;
+knotstyle.rr = 0;
+knotstyle.c = 0;
+knotstyle.solid = 2;
+input doknots
+
+input bits
+
+end.
diff --git a/fonts/knot/knots.mf b/fonts/knot/knots.mf
new file mode 100644
index 0000000000..bb370ff2c6
--- /dev/null
+++ b/fonts/knot/knots.mf
@@ -0,0 +1,39 @@
+mode_setup;
+
+scale# := 0.5pt#;
+knotwid# = 8scale#;
+croswid# = 1.05knotwid#;
+thin# = 1scale#;
+thick# = 2scale#;
+sqwid# = 25scale#;
+sqht# = 25scale#;
+define_pixels(scale, thick, thin);
+define_blacker_pixels(knotwid, croswid);
+font_normal_space sqwid#;
+def --- = .. tension 2 .. enddef;
+numeric indist;
+numeric knotstyle.ll, knotstyle.rr, knotstyle.l, knotstyle.r, knotstyle.c;
+numeric knotstyle.solid;
+% A knotstroke is composed of up to five strokes: l ll c rr r
+% Each line can be drawn five ways. If knotstyle.x | | | | |
+% is 0 it is not drawn, if it is 1 it is drawn with | | | | |
+% the thin pen and if 2 it is drawn with the thick pen. | | | | |
+% -1 and -2 undraw it with the thin & thick pen | | | | |
+% respectively. knotstyle.solid can have four different | | | | |
+% values. If it is zero, no solid filling is done. If | | | | |
+% 1 then the stroke is filled from l to r. If it is |xxxxxxxxxxx|
+% 2 it is filled from ll to rr. Lastly if it is | |xxxxxxx| |
+% 3 it is filled from l to ll and rr to r. |x| | |x|
+
+indist := 1/4;
+knotstyle.l = 0;
+knotstyle.r = 0;
+knotstyle.ll = 0;
+knotstyle.rr = 0;
+knotstyle.c = 0;
+knotstyle.solid = 3;
+input doknots
+
+input bits
+
+end.
diff --git a/fonts/knot/sides.mf b/fonts/knot/sides.mf
new file mode 100644
index 0000000000..b60ed6a992
--- /dev/null
+++ b/fonts/knot/sides.mf
@@ -0,0 +1,195 @@
+
+def sideonetop =
+ z0 = (0w,.5h);
+ penpos0(croswid, a4);
+ z1 = z0;
+ penpos1(knotwid, a4);
+ z2 = (.25w,.75h);
+ penpos2(knotwid, a4);
+ z3 = (.75w,.75h);
+ penpos3(knotwid, a3);
+ z4 = z6r;
+ penpos4(knotwid, a3);
+ z5 = (w,.5h);
+ penpos5(croswid, a2);
+ z6 = z5;
+ penpos6(knotwid, a2);
+ z7 = (.75w,.25h);
+ penpos7(knotwid, a2);
+ z8 = (.75w,0h);
+ penpos8(knotwid, a2);
+ z9 = (.25w,0h);
+ penpos9(knotwid, a1);
+ z10 = (.25w,.25h);
+ penpos10(knotwid, a1);
+ z11 = z0r;
+ penpos11(knotwid, a1);
+
+ llrrexp(11);
+ penstroke z1e---z2e---z3e---z4e;
+ penstroke z6e---z7e{down}---z8e;
+ penstroke z9e---{up}z10e---z11e;
+enddef;
+
+def sideonebot =
+ z0 = (1w,.5h);
+ penpos0(croswid, a2);
+ z1 = z0;
+ penpos1(knotwid, a2);
+ z2 = (.75w,.25h);
+ penpos2(knotwid, a2);
+ z3 = (.25w,.25h);
+ penpos3(knotwid, a1);
+ z4 = z6r;
+ penpos4(knotwid, a1);
+ z5 = (0w,.5h);
+ penpos5(croswid, a4);
+ z6 = z5;
+ penpos6(knotwid, a4);
+ z7 = (.25w,.75h);
+ penpos7(knotwid, a4);
+ z8 = (.25w,1h);
+ penpos8(knotwid, a1);
+ z9 = (.75w,1h);
+ penpos9(knotwid, a2);
+ z10 = (.75w,.75h);
+ penpos10(knotwid, a3);
+ z11 = z0r;
+ penpos11(knotwid, a3);
+
+ llrrexp(11);
+ penstroke z1e---z2e---z3e---z4e;
+ penstroke z6e---z7e{up}---z8e;
+ penstroke z9e---{down}z10e---z11e;
+enddef;
+
+beginchar ("`", sqwid#, sqht#, 0); "sideone top";
+ sideonetop;
+endchar;
+
+beginchar ("a", sqwid#, sqht#, 0); "sideone bot";
+ sideonebot;
+endchar;
+
+beginchar ("b", sqwid#, sqht#, 0); "sideone left";
+ sideonetop;
+ currentpicture := currentpicture rotated 90 shifted (w, 0);
+endchar;
+
+beginchar ("c", sqwid#, sqht#, 0); "sideone right";
+ sideonebot;
+ currentpicture := currentpicture rotated 90 shifted (w, 0);
+endchar;
+
+def sidetwotop =
+ z0 = (0w,.5h);
+ penpos0(croswid, a4);
+ z1 = z0;
+ penpos1(knotwid, a4);
+ z2 = z3r;
+ penpos2(knotwid, a4);
+ z3 = (.5w,1h);
+ penpos3(croswid, a3);
+ z4 = z3;
+ penpos4(knotwid, a3);
+ z5 = z6r;
+ penpos5(knotwid, a3);
+ z6 = (1w,.5h);
+ penpos6(croswid, a2);
+ z7 = z6;
+ penpos7(knotwid, a2);
+ z8 = (.75w,.25h);
+ penpos8(knotwid, a2);
+ z9 = (.75w,0h);
+ penpos9(knotwid, a2);
+ z10 = (.25w,0h);
+ penpos10(knotwid, a1);
+ z11 = (.25w,.25h);
+ penpos11(knotwid, a1);
+ z12 = z0r;
+ penpos12(knotwid, a1);
+
+ llrrexp(12);
+ penstroke z1e---z2e;
+ penstroke z4e---z5e;
+ penstroke z7e---z8e{down}---z9e;
+ penstroke z10e---{up}z11e---z12e;
+enddef;
+
+def sidetwobot =
+ z0 = (1w,.5h);
+ penpos0(croswid, a2);
+ z1 = z0;
+ penpos1(knotwid, a2);
+ z2 = z3r;
+ penpos2(knotwid, a2);
+ z3 = (.5w,0h);
+ penpos3(croswid, a1);
+ z4 = z3;
+ penpos4(knotwid, a1);
+ z5 = z6r;
+ penpos5(knotwid, a1);
+ z6 = (0w,.5h);
+ penpos6(croswid, a4);
+ z7 = z6;
+ penpos7(knotwid, a4);
+ z8 = (.25w,.75h);
+ penpos8(knotwid, a4);
+ z9 = (.25w,1h);
+ penpos9(knotwid, a1);
+ z10 = (.75w,1h);
+ penpos10(knotwid, a2);
+ z11 = (.75w,.75h);
+ penpos11(knotwid, a3);
+ z12 = z0r;
+ penpos12(knotwid, a3);
+
+ llrrexp(12);
+ penstroke z1e---z2e;
+ penstroke z4e---z5e;
+ penstroke z7e---z8e{up}---z9e;
+ penstroke z10e---{down}z11e---z12e;
+enddef;
+
+beginchar ("d", sqwid#, sqht#, 0); "sidetwo top";
+ sidetwotop;
+endchar;
+
+beginchar ("e", sqwid#, sqht#, 0); "sidetwo bot";
+ sidetwobot;
+endchar;
+
+beginchar ("f", sqwid#, sqht#, 0); "sidetwo left";
+ sidetwotop;
+ currentpicture := currentpicture rotated 90 shifted (w, 0);
+endchar;
+
+beginchar ("g", sqwid#, sqht#, 0); "sidetwo right";
+ sidetwobot;
+ currentpicture := currentpicture rotated 90 shifted (w, 0);
+endchar;
+
+def sidehoriz =
+ z1 = (.25w, h);
+ penpos1(knotwid, 3);
+ z2 = (.25w, 0h);
+ penpos2(knotwid, 3);
+ z3 = (.75w, h);
+ penpos3(knotwid, 2);
+ z4 = (.75w, 0h);
+ penpos4(knotwid, 2);
+
+ llrrexp(4);
+ penstroke z1e---z2e;
+ penstroke z3e---z4e;
+enddef;
+
+beginchar ("h", sqwid#, sqht#, 0); "horizontal side";
+ sidehoriz;
+ currentpicture := currentpicture rotated 90 shifted (w, 0);
+endchar;
+
+beginchar ("i", sqwid#, sqht#, 0); "verticle side";
+ sidehoriz;
+ currentpicture := currentpicture rotated 90 shifted (w, 0);
+endchar;
diff --git a/fonts/knot/soloman.mf b/fonts/knot/soloman.mf
new file mode 100644
index 0000000000..3a1ec57268
--- /dev/null
+++ b/fonts/knot/soloman.mf
@@ -0,0 +1,125 @@
+def soloman_corner =
+ z0 = (w,.5h);
+ penpos0(croswid, a2);
+ z1 = z0;
+ penpos1(knotwid, a2);
+ z2 = (.75w,.25h);
+ penpos2(knotwid, a2);
+ z3 = (.25w,.25h);
+ penpos3(knotwid, a1);
+ z4 = (.25w,.75h);
+ penpos4(knotwid, a4);
+ z5 = z6r;
+ penpos5(knotwid, a4);
+ z6 = (.5w,h);
+ penpos6(croswid, a3);
+ z7 = z6;
+ penpos7(knotwid, a3);
+ z8 = z0r;
+ penpos8(knotwid, a3);
+
+ llrrexp(8);
+ penstroke z1e---z2e---z3e---z4e---z5e;
+ penstroke z7e---z8e;
+enddef;
+
+beginchar ("@", sqwid#, sqht#, 0); "soloman ll";
+ soloman_corner;
+endchar;
+
+beginchar ("A", sqwid#, sqht#, 0); "soloman lr";
+ soloman_corner;
+ currentpicture := (currentpicture rotated 90) shifted (w, 0);
+endchar;
+
+beginchar ("B", sqwid#, sqht#, 0); "soloman ur";
+ soloman_corner;
+ currentpicture := (currentpicture rotated 180) shifted (w, h);
+endchar;
+
+beginchar ("C", sqwid#, sqht#, 0); "soloman ul";
+ soloman_corner;
+ currentpicture := (currentpicture rotated 270) shifted (0, h);
+endchar;
+
+def soloman_side =
+ z0 = (0w,.5h);
+ penpos0(croswid, a4);
+ z1 = z0;
+ penpos1(knotwid, a4);
+ z2 = (.25w,.75h);
+ penpos2(knotwid, a4);
+ z3 = (.75w,.75h);
+ penpos3(knotwid, a3);
+ z4 = z5r;
+ penpos4(knotwid, a3);
+ z5 = (w,.5h);
+ penpos5(croswid, a2);
+ z6 = z5;
+ penpos6(knotwid, a2);
+ z7 = z8r;
+ penpos7(knotwid, a2);
+ z8 = (.5w,0h);
+ penpos8(croswid, a1);
+ z9 = z8;
+ penpos9(knotwid, a1);
+ z10 = z0r;
+ penpos10(knotwid, a1);
+
+ llrrexp(10);
+ penstroke z1e---z2e---z3e---z4e;
+ penstroke z6e---z7e;
+ penstroke z9e---z10e;
+enddef;
+
+beginchar ("D", sqwid#, sqht#, 0); "soloman u";
+ soloman_side;
+endchar;
+
+beginchar ("E", sqwid#, sqht#, 0); "soloman b";
+ soloman_side;
+ currentpicture := (currentpicture rotated 180) shifted (w, h);
+endchar;
+
+beginchar ("F", sqwid#, sqht#, 0); "soloman l";
+ soloman_side;
+ currentpicture := (currentpicture rotated 90) shifted (w, 0);
+endchar;
+
+beginchar ("G", sqwid#, sqht#, 0); "soloman r";
+ soloman_side;
+ currentpicture := (currentpicture rotated 270) shifted (0, h);
+endchar;
+
+beginchar ("H", sqwid#, sqht#, 0); "soloman mid";
+ z0 = (.5w,h);
+ penpos0(croswid, a3);
+ z1 = z0;
+ penpos1(knotwid, a3);
+ z2 = z3r;
+ penpos2(knotwid, a3);
+ z3 = (w,.5h);
+ penpos3(croswid, a2);
+ z4 = z3;
+ penpos4(knotwid, a2);
+ z5 = z6r;
+ penpos5(knotwid, a2);
+ z6 = (.5w, 0h);
+ penpos6(croswid, a1);
+ z7 = z6;
+ penpos7(knotwid, a1);
+ z8 = z9r;
+ penpos8(knotwid, a1);
+ z9 = (0w,.5h);
+ penpos9(croswid, a4);
+ z10 = z9;
+ penpos10(knotwid, a4);
+ z11 = z0r;
+ penpos11(knotwid, a4);
+
+ llrrexp(11);
+ penstroke z1e---z2e;
+ penstroke z4e---z5e;
+ penstroke z7e---z8e;
+ penstroke z10e---z11e;
+endchar;
diff --git a/fonts/knot/testknot.tex b/fonts/knot/testknot.tex
new file mode 100644
index 0000000000..d50af44704
--- /dev/null
+++ b/fonts/knot/testknot.tex
@@ -0,0 +1,51 @@
+\obeylines
+\obeyspaces
+\baselineskip=0pt
+\lineskip=0pt
+\def\square{
+:???????????????????;
+>CDDD`DDDDDDDDD`DDDB>
+>FHEEaEEHEEEHEEaEEHG>
+>FG:???;FV1QG:???;FG>
+>FG>CDB>FX2SG>CDB>FG>
+>bc>FHA>FW3TG>@HG>bc>
+>FG>@A:=FU4RG<;@A>FG>
+>FG<??=CHDDDHB<??=FG>
+>FHDDDDHHHHHHHDDDDHG>
+>FHEEEEHHEEEHHEEEEHG>
+>FGNPOMFG:?;FGNPOMFG>
+>FHHHHHHG>5>FHHHHHHG>
+>FGIKLJFG<?=FGIKLJFG>
+>FHDDDDHHDDDHHDDDDHG>
+>FHEEEEHHHHHHHEEEEHG>
+>FG:??;@HEEEHA:??;FG>
+>FG>CB<;FV4QG:=CB>FG>
+>FG>FHB>FX3SG>CHG>FG>
+>bc>@EA>FW2TG>@EA>bc>
+>FG<???=FU1RG<???=FG>
+>FHDD`DDHDDDHDD`DDHG>
+>@EEEaEEEEEEEEEaEEEA>
+<???????????????????=
+}
+\font\knot=knot1
+\knot\square
+\vfill\eject
+\font\knot=knot2
+\knot\square
+\vfill\eject
+\font\knot=knot3
+\knot\square
+\vfill\eject
+\font\knot=knot4
+\knot\square
+\vfill\eject
+\font\knot=knot5
+\knot\square
+\vfill\eject
+\font\knot=knot6
+\knot\square
+\vfill\eject
+\font\knot=knot7
+\knot\square
+\vfill\eject
+\bye
diff --git a/fonts/knot/tri.mf b/fonts/knot/tri.mf
new file mode 100644
index 0000000000..81d15fd2f1
--- /dev/null
+++ b/fonts/knot/tri.mf
@@ -0,0 +1,38 @@
+mode_setup;
+
+scale# := 0.25pt#;
+knotwid# = 8scale#;
+croswid# = .25knotwid#;
+croswidang# = croswid#/(cosd 30);
+gap# = 1scale#;
+thin# = .2scale#;
+thick# = .2scale#;
+sqwid# = 25scale#;
+sqht# = (cosd 30)*25scale#;
+define_pixels(scale, thick, thin, gap, croswid);
+define_blacker_pixels(knotwid, croswid, croswidang);
+font_normal_space sqwid#;
+pair cw, cwang;
+cw := (croswid, 0);
+cwang := (croswidang, 0);
+
+pickup pencircle xscaled thick yscaled thin;
+knot_pen := savepen;
+pair x[]i, x[]o;
+pair y[]i, y[]o;
+
+extra_beginchar := extra_beginchar & "pickup knot_pen;";
+
+beginchar (7, sqwid#, sqht#, 0); "tricycle 7";
+ z1 = (gap, gap); penpos1(croswidang, 30);
+ z2 = (w/2, h - gap); penpos2(croswidang, -90);
+ z3 = (w - gap, gap); penpos3(croswidang, 150);
+ z4 = .5[.5[z1, z2],z3]; penpos4(croswid, 150);
+ z5 = .5[.5[z2, z3],z1]; penpos5(croswid, 30);
+ z6 = .5[.5[z1, z3],z2]; penpos6(croswid, -90);
+ penstroke z1e{dir 60}..z6e..{dir -60}z3e;
+ penstroke z1e{dir 0}..z4e..{dir 120}z2e;
+ penstroke z2e{dir -120}..z5e..{dir 0}z3e;
+endchar;
+
+end.