summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/fonts/source/public/knitting/knit_grid_cables.mf
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-09-07 00:38:17 +0000
committerKarl Berry <karl@freefriends.org>2010-09-07 00:38:17 +0000
commit50f3494b12ada52be9b302aa865453dcbbf5119c (patch)
tree3d1d31b4d3e4f92b3ac8a61e11730e789526ec3e /Master/texmf-dist/fonts/source/public/knitting/knit_grid_cables.mf
parenta79aae44637de232d489b3396e917453d37746cd (diff)
knitting 2 (30aug10)
git-svn-id: svn://tug.org/texlive/trunk@19595 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/fonts/source/public/knitting/knit_grid_cables.mf')
-rw-r--r--Master/texmf-dist/fonts/source/public/knitting/knit_grid_cables.mf24
1 files changed, 18 insertions, 6 deletions
diff --git a/Master/texmf-dist/fonts/source/public/knitting/knit_grid_cables.mf b/Master/texmf-dist/fonts/source/public/knitting/knit_grid_cables.mf
index 8e95657cb02..e127626bd5e 100644
--- a/Master/texmf-dist/fonts/source/public/knitting/knit_grid_cables.mf
+++ b/Master/texmf-dist/fonts/source/public/knitting/knit_grid_cables.mf
@@ -1,3 +1,5 @@
+% Date: 2010/08/10
+
picture symbolpic[];
beginchar(5,wd#,ht#,dp#); "Top and bottom outlines";
@@ -16,14 +18,14 @@ endchar;
code := 127;
-beginchar(".",wd#,ht#,dp#); "No stitch";
+beginchar(".",incrwidth(0,0),ht#,dp#); "No stitch";
fill (0.5(w-standardheight),-d+bottomgap) --
(0.5(w-standardheight),h-topgap) --
(0.5(w+standardheight),h-topgap) --
(0.5(w+standardheight),-d+bottomgap) -- cycle;
symbolpic0 := currentpicture;
charbox; endchar;
-beginchar(",",wd#,ht#,dp#); "Purl no stitch";
+beginchar(",",incrwidth(0,0),ht#,dp#); "Purl no stitch";
currentpicture := symbolpic0;
purlbox; endchar;
@@ -32,11 +34,13 @@ beginchar("-",wd#,ht#,dp#); "A knit stitch";
beginchar("=",wd#,ht#,dp#); "A purl stitch";
purlbox; endchar;
-%Cables
+% Cables
cablelinewidth#:=0.4pt#;
define_blacker_pixels(cablelinewidth);
pickup pencircle scaled cablelinewidth; cable_pen := savepen;
+
+% The one-letter cells
beginchar("p",wd#,ht#,dp#); "Purl cable background";
purlbox; endchar;
@@ -67,6 +71,8 @@ beginchar("e",wd#,ht#,dp#); "Odd twist";
beginchar("o",wd#,ht#,dp#); "Odd twist";
charbox; endchar;
+% Horizontal cables
+
horizcablegap# := 0.3 wd#;
define_pixels(horizcablegap);
@@ -135,6 +141,8 @@ ligtable righthoriz:
"+" |=: righthoriz,
specialhoriz =:| midhoriz,
righthoriz =:| midhoriz;
+
+% Setup for the standard cables
numeric cableleft[][][]; numeric cableright[][][];
numeric whitecableleft[][][]; numeric whitecableright[][][];
@@ -161,7 +169,7 @@ for sts = 2 upto 3:
purlbox; endchar;
endfor
-% Draw all the cables
+% Draw the cables
if known slantlines: else: boolean slantlines; slantlines = false; fi
@@ -422,14 +430,17 @@ fi
fi
endfor endfor endfor
-%Ligatures
+
+% Ligatures to let kkKK turn into a cable
+
+if fonttype <> counttype:
cableright[0][1][0] := ASCII"k";
cableleft[1][0][0] := ASCII"K";
revcableright[0][1] := ASCII"p";
revcableleft[1][0] := ASCII"P";
- ligtable "c":
+ligtable "c":
"k" =: cableright[0][1+1][0],
"c" =: cableright[0][1+1][0],
"p" =: cableright[1][1][1],
@@ -570,3 +581,4 @@ for frontsts = 1 upto 3:
endfor
endfor
+fi