summaryrefslogtreecommitdiff
path: root/fonts/knot/sides.mf
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/sides.mf
Initial commit
Diffstat (limited to 'fonts/knot/sides.mf')
-rw-r--r--fonts/knot/sides.mf195
1 files changed, 195 insertions, 0 deletions
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;