diff options
Diffstat (limited to 'Master/texmf-dist/fonts/source')
20 files changed, 522 insertions, 188 deletions
diff --git a/Master/texmf-dist/fonts/source/public/knitting/knit_dimens.mf b/Master/texmf-dist/fonts/source/public/knitting/knit_dimens.mf index 0e69a6bdbb7..e705e163dfb 100644 --- a/Master/texmf-dist/fonts/source/public/knitting/knit_dimens.mf +++ b/Master/texmf-dist/fonts/source/public/knitting/knit_dimens.mf @@ -1,3 +1,5 @@ +% Date: 2010/08/10 + widewd# = 16.3pt#; % This is as wide as a cell can be without causing problems with 5-cell-wide symbols if known wd#: else: wd# = 12 pt#; fi @@ -5,6 +7,7 @@ if known wd#: else: wd# = 12 pt#; fi symbolwidth#=0.7pt#; purl_symbolwidth#=0.7pt#; + finesymbolwidth# = 0.4pt#; gridwidth# = if gridfont: 0.3pt# else: 0pt# fi; overlinewd# = if gridfont: 1.5pt# else: 0.8pt# fi; @@ -39,7 +42,7 @@ purlextend# := 0pt#; else: purlextend# := 0.2pt#; fi -% + % Purlextend affects how far outside their box the purl background goes. % % This is largely irrelevant when printing, @@ -49,14 +52,15 @@ fi % particular printer, this is one parameter you *have* to fiddle with. define_pixels(wd,ht,dp); -define_blacker_pixels(cableextend,purlextend,gridwidth,symbolwidth,purl_symbolwidth, - overlinewidth); +define_blacker_pixels(cableextend,purlextend,gridwidth,symbolwidth, + purl_symbolwidth, finesymbolwidth, overlinewidth); define_pixels(eraserwidth,wrapturngap); define_corrected_pixels(o,ho); define_pixels(standardgap,smallgap,mingap,topgap,bottomgap, cablevertgap,cablebargap,cableslant, botcableheight,topcableheight); pickup pencircle scaled symbolwidth; symbol_pen := savepen; +pickup pencircle scaled finesymbolwidth; fine_pen := savepen; pickup pencircle scaled purl_symbolwidth; purl_symbol_pen := savepen; pickup pencircle scaled eraserwidth; eraser_pen := savepen; @@ -90,8 +94,10 @@ overlinewd#, % dimen 11: overline/bar width (topgap#-bottomgap#), % dimen 13: vertical offset purlextend#; % dimen 14: purl box outlap -def incrwidth (expr sts) = wd# enddef; -def decrwidth (expr sts) = wd# enddef; +if known incrwidthdefined: else: + def incrwidth (expr stsin, stsout) = 1*wd# enddef; + def decrwidth (expr stsin, stsout) = 1*wd# enddef; +fi Vwidth := standardheight; % Used twice: v and y Wwidth := biggerheight; % Used for make 3 from 1 wideincline := 2symbolwidth; 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 diff --git a/Master/texmf-dist/fonts/source/public/knitting/knit_nogrid_cables.mf b/Master/texmf-dist/fonts/source/public/knitting/knit_nogrid_cables.mf index 44a34381186..126d1f28176 100644 --- a/Master/texmf-dist/fonts/source/public/knitting/knit_nogrid_cables.mf +++ b/Master/texmf-dist/fonts/source/public/knitting/knit_nogrid_cables.mf @@ -1,7 +1,9 @@ -beginchar(",",wd#,ht#,dp#); "No stitch"; +% Date: 2010/08/10 + +beginchar(",",incrwidth(0,0),ht#,dp#); "No stitch"; purlbox; endchar; -beginchar(".",wd#,ht#,dp#); "No stitch"; +beginchar(".",incrwidth(0,0),ht#,dp#); "No stitch"; endchar; path purlbar; @@ -49,7 +51,7 @@ cablerightbackslash := 12; leftslash := 13; rightslash := 14; -beginchar("+",wd#,ht#,dp#); "Left end of a horizontal cable"; +beginchar("+",wd#,ht#,dp#); "Horizontal cable"; pickup symbol_pen; HCtop = (h-d)/2 + 0.2standardheight; HCbot = (h-d)/2 - 0.2standardheight; @@ -65,19 +67,19 @@ beginchar("+",wd#,ht#,dp#); "Left end of a horizontal cable"; symbolpic0 := currentpicture; charbox; endchar; -beginchar(midhoriz,wd#,ht#,dp#); "Middle of a horizontal cable"; - currentpicture := symbolpic0; - charbox; endchar; -beginchar(righthoriz,wd#,ht#,dp#); "Right end of a horizontal cable"; - currentpicture := symbolpic0; - charbox; endchar; - -ligtable "+": specialhoriz: - "+" |=: righthoriz; -ligtable righthoriz: - "+" |=: righthoriz, - specialhoriz =:| midhoriz, - righthoriz =:| midhoriz; +%beginchar(midhoriz,wd#,ht#,dp#); "Middle of a horizontal cable"; +% currentpicture := symbolpic0; +% charbox; endchar; +%beginchar(righthoriz,wd#,ht#,dp#); "Right end of a horizontal cable"; +% currentpicture := symbolpic0; +% charbox; endchar; +% +%ligtable "+": specialhoriz: +% "+" |=: righthoriz; +%ligtable righthoriz: +% "+" |=: righthoriz, +% specialhoriz =:| midhoriz, +% righthoriz =:| midhoriz; beginchar(specialhoriz,wd#,ht#,dp#); "Special horizontal cable"; pickup symbol_pen; @@ -122,58 +124,58 @@ beginchar(pright,wd#,ht#,dp#); "Purl cable background"; purlbox; endchar; -beginchar("n",wd#,ht#,dp#); "Back make one"; +beginchar("n",incrwidth(0,1),ht#,dp#); "Back make one"; pickup symbol_pen; - drawM(h-topgap, botcableheight+cablevertgap, 0.5w,symbolwidth); + drawM(h-topgap, botcableheight+cablevertgap, 0.5wd,symbolwidth); charbox; symbolpic0:=currentpicture; endchar; -beginchar(nright,wd#,ht#,dp#); "Back make one"; +beginchar(nright,incrwidth(0,1),ht#,dp#); "Back make one"; currentpicture := symbolpic0; endchar; -beginchar("e",wd#,ht#,dp#); "Back purlwise make one"; +beginchar("e",incrwidth(0,1),ht#,dp#); "Back purlwise make one"; pickup purl_symbol_pen; - drawM(h-topgap, botcableheight+cablevertgap, 0.5w,purl_symbolwidth); + drawM(h-topgap, botcableheight+cablevertgap, 0.5wd,purl_symbolwidth); symbolpic0:=currentpicture; purlbox; endchar; -beginchar(eright,wd#,ht#,dp#); "Back purlwise make one"; +beginchar(eright,incrwidth(0,1),ht#,dp#); "Back purlwise make one"; currentpicture := symbolpic0; purlbox; endchar; -beginchar("N",wd#,ht#,dp#); "Front make one"; +beginchar("N",incrwidth(0,1),ht#,dp#); "Front make one"; pickup symbol_pen; - drawM(topcableheight-cablevertgap, -d+bottomgap, 0.5w,symbolwidth); + drawM(topcableheight-cablevertgap, -d+bottomgap, 0.5wd,symbolwidth); symbolpic0 := currentpicture; charbox; endchar; -beginchar(Nright,wd#,ht#,dp#); "Front make one"; +beginchar(Nright,incrwidth(0,1),ht#,dp#); "Front make one"; currentpicture := symbolpic0; charbox; endchar; -beginchar("d",wd#,ht#,dp#); "Back decrease"; +beginchar("d",decrwidth(2,1),ht#,dp#); "Back decrease"; pickup symbol_pen; drawSSK(h-topgap, botcableheight+cablevertgap); charbox; symbolpic0:=currentpicture; endchar; -beginchar(dright,wd#,ht#,dp#); "Back decrease"; +beginchar(dright,decrwidth(2,1),ht#,dp#); "Back decrease"; fliphoriz(symbolpic0)(currentpicture); endchar; -beginchar("o",wd#,ht#,dp#); "Back purl decrease"; +beginchar("o",decrwidth(2,1),ht#,dp#); "Back purl decrease"; pickup purl_symbol_pen; drawSSK(h-topgap, botcableheight+cablevertgap); symbolpic0:=currentpicture; purlbox; endchar; -beginchar(oright,wd#,ht#,dp#); "Back purl decrease"; +beginchar(oright,decrwidth(2,1),ht#,dp#); "Back purl decrease"; fliphoriz(symbolpic0)(currentpicture); purlbox; endchar; -beginchar("D",wd#,ht#,dp#); "Front decrease"; +beginchar("D",decrwidth(2,1),ht#,dp#); "Front decrease"; pickup symbol_pen; drawSSK(topcableheight-cablevertgap,-d+bottomgap); charbox; symbolpic0:=currentpicture; endchar; -beginchar(Dright,wd#,ht#,dp#); "Front decrease"; +beginchar(Dright,decrwidth(2,1),ht#,dp#); "Front decrease"; fliphoriz(symbolpic0)(currentpicture); endchar; diff --git a/Master/texmf-dist/fonts/source/public/knitting/knit_symbols.mf b/Master/texmf-dist/fonts/source/public/knitting/knit_symbols.mf index b69176268d2..e39d923d6bd 100644 --- a/Master/texmf-dist/fonts/source/public/knitting/knit_symbols.mf +++ b/Master/texmf-dist/fonts/source/public/knitting/knit_symbols.mf @@ -1,3 +1,17 @@ +% Date: 2010/08/10 + +% Don't flash pictures of the characters as you draw them. +% This is dizzying, and UNIX can't do it anyway. +displaying := 0; + +% If you want actual documentation, say +% "mf knitnn" and then +% "gftodvi knitnn.2602gf" and then +% "dvipdfm knitnn" +% at a command prompt in the directory containing this file. +% This will give you a PDF with big pictures of all the characters in +% the font with the important points labeled. + if known ps_output: font_coding_scheme := "T1-WGL4.enc"; fi @@ -16,6 +30,11 @@ purltype = 0; gridtype = 1; foretype = 2; bothtype = 3; +counttype = 4; + +if fonttype = counttype: + extra_endchar := extra_endchar & "pickup pencircle scaled 0.2pt; if w>0: draw (0,-d)--(0,h); draw (w,-d)--(w,h); fi"; +fi if gridfont: def charbox = @@ -27,8 +46,10 @@ def charbox = pickup pencircle scaled gridwidth; fill (-gridwidth/2,-d-gridwidth/2)--(w+gridwidth/2,-d-gridwidth/2)-- (w+gridwidth/2,h+gridwidth/2)--(-gridwidth/2,h+gridwidth/2)--cycle; - unfill (gridwidth/2,-d+gridwidth/2)--(w-gridwidth/2,-d+gridwidth/2)-- - (w-gridwidth/2,h-gridwidth/2)--(gridwidth/2,h-gridwidth/2)--cycle; + if (w>0): + unfill (gridwidth/2,-d+gridwidth/2)--(w-gridwidth/2,-d+gridwidth/2)-- + (w-gridwidth/2,h-gridwidth/2)--(gridwidth/2,h-gridwidth/2)--cycle; + fi %draw (0,-d)--(w,-d)--(w,h)--(0,h)--cycle; fi fi @@ -41,7 +62,6 @@ def charbox = enddef; fi - def purlbox = charbox; purlfill; enddef; picture symbolpic[]; @@ -67,6 +87,8 @@ def definearrow(text thepath, arrowlength, endpath) = ; enddef; +% Arrow symbols + beginchar("s",wd#,ht#,dp#); "Slip one left"; pickup symbol_pen; y1 = y2 = (h-d)/2-offset; @@ -76,16 +98,15 @@ beginchar("s",wd#,ht#,dp#); "Slip one left"; definearrow(symbolpath0)((x2-x1)/3)(symbolpath1); draw symbolpath0; draw symbolpath1; - symbolpic0 := currentpicture; + symbolpic0 := currentpicture; symbolpicwd0 := w; charbox; endchar; beginchar("S",wd#,ht#,dp#); "Slip one right"; - fliphoriz(symbolpic0)(currentpicture); + fliphoriz(symbolpic0)(currentpicture); currentpicture := currentpicture shifted (-(w-symbolpicwd0)/2,0); charbox; endchar; beginchar("[",wd#,ht#,dp#); "Slip one left knitwise"; pickup symbol_pen; - pickup symbol_pen; y1 = y2 = (h-d)/2-offset; 0.5[x1,x2]=w/2; rt x2 - lft x1 = ht+dp-2*0.3[smallgap,mingap]; @@ -99,16 +120,16 @@ beginchar("[",wd#,ht#,dp#); "Slip one left knitwise"; y4-y3 = 1.5 ypart (point 2 of symbolpath1 - point 0 of symbolpath1); draw z3--z4; labels(1,2,3,4); - symbolpic0 := currentpicture; + symbolpic0 := currentpicture; symbolpicwd0 := w; charbox; endchar; beginchar("]",wd#,ht#,dp#); "Slip one right knitwise"; - fliphoriz(symbolpic0)(currentpicture); + fliphoriz(symbolpic0)(currentpicture); currentpicture := currentpicture shifted (-(w-symbolpicwd0)/2,0); flipvert(currentpicture)(currentpicture); charbox; endchar; -beginchar("h",wd#,ht#,dp#); "Drop stitch"; +beginchar("h",decrwidth(1,0),ht#,dp#); "Drop stitch"; pickup symbol_pen; y1 = bot h-small_topgap; y2 = top -d+small_bottomgap; @@ -117,14 +138,22 @@ beginchar("h",wd#,ht#,dp#); "Drop stitch"; definearrow(symbolpath0)((y1-y2)/3)(symbolpath1); draw symbolpath0; draw symbolpath1; - symbolpic0 := currentpicture; charbox; endchar; -beginchar("H",wd#,ht#,dp#); "Up arrow"; - flipvert(symbolpic0)(currentpicture); +beginchar("H",incrwidth(0,1),ht#,dp#); "Up arrow"; + pickup symbol_pen; + y1 = bot h-small_topgap; + y2 = top -d+small_bottomgap; + x1 = x2 =w/2; + symbolpath0 := z1--z2; + definearrow(reverse symbolpath0)((y1-y2)/3)(symbolpath1); + draw symbolpath0; + draw symbolpath1; charbox; endchar; -beginchar("O",wd#,ht#,dp#); "Yarn over"; +% Miscellaneous symbols + +beginchar("O",incrwidth(0,1),ht#,dp#); "Yarn over"; pickup symbol_pen; top z1 = (0.5w, h-topgap+o); bot z3 = (0.5w, bottomgap-d-o); @@ -147,8 +176,8 @@ beginchar("@",wd#,ht#,dp#); "Bead"; unfill fullcircle scaled 0.3333(y1-y3) shifted 0.5[z1,z3]; charbox; endchar; -beginchar(ditto,wd#,ht#,dp#); "Wrap and turn"; - if fonttype <> purltype: +beginchar(ditto,incrwidth(0,0),ht#,dp#); "Wrap and turn"; + if (fonttype = foretype) or (fonttype = bothtype) or (fonttype = counttype): pickup symbol_pen; z0 = 0.4[z1,z3] = 0.5[z2,z4]; x3=x1=w/2; y2=y4; y3-y1=x4-x2; @@ -173,10 +202,10 @@ beginchar(ditto,wd#,ht#,dp#); "Wrap and turn"; draw symbolpath0; draw symbolpath1; fi - symbolpic0 := currentpicture; + symbolpic0 := currentpicture; symbolpicwd0 := w; endchar; -beginchar(19,wd#,ht#,dp#); "Reverse wrap and turn"; - fliphoriz(symbolpic0)(currentpicture); +beginchar(19,incrwidth(0,0),ht#,dp#); "Reverse wrap and turn"; + fliphoriz(symbolpic0)(currentpicture); currentpicture := currentpicture shifted (-(w-symbolpicwd0)/2,0); endchar; ligtable @@ -218,16 +247,24 @@ def drawM(expr topheight, bottomheight, mwidth, penwidth) = labels(1,2,3,4,5,6,7,8,9,10,4l,4r); enddef; -def drawstar(expr topheight, bottomheight) = - top z1 = (w/2,topheight+o); - bot z2 = (w/2, bottomheight-o); +beginchar("*",wd#,ht#,dp#); "Special instructions"; + pickup symbol_pen; + top z1 = (w/2,h-topgap+o); + bot z2 = (w/2, -d+bottomgap-o); z3 - z4 = (z1-z2) rotated 60; z5 - z6 = (z1-z2) rotated 120; 0.5[z3,z4] = 0.5 [z5,z6] = 0.5[z1,z2]; - draw z1--z2; draw z3--z4; draw z5--z6; -enddef; - -beginchar("*",wd#,ht#,dp#); "Special instructions"; pickup symbol_pen; drawstar(h-topgap,-d+bottomgap); charbox; endchar; + for k=1,3,5: + z[k]' = 0.25[z[k],z[k+1]]; + 0.5[z[k+1]',z[k]']=0.5[z1,z2]; + z[k]'' = 0.5[z[k],z[k+1]]; + penpos[k]'(symbolwidth, angle (z[k]-z[k+1])+90); + penpos[k+1]'(symbolwidth, angle (z[k]-z[k+1])+90); + penpos[k]''((1/sqrt(3))*symbolwidth, angle (z[k]-z[k+1])+90); + draw z[k]--z[k]'; draw z[k+1]--z[k+1]'; + penstroke z[k]'e{z[k+1]-z[k]}..z[k]''e..{z[k+1]-z[k]}z[k+1]'e; + endfor +charbox; endchar; %beginchar("a",wd#,ht#,dp#); "Small bobble"; % pickup symbol_pen; @@ -268,25 +305,25 @@ def drawhat(expr linewd) = fill z3l---z1l3..z1l2---z2l..z2m..z2r---z1r---z3r..z3m..cycle; enddef; - +% Increases and decreases beginchar(1,wd#,ht#,dp#); "Make 1 from N"; % Fontforge keeps mangling this symbol, so I'm doing it the slow, hard, but reliable way. drawhat(symbolwidth); - symbolpic0 := currentpicture; + symbolpic0 := currentpicture; symbolpicwd0 := w; charbox; endchar; beginchar(2,wd#,ht#,dp#); "Purl make 1 from N"; drawhat(purl_symbolwidth); - symbolpic1 := currentpicture; + symbolpic1 := currentpicture; symbolpicwd1 := w; purlbox; endchar; beginchar(3,wd#,ht#,dp#); "Make N from 1"; - flipvert(symbolpic0)(currentpicture); + flipvert(symbolpic0)(currentpicture); currentpicture := currentpicture shifted ((w-symbolpicwd0)/2,0); charbox; endchar; beginchar(4,wd#,ht#,dp#); "Purl make N from 1"; - flipvert(symbolpic1)(currentpicture); + flipvert(symbolpic1)(currentpicture); currentpicture := currentpicture shifted ((w-symbolpicwd1)/2,0); purlbox; endchar; -beginchar("U",wd#,ht#,dp#); "Cast on"; +beginchar("U",incrwidth(0,1),ht#,dp#); "Cast on"; if fonttype <> purltype: pickup symbol_pen; bot y1 = bot y3 = -d+bottomgap; @@ -294,27 +331,25 @@ beginchar("U",wd#,ht#,dp#); "Cast on"; draw z1{right}..z2{left}..z3{right}; fi endchar; -beginchar("f",wd#,ht#,dp#); "Bind off knitwise"; +beginchar("f",decrwidth(1,0),ht#,dp#); "Bind off knitwise"; if fonttype <> purltype: pickup symbol_pen; - x1 = 0; x3 = w; x2 = w/2; + x3-x1=wd; 0.5[x1,x3]=w/2; x2 = 0.5[x1,x3]; y1 = y3 = (h-d)/2; top y2 = h-topgap; bot z4 = (w/2, -d+bottomgap); - draw z1..z2{right}..z3; + symbolpath0 := z1..z2{right}..z3; + draw symbolpath0; %draw z4--bot z1; fi endchar; -beginchar("F",wd#,ht#,dp#); "Bind off purlwise"; +beginchar("F",decrwidth(1,0),ht#,dp#); "Bind off purlwise"; if fonttype <> purltype: - pickup symbol_pen; - x1 = 0; x3 = w; x2 = w/2; - y1 = y3 = (h-d)/2; top y2 = h-topgap; - draw z1..z2{right}..z3; + pickup purl_symbol_pen; + draw symbolpath0; fi purlfill; endchar; -beginchar("Z",wd#,ht#,dp#); "Knit one doubly elongated"; +beginchar("Z",incrwidth(1,3),ht#,dp#); "Knit one doubly elongated"; pickup symbol_pen; -% drawstar(h-topgap,-d+bottomgap); 0.5[z1,z7] = top (w/2, -d+min_bottomgap); y1 = y7; x7 - x1 = 0.8(x8 - x0); @@ -351,7 +386,7 @@ beginchar("Z",wd#,ht#,dp#); "Knit one doubly elongated"; charbox; endchar; -beginchar("z",wd#,ht#,dp#); "Knit one elongated"; +beginchar("z",incrwidth(1,2),ht#,dp#); "Knit one elongated"; pickup symbol_pen; 0.5[z1,z5] = top (w/2, -d+small_bottomgap); y1 = y5; @@ -372,6 +407,24 @@ beginchar("z",wd#,ht#,dp#); "Knit one elongated"; ..tension midtension..z4{right}..z6{down}..z5{dir(-endangle)}; charbox; endchar; +beginchar("9",incrwidth(1,2),ht#,dp#); "CYCA knit one elongated"; + pickup symbol_pen; + y0l=y0r; y1l=y1r; y2l=y2r; + x0r=wd-x0l; + x1r=wd-x1l; + x2r=wd-x2l; + z0l = top rt (mingap-ho,-d+small_bottomgap-o); + y1l = bot h-small_topgap; + x2r-x2l = y1l-y0l+2(smallgap-mingap-o/2); + x1l = 0.23[x2l,x2r]; + y2l = 0.7[y0l,y1l]; + draw z0l..tension 3..z1l{left}..z2l{down}..tension 1.5.. + z2r{up}..z1r{left}..tension 3..z0r; + labels(0l,1l,2l,0r,1r,2r); + currentpicture := currentpicture shifted ((w-wd)/2,0); + charbox; endchar; + + beginchar(25,wd#/2,ht#,dp#); "Left end of a wide increase"; if fonttype <> purltype: @@ -387,7 +440,7 @@ beginchar(25,wd#/2,ht#,dp#); "Left end of a wide increase"; draw (0,h)--(0,-d); draw (0,-d)--lft (w,-d); fi fi fi - symbolpic0 := currentpicture; + symbolpic0 := currentpicture; symbolpicwd0 := w; endchar; beginchar(22,wd#/2,ht#,dp#); "Extender for a wide increase/decrease"; if fonttype <> purltype: @@ -403,11 +456,11 @@ beginchar(22,wd#/2,ht#,dp#); "Extender for a wide increase/decrease"; fi fi fi endchar; beginchar(26,wd#/2,ht#,dp#); "Right end of a wide increase"; - fliphoriz(symbolpic0)(currentpicture); endchar; + fliphoriz(symbolpic0)(currentpicture); currentpicture := currentpicture shifted (-(w-symbolpicwd0)/2,0); endchar; beginchar(27,wd#/2,ht#,dp#); "Left end of a wide decrease"; - flipvert(symbolpic0)(currentpicture); endchar; + flipvert(symbolpic0)(currentpicture); currentpicture := currentpicture shifted ((w-symbolpicwd0)/2,0); endchar; beginchar(28,wd#/2,ht#,dp#); "Right end of a wide decrease"; - fliphoriz(symbolpic0)(currentpicture); flipvert(currentpicture)(currentpicture);endchar; + fliphoriz(symbolpic0)(currentpicture); currentpicture := currentpicture shifted (-(w-symbolpicwd0)/2,0); flipvert(currentpicture)(currentpicture);endchar; beginchar(29,wd#,ht#,dp#); "Middle of a wide increase"; if fonttype <> purltype: @@ -425,15 +478,15 @@ beginchar(29,wd#,ht#,dp#); "Middle of a wide increase"; pickup pensquare scaled gridwidth; draw lft (w,h) -- rt (0,h); draw rt (0,-d) -- lft (w,-d); fi fi fi - symbolpic0 := currentpicture; + symbolpic0 := currentpicture; symbolpicwd0 := w; endchar; beginchar(30,wd#,ht#,dp#); "Middle of a wide decrease"; - flipvert(symbolpic0)(currentpicture); + flipvert(symbolpic0)(currentpicture); currentpicture := currentpicture shifted ((w-symbolpicwd0)/2,0); endchar; if 5*wd# < symbolmaxwd#: -beginchar(31,5wd#,ht#,dp#); "Make 1 from 5"; +beginchar(31,if fonttype = counttype: decrwidth(5,1) else: 5wd# fi,ht#,dp#); "Make 1 from 5"; pickup pensquare xscaled wideinctip yscaled wideincline; top z1 = (w/2,h-min_topgap+o); x2 = wd/3; bot y2 = bot y3 = -d+min_bottomgap-o; @@ -449,18 +502,18 @@ beginchar(31,5wd#,ht#,dp#); "Make 1 from 5"; endchar; fi -beginchar("~",wd#,ht#,dp#); "Empty box (spacer)"; endchar; -beginchar("`",0.5wd#,ht#,dp#); "Empty box (spacer)"; endchar; -beginchar("'",0.5wd#,ht#,dp#); "Empty box (spacer)"; +beginchar("~",incrwidth(0,0),ht#,dp#); "Empty box (spacer)"; endchar; +beginchar("`",if fonttype = counttype: 0 else: 0.5wd# fi,ht#,dp#); "Empty box (spacer)"; endchar; +beginchar("'",if fonttype = counttype: 0 else: 0.5wd# fi,ht#,dp#); "Empty box (spacer)"; if fonttype = purltype: fill (0,-d)--(w,-d)--(w,h)--(0,h)--cycle; fi endchar; -beginchar("m",wd#,ht#,dp#); "Make one"; +beginchar("m",incrwidth(0,1),ht#,dp#); "Make one"; pickup symbol_pen; drawM(h-topgap, -d+bottomgap, 0.5(h+d),symbolwidth); charbox; endchar; -beginchar("M",wd#,ht#,dp#); "Make one purlwise"; +beginchar("M",incrwidth(0,1),ht#,dp#); "Make one purlwise"; pickup purl_symbol_pen; drawM(h-topgap, -d+bottomgap, 0.5(h+d),purl_symbolwidth); purlbox; endchar; @@ -500,7 +553,7 @@ beginchar("M",wd#,ht#,dp#); "Make one purlwise"; % drawB(topgap, bottomgap, purl_symbolwidth); % purlbox; endchar; -beginchar("|",overlinewd#,ht#,dp#); "Divider"; +beginchar("|",if fonttype <> counttype: overlinewd# else: 0 fi,ht#,dp#); "Divider"; if fonttype <> purltype: fill(0,-d-gridwidth/2-purlextend)--(0,h+gridwidth/2+purlextend) --(w,h+gridwidth/2+purlextend)--(w,-d-gridwidth/2-purlextend) @@ -515,7 +568,7 @@ path twistpath[]; pair time; -beginchar("x",wd#,ht#,dp#); "Twist slanting right"; +beginchar("x",incrwidth(0,1),ht#,dp#); "Twist slanting right"; pickup symbol_pen; bot lft z0 = (0.5w-0.4 standardheight-ho,-d+small_bottomgap-o); bot rt z4 = (0.5w+0.4 standardheight+ho,-d+small_bottomgap-o); @@ -561,36 +614,36 @@ beginchar("x",wd#,ht#,dp#); "Twist slanting right"; z1e{up}..z2e{left}..z3e{down} ;%..z4e{direction 4 of twistpath0}; - symbolpic0 := currentpicture; + symbolpic0 := currentpicture; symbolpicwd0 := w; labels(0,1,2,3,4,5); charbox; endchar; numeric t[]; -beginchar("t",wd#,ht#,dp#); "Twist slanting left"; - fliphoriz(symbolpic0)(currentpicture); +beginchar("t",incrwidth(0,1),ht#,dp#); "Twist slanting left"; + fliphoriz(symbolpic0)(currentpicture); currentpicture := currentpicture shifted (-(w-symbolpicwd0)/2,0); charbox; endchar; -beginchar("X",wd#,ht#,dp#); "Purl right twist"; - currentpicture := symbolpic0; +beginchar("X",incrwidth(0,1),ht#,dp#); "Purl right twist"; + currentpicture := symbolpic0; currentpicture := currentpicture shifted ((w-symbolpicwd0)/2,0); purlbox; endchar; -beginchar("T",wd#,ht#,dp#); "Purl left twist"; - fliphoriz(symbolpic0)(currentpicture); +beginchar("T",incrwidth(0,1),ht#,dp#); "Purl left twist"; + fliphoriz(symbolpic0)(currentpicture); currentpicture := currentpicture shifted (-(w-symbolpicwd0)/2,0); purlbox; endchar; beginchar("b",wd#,ht#,dp#); "Right upside-down twist"; - flipvert(symbolpic0)(currentpicture); - symbolpic0 := currentpicture; + flipvert(symbolpic0)(currentpicture); currentpicture := currentpicture shifted ((w-symbolpicwd0)/2,0); + symbolpic0 := currentpicture; symbolpicwd0 := w; charbox; endchar; beginchar("q",wd#,ht#,dp#); "Left upside-down twist"; - fliphoriz(symbolpic0)(currentpicture); - symbolpic0 := currentpicture; + fliphoriz(symbolpic0)(currentpicture); currentpicture := currentpicture shifted (-(w-symbolpicwd0)/2,0); + symbolpic0 := currentpicture; symbolpicwd0 := w; charbox; endchar; beginchar("Q",wd#,ht#,dp#); "Purl right upside-down twist"; - currentpicture := symbolpic0; + currentpicture := symbolpic0; currentpicture := currentpicture shifted ((w-symbolpicwd0)/2,0); purlbox; endchar; beginchar("B",wd#,ht#,dp#); "Purl left upside-down twist"; - fliphoriz(symbolpic0)(currentpicture); + fliphoriz(symbolpic0)(currentpicture); currentpicture := currentpicture shifted (-(w-symbolpicwd0)/2,0); purlbox; endchar; %2/1 increases and decreases @@ -603,24 +656,24 @@ def drawSSK(expr topheight,bottom) = draw symbolpath0; enddef; -beginchar("<",decrwidth(2),ht#,dp#); "SSK or left-slant cable"; +beginchar("<",decrwidth(2,1),ht#,dp#); "SSK or left-slant cable"; pickup symbol_pen; drawSSK(h-topgap,-d+bottomgap); - symbolpic0 := currentpicture; + symbolpic0 := currentpicture; symbolpicwd0 := w; charbox; endchar; -beginchar(">",decrwidth(2),ht#,dp#); "k2tog or right-slant cable"; - fliphoriz(symbolpic0)(currentpicture); +beginchar(">",decrwidth(2,1),ht#,dp#); "k2tog or right-slant cable"; + fliphoriz(symbolpic0)(currentpicture); currentpicture := currentpicture shifted (-(w-symbolpicwd0)/2,0); charbox; endchar; -beginchar(";",decrwidth(2),ht#,dp#); "P2tog"; +beginchar(";",decrwidth(2,1),ht#,dp#); "P2tog"; pickup purl_symbol_pen; draw symbolpath0; - symbolpic0 := currentpicture; + symbolpic0 := currentpicture; symbolpicwd0 := w; purlbox; endchar; -beginchar(":",decrwidth(2),ht#,dp#); "SSP"; - fliphoriz(symbolpic0)(currentpicture); +beginchar(":",decrwidth(2,1),ht#,dp#); "SSP"; + fliphoriz(symbolpic0)(currentpicture); currentpicture := currentpicture shifted (-(w-symbolpicwd0)/2,0); purlbox; endchar; -beginchar("j",incrwidth(1),ht#,dp#); "Lifted increase slanting left"; +beginchar("j",incrwidth(0,1),ht#,dp#); "Lifted increase slanting left"; pickup symbol_pen; top lft z1 = (0.5w-0.5 standardheight-ho,h-topgap+o); bot rt z2 = (0.5w+0.5 standardheight, -d+bottomgap-o); @@ -628,23 +681,26 @@ beginchar("j",incrwidth(1),ht#,dp#); "Lifted increase slanting left"; definearrow(symbolpath0)((y1-y2)/3)(symbolpath1); draw symbolpath0; draw symbolpath1; - symbolpic0 := currentpicture; + symbolpic0 := currentpicture; symbolpicwd0 := w; charbox; endchar; -beginchar("i",incrwidth(1),ht#,dp#); "Lifted increase slanting right"; - fliphoriz(symbolpic0)(currentpicture); +beginchar("i",incrwidth(0,1),ht#,dp#); "Lifted increase slanting right"; + fliphoriz(symbolpic0)(currentpicture); currentpicture := currentpicture shifted (-(w-symbolpicwd0)/2,0); charbox; endchar; -beginchar("J",incrwidth(1),ht#,dp#); "Purl increase slanting right"; +beginchar("J",incrwidth(0,1),ht#,dp#); "Purl increase slanting right"; pickup purl_symbol_pen; draw symbolpath0; draw symbolpath1; - symbolpic0 := currentpicture; + symbolpic0 := currentpicture; symbolpicwd0 := w; purlbox; endchar; -beginchar("I",incrwidth(1),ht#,dp#); "Purl increase slanting left"; - fliphoriz(symbolpic0)(currentpicture); +beginchar("I",incrwidth(0,1),ht#,dp#); "Purl increase slanting left"; + fliphoriz(symbolpic0)(currentpicture); currentpicture := currentpicture shifted (-(w-symbolpicwd0)/2,0); purlbox; endchar; beginchar("(",wd#,ht#,dp#); "Left-slanting line"; pickup symbol_pen; + top lft z1 = (0.5w-0.5 standardheight-ho,h-topgap+o); + bot rt z2 = (0.5w+0.5 standardheight, -d+bottomgap-o); + symbolpath0 := z2--z1; draw symbolpath0; charbox; endchar; beginchar(")",wd#,ht#,dp#); "Right-slanting line"; @@ -653,7 +709,7 @@ beginchar(")",wd#,ht#,dp#); "Right-slanting line"; fliphoriz(currentpicture)(currentpicture); charbox; endchar; -beginchar("y",incrwidth(2),ht#,dp#); "Knit front and back"; +beginchar("y",incrwidth(1,2),ht#,dp#); "Knit front and back"; pickup symbol_pen; bot lft z1 = (0.5w-0.495 Vwidth-ho,-d+bottomgap-o); top rt z2 = (0.5w+0.495 Vwidth+ho,h-topgap+o); @@ -663,46 +719,72 @@ beginchar("y",incrwidth(2),ht#,dp#); "Knit front and back"; z5 = whatever[z1,z2] = whatever[z3,z4]; draw z1--z2; draw z4--z5; - symbolpic0 := currentpicture; + symbolpic0 := currentpicture; symbolpicwd0 := w; charbox; endchar; -beginchar("u",incrwidth(2),ht#,dp#); "Knit back and front"; - fliphoriz(symbolpic0)(currentpicture); +beginchar("u",incrwidth(1,2),ht#,dp#); "Knit back and front"; + fliphoriz(symbolpic0)(currentpicture); currentpicture := currentpicture shifted (-(w-symbolpicwd0)/2,0); charbox; endchar; - -beginchar("4",incrwidth(2),ht#,dp#); "Alternative SSK"; - flipvert(symbolpic0)(currentpicture); +beginchar("4",decrwidth(2,1),ht#,dp#); "Alternative SSK"; + flipvert(symbolpic0)(currentpicture); currentpicture := currentpicture shifted ((w-symbolpicwd0)/2,0); charbox; endchar; -beginchar("5",incrwidth(2),ht#,dp#); "Alternative K2tog"; - flipvert(symbolpic0)(currentpicture); +beginchar("5",decrwidth(2,1),ht#,dp#); "Alternative K2tog"; + flipvert(symbolpic0)(currentpicture); currentpicture := currentpicture shifted ((w-symbolpicwd0)/2,0); fliphoriz(currentpicture)(currentpicture); charbox; endchar; -beginchar("v",incrwidth(2),ht#,dp#); "Generic make 2 from 1"; + +beginchar("7",incrwidth(1,2),ht#,dp#); "Alt front and back"; + pickup symbol_pen; + x0 = x1 = x2; + bot y0 = -d+small_bottomgap; + top y1 = h-small_topgap; + 0.5[x3+ho,x0] = w/2; + z3 = z2 + whatever*(-1.2,1); + y3 = 0.9[y0,y1]; + y2 = 0.4[y0,y1]; + draw z2--z3; draw z1--z0; + symbolpic0 := currentpicture; symbolpicwd0 := w; + charbox; endchar; +beginchar("8",incrwidth(1,2),ht#,dp#); "Alt back and front"; + fliphoriz(symbolpic0)(currentpicture); currentpicture := currentpicture shifted (-(w-symbolpicwd0)/2,0); + charbox; endchar; + + + +beginchar("v",incrwidth(1,2),ht#,dp#); "Generic make 2 from 1"; pickup symbol_pen; top rt z1 = (0.5w+0.5 Vwidth+ho,h-topgap+o); bot y2 = -d+bottomgap-o; x2 = 0.5[x1,x3]; top lft z3 = (0.5w-0.5 Vwidth-ho,h-topgap+o); symbolpath0 := z1--z2--z3; draw symbolpath0; - symbolpic0 := currentpicture; + symbolpic0 := currentpicture; symbolpicwd0 := w; charbox; endchar; -beginchar("V",incrwidth(2),ht#,dp#); "Purl make 2 from 1"; +beginchar("V",incrwidth(1,2),ht#,dp#); "Purl make 2 from 1"; pickup purl_symbol_pen; draw symbolpath0; - symbolpic1 := currentpicture; + symbolpic1 := currentpicture; symbolpicwd1 := w; purlbox; endchar; +beginchar("6",wd#,ht#,dp#); "V with bar"; + pickup symbol_pen; + currentpicture := symbolpic0; currentpicture := currentpicture shifted ((w-symbolpicwd0)/2,0); + 0.5[x0,x1]=w/2; + y0=y1=0.6[-d+bottomgap,h-topgap]; + rt x1-lft x0 = Wwidth; + draw z0--z1; + charbox; endchar; -beginchar("!",incrwidth(2),ht#,dp#); "Make 1 from 2"; - flipvert(symbolpic0)(currentpicture); +beginchar("!",decrwidth(2,1),ht#,dp#); "Make 1 from 2"; + flipvert(symbolpic0)(currentpicture); currentpicture := currentpicture shifted ((w-symbolpicwd0)/2,0); charbox; endchar; -beginchar("2",incrwidth(2),ht#,dp#); "Make 1 from 2 purlwise"; - flipvert(symbolpic1)(currentpicture); - purlbox; endchar; +beginchar("2",decrwidth(2,1),ht#,dp#); "Make 1 from 2 purlwise"; + flipvert(symbolpic1)(currentpicture); currentpicture := currentpicture shifted ((w-symbolpicwd1)/2,0); + purlbox; endchar; %Double decreases and increases -beginchar("w",incrwidth(3),ht#,dp#); "make 3 from 1"; +beginchar("w",incrwidth(1,3),ht#,dp#); "make 3 from 1"; pickup symbol_pen; top lft z1 = (0.5w-0.5 Wwidth-ho,h-small_topgap+o); bot z2 = (0.5w,-d+small_bottomgap-o); @@ -713,12 +795,12 @@ beginchar("w",incrwidth(3),ht#,dp#); "make 3 from 1"; symbolpath1 := z2--z4; draw symbolpath1; charbox; endchar; -beginchar("W",incrwidth(3),ht#,dp#); "Purl make 3 from 1"; +beginchar("W",incrwidth(1,3),ht#,dp#); "Purl make 3 from 1"; pickup purl_symbol_pen; draw symbolpath0; draw symbolpath1; - symbolpic0 := currentpicture; + symbolpic0 := currentpicture; symbolpicwd0 := w; purlbox; endchar; -beginchar("Y",incrwidth(3),ht#,dp#); "Make 3 from 1 with YO center"; +beginchar("Y",incrwidth(1,3),ht#,dp#); "Make 3 from 1 with YO center"; pickup symbol_pen; draw symbolpath0; top z4 = (0.5w, h-small_topgap+o); @@ -727,10 +809,10 @@ beginchar("Y",incrwidth(3),ht#,dp#); "Make 3 from 1 with YO center"; draw z4..z6..z5..z7..cycle; charbox; endchar; -beginchar("E",incrwidth(3),ht#,dp#); "make 3 from 1 with purl center"; +beginchar("E",incrwidth(1,3),ht#,dp#); "make 3 from 1 with purl center"; pickup symbol_pen; if fonttype <> purltype: - currentpicture := symbolpic0; + currentpicture := symbolpic0; currentpicture := currentpicture shifted ((w-symbolpicwd0)/2,0); else: z1 = point 0 of symbolpath0; z2 = point 1 of symbolpath0; @@ -739,55 +821,107 @@ beginchar("E",incrwidth(3),ht#,dp#); "make 3 from 1 with purl center"; fi endchar; -beginchar("A",decrwidth(3),ht#,dp#); "Make 1 from 3"; +beginchar("A",decrwidth(3,1),ht#,dp#); "Make 1 from 3"; pickup symbol_pen; bot lft z1 = (0.5w-0.5 biggerheight-ho,-d+small_bottomgap-o); - top z2 = (0.5w, h-small_topgap+o); - bot rt z3 = (0.5w+0.5 biggerheight, -d+small_bottomgap-o); + bot rt z3 = (0.5w+0.5 biggerheight+ho,-d+small_bottomgap-o); + top z2 = (xpart z4, h-small_topgap+o); z4 = 0.5[z1,z3]; symbolpath0 := z1--z2--z3; symbolpath1 := z2--z4; draw symbolpath0; draw symbolpath1; + labels(1,2,3,4); charbox; endchar; -beginchar("3",decrwidth(3),ht#,dp#); "Purl make 1 from 3"; +beginchar("3",decrwidth(3,1),ht#,dp#); "Purl make 1 from 3"; pickup purl_symbol_pen; draw symbolpath0; draw symbolpath1; purlbox; endchar; -beginchar("R",decrwidth(3),ht#,dp#); "k3tog"; +beginchar("R",decrwidth(3,1),ht#,dp#); "k3tog"; pickup symbol_pen; + finesymbolwidth := 4/7symbolwidth; + top rt z0 = (0.5w+0.5 biggerheight, h-small_topgap+o); bot lft z1 = (0.5w-0.5 biggerheight-ho,-d+small_bottomgap-o); - top rt z2 = (0.5w+0.5 biggerheight, h-small_topgap+o); bot rt z3 = (0.5w+0.5 biggerheight, -d+small_bottomgap-o); - z4 = 0.5[z1,z3]; - draw z1--z2--z3; - draw z4--0.5[z4,z2]; - symbolpic0 := currentpicture; + + % The line z0--z4 is halfway between z0--z1 and z0--z3 as angles + z4 = whatever[z1,z3]; + z4 = z0+whatever*(dir 0.5[angle(z1-z0),angle(z3-z0)]); + z5 = 0.5[z1,z3]; + + z2 = 0.5[z4,z5]; + + z1' = 0.5[z1,z0]; + z3' = 0.2[z3,z0]; + z2'' = z0; + z2' = 0.2[z2,z2'']; + penpos1(symbolwidth, -90+angle (z0-z1)); + penpos1'(symbolwidth, -90+angle (z0-z1)); + penpos3(symbolwidth, 0); + penpos3'(symbolwidth, 0); + + z1''l = whatever[z1l,z1'l]; + z1''l = z0 + whatever*((z1-z0) rotated 90); + penpos1''(finesymbolwidth, -90+angle (z0-z1)); + + z3''r = (x3r,y0); + penpos3''(finesymbolwidth, 0); + + penpos2(symbolwidth, -90+angle (z2''-z2)); + penpos2'(symbolwidth, -90+angle (z2''-z2)); + penpos2''(finesymbolwidth, -90+angle (z2''-z2)); + + symbolpath1 := z1''l..z1'l---z1l..z1r---z1'r..z1''r; + symbolpath2 := z2''l..z2'l---z2l..z2r---z2'r..z2''r; + symbolpath3 := z3''l..z3'l---z3l..z3r---z3'r..z3''r; + % Not penstroke because we want the endpoints to be rounded + + numeric t[]; + (t12,t21) = symbolpath1 intersectiontimes symbolpath2; + (t23,t32) = symbolpath2 intersectiontimes symbolpath3; + fill (subpath(0,t12) of symbolpath1 + -- subpath (t21,t23) of symbolpath2 + -- subpath (t32,infinity) of symbolpath3 + -- z3''r{z3''r-z3'r}..{z1-z0}cycle + ); + %pickup pencircle scaled 0.01pt; + %draw symbolpath2; draw symbolpath3; + + symbolpic0 := currentpicture; symbolpicwd0 := w; + labels(1,2,3,1',2',3',1r,1l,2r,2l,3r,3l,1'r,1'l,2'r,2'l,3'r,3'l, 1''r,1''l); + + symbolpath0 := z1--z0--z3--z2; charbox; endchar; -beginchar("L",decrwidth(3),ht#,dp#); "SSSK"; +beginchar("L",decrwidth(3,1),ht#,dp#); "SSSK"; + + %draw subpath(0,2) of symbolpath0; + %draw point 3 of symbolpath0--point 1 of symbolpath0; fliphoriz(symbolpic0)(currentpicture); + %currentpicture := currentpicture shifted (-(w-symbolpicwd0)/2,0); charbox; endchar; -beginchar("r",decrwidth(3),ht#,dp#); "LRC"; +beginchar("r",decrwidth(3,1),ht#,dp#); "LRC"; pickup symbol_pen; bot lft z1 = (0.5w-0.5 biggerheight-ho,-d+small_bottomgap-o); top rt z2 = (0.5w+0.5 biggerheight+ho,h-small_topgap+o); bot rt z3 = (0.5w+0.5 biggerheight+ho,-d+small_bottomgap-o); top lft z4 = (0.5w-0.5 biggerheight-ho,h-small_topgap+o); - z5 = alpha[z1,z2]; z5 = beta[z3,z4]; + x5 = 0.5w; y5 = 0.53[y1,y4]; x6=x5; y6=y1; - draw z1--z2; + draw z1..z5..z2; draw z3--z5; draw z5--z6; - symbolpic0 := currentpicture; + + symbolpic0 := currentpicture; symbolpicwd0 := w; + labels(1,2,3,4,5,6,7); charbox; endchar; -beginchar("l",decrwidth(3),ht#,dp#); "RLC"; - fliphoriz(symbolpic0)(currentpicture); +beginchar("l",decrwidth(3,1),ht#,dp#); "RLC"; + fliphoriz(symbolpic0)(currentpicture); currentpicture := currentpicture shifted (-(w-symbolpicwd0)/2,0); charbox; endchar; -beginchar("a",decrwidth(3),ht#,dp#); "LRC"; +beginchar("a",decrwidth(3,1),ht#,dp#); "LRC"; pickup symbol_pen; bot lft z1 = (0.5w-0.5 biggerheight-ho,-d+small_bottomgap-o); top rt z2 = (0.5w+0.5 biggerheight+ho,h-small_topgap+o); @@ -800,6 +934,28 @@ beginchar("a",decrwidth(3),ht#,dp#); "LRC"; draw z3--z5; draw z6--z7; charbox; endchar; + +% Rownumber triangles (modified from manfnt.mf) + +trianglecharwd# = 19/3 pt#; + +beginchar("}", trianglecharwd#, 6.25pt#, 0); "Triangle pointing right"; + if (fonttype = foretype) or (fonttype = bothtype) or (fonttype = counttype): + x1=x2=w-x3-max(purlextend, 0.5gridwidth)=4/3pt; y3=.5h; + y1-y3=y3-y2; + y1-y2 = 1.3*(x3-x1); + % For an equilateral triangle, use 2/sqrt 3 = 1.1547 + fill z1--z2--z3--cycle; + fi + symbolpic0 := currentpicture; + labels(1,2,3); endchar; + +beginchar("{", trianglecharwd#, 6.25pt#, 0); "Triangle pointing left"; + fliphoriz(symbolpic0)(currentpicture); + endchar; + + +% Wrapped stitches beginchar("?",wd#,ht#,dp#); "Left end of wrapped stitches"; pickup symbol_pen; @@ -840,7 +996,7 @@ beginchar("?",wd#,ht#,dp#); "Left end of wrapped stitches"; draw lft z0r--rt (0,y0r); if wraplines=3: draw lft z1r--rt (0,y1r); fi draw lft z2r--rt (0,y2r); - symbolpic1 := currentpicture; + symbolpic1 := currentpicture; symbolpicwd1 := w; currentpicture := nullpicture; draw lft z0r---rt z0m; if wraplines=3: draw lft z1r---rt z1m; fi @@ -854,19 +1010,19 @@ beginchar("?",wd#,ht#,dp#); "Left end of wrapped stitches"; draw bot (w/2,h-small_topgap+o) -- top (w/2, -d+small_bottomgap-o); fi - symbolpic0 := currentpicture; + symbolpic0 := currentpicture; symbolpicwd0 := w; labels(0r,0m,0l,1r,1m,1l,2r,2m,2l); charbox; endchar; beginchar(23,wd#,ht#,dp#); "Middle of wrapped stitches"; pickup symbol_pen; - currentpicture := symbolpic1; + currentpicture := symbolpic1; currentpicture := currentpicture shifted ((w-symbolpicwd1)/2,0); if gridfont: else: draw bot (w/2,h-small_topgap+o) -- top (w/2, -d+small_bottomgap-o); fi charbox; endchar; beginchar(24,wd#,ht#,dp#); "Right end of wrapped stitches"; - fliphoriz(symbolpic0)(currentpicture); + fliphoriz(symbolpic0)(currentpicture); currentpicture := currentpicture shifted (-(w-symbolpicwd0)/2,0); charbox; endchar; ligtable "?": @@ -897,7 +1053,7 @@ beginchar("1",wd#,ht#,dp#); "Left end of single-wrapped stitches"; pickup pensquare scaled symbolwidth; draw lft z1r--rt (0,y1r); - symbolpic1 := currentpicture; + symbolpic1 := currentpicture; symbolpicwd1 := w; currentpicture := nullpicture; draw lft z1r---rt z1m; pickup symbol_pen; @@ -907,19 +1063,19 @@ beginchar("1",wd#,ht#,dp#); "Left end of single-wrapped stitches"; draw bot (w/2,h-topgap+o) -- top (w/2, -d+bottomgap-o); fi - symbolpic0 := currentpicture; + symbolpic0 := currentpicture; symbolpicwd0 := w; labels(1r,1m,1l); charbox; endchar; beginchar(17,wd#,ht#,dp#); "Middle of wrapped stitches"; pickup symbol_pen; - currentpicture := symbolpic1; + currentpicture := symbolpic1; currentpicture := currentpicture shifted ((w-symbolpicwd1)/2,0); if gridfont: else: draw bot (w/2,h-small_topgap+o) -- top (w/2, -d+small_bottomgap-o); fi charbox; endchar; -beginchar(18,wd#,ht#,dp#); "Right end of wrapped stitches"; - fliphoriz(symbolpic0)(currentpicture); +beginchar(18,decrwidth(1,0),ht#,dp#); "Right end of wrapped stitches"; + fliphoriz(symbolpic0)(currentpicture); currentpicture := currentpicture shifted (-(w-symbolpicwd0)/2,0); charbox; endchar; ligtable "1": diff --git a/Master/texmf-dist/fonts/source/public/knitting/knitg_sc_in.mf b/Master/texmf-dist/fonts/source/public/knitting/knitg_sc_in.mf new file mode 100644 index 00000000000..b0af5c39aa4 --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/knitting/knitg_sc_in.mf @@ -0,0 +1,25 @@ +% Date: 2010/08/10 + +mode_setup; + +boolean gridfont; gridfont := true; +boolean slantlines; slantlines = false; +fonttype = counttype; + +def incrwidth (expr stsin, stsout) = stsin*wd# enddef; +def decrwidth (expr stsin, stsout) = stsin*wd# enddef; +boolean incrwidthdefined; incrwidthdefined = true; + +input knit_dimens; + +if known ps_output: + font_identifier := "KnittingSymbols-grid-incount"; +fi + +string Vtitle; Vtitle := "Knit grid font for checking stitch counts"; + +input knit_symbols; + +input knit_grid_cables; + +end diff --git a/Master/texmf-dist/fonts/source/public/knitting/knitg_sc_out.mf b/Master/texmf-dist/fonts/source/public/knitting/knitg_sc_out.mf new file mode 100644 index 00000000000..1166146ffcd --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/knitting/knitg_sc_out.mf @@ -0,0 +1,25 @@ +% Date: 2010/08/10 + +mode_setup; + +boolean gridfont; gridfont := true; +boolean slantlines; slantlines = false; +fonttype = counttype; + +def incrwidth (expr stsin, stsout) = stsout*wd# enddef; +def decrwidth (expr stsin, stsout) = stsout*wd# enddef; +boolean incrwidthdefined; incrwidthdefined = true; + +input knit_dimens; + +if known ps_output: + font_identifier := "KnittingSymbols-grid-outcount"; +fi + +string Vtitle; Vtitle := "Knit grid font for checking stitch counts"; + +input knit_symbols; + +input knit_grid_cables; + +end diff --git a/Master/texmf-dist/fonts/source/public/knitting/knitgg.mf b/Master/texmf-dist/fonts/source/public/knitting/knitgg.mf index 2e8ae81800d..627630fd076 100644 --- a/Master/texmf-dist/fonts/source/public/knitting/knitgg.mf +++ b/Master/texmf-dist/fonts/source/public/knitting/knitgg.mf @@ -1,4 +1,5 @@ -%mode=localfont; % Run mf knit_grid; then run gftopk knit_grid.600gf +% Date: 2010/08/10 + mode_setup; boolean gridfont; gridfont := true; diff --git a/Master/texmf-dist/fonts/source/public/knitting/knitgn.mf b/Master/texmf-dist/fonts/source/public/knitting/knitgn.mf index cc785ea68bd..c47ef4dc985 100644 --- a/Master/texmf-dist/fonts/source/public/knitting/knitgn.mf +++ b/Master/texmf-dist/fonts/source/public/knitting/knitgn.mf @@ -1,4 +1,5 @@ -%mode=localfont; % Run mf knit_grid; then run gftopk knit_grid.600gf +% Date: 2010/08/10 + mode_setup; boolean gridfont; gridfont := true; diff --git a/Master/texmf-dist/fonts/source/public/knitting/knitgp.mf b/Master/texmf-dist/fonts/source/public/knitting/knitgp.mf index 6f321d5d1ed..37102efd203 100644 --- a/Master/texmf-dist/fonts/source/public/knitting/knitgp.mf +++ b/Master/texmf-dist/fonts/source/public/knitting/knitgp.mf @@ -1,4 +1,5 @@ -%mode=localfont; % Run mf knit_grid; then run gftopk knit_grid.600gf +% Date: 2010/08/10 + mode_setup; boolean gridfont; gridfont := true; diff --git a/Master/texmf-dist/fonts/source/public/knitting/knitn_sc_in.mf b/Master/texmf-dist/fonts/source/public/knitting/knitn_sc_in.mf new file mode 100644 index 00000000000..2d66d3ddff8 --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/knitting/knitn_sc_in.mf @@ -0,0 +1,24 @@ +% Date: 2010/08/10 + +mode_setup; + +boolean gridfont; gridfont := false; +fonttype = counttype; + +def incrwidth (expr stsin, stsout) = stsin*wd# enddef; +def decrwidth (expr stsin, stsout) = stsin*wd# enddef; +boolean incrwidthdefined; incrwidthdefined = true; + +input knit_dimens; + +if known ps_output: + font_identifier := "KnittingSymbols-nogrid-incount"; +fi + +string Vtitle; Vtitle := "Knit nogrid font for checking stitch counts"; + +input knit_symbols; + +input knit_nogrid_cables; + +end diff --git a/Master/texmf-dist/fonts/source/public/knitting/knitn_sc_out.mf b/Master/texmf-dist/fonts/source/public/knitting/knitn_sc_out.mf new file mode 100644 index 00000000000..1f5b40fcfa7 --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/knitting/knitn_sc_out.mf @@ -0,0 +1,24 @@ +% Date: 2010/08/10 + +mode_setup; + +boolean gridfont; gridfont := false; +fonttype = counttype; + +def incrwidth (expr stsin, stsout) = stsout*wd# enddef; +def decrwidth (expr stsin, stsout) = stsout*wd# enddef; +boolean incrwidthdefined; incrwidthdefined = true; + +input knit_dimens; + +if known ps_output: + font_identifier := "KnittingSymbols-nogrid-outcount"; +fi + +string Vtitle; Vtitle := "Knit nogrid font for checking stitch counts"; + +input knit_symbols; + +input knit_nogrid_cables; + +end diff --git a/Master/texmf-dist/fonts/source/public/knitting/knitnl.mf b/Master/texmf-dist/fonts/source/public/knitting/knitnl.mf index 6cdd723b036..6e04a8ee958 100644 --- a/Master/texmf-dist/fonts/source/public/knitting/knitnl.mf +++ b/Master/texmf-dist/fonts/source/public/knitting/knitnl.mf @@ -1,4 +1,5 @@ -%mode=localfont; +% Date: 2010/08/10 + mode_setup; boolean gridfont; gridfont := false; diff --git a/Master/texmf-dist/fonts/source/public/knitting/knitnn.mf b/Master/texmf-dist/fonts/source/public/knitting/knitnn.mf index a58accfce10..6667fc5da7b 100644 --- a/Master/texmf-dist/fonts/source/public/knitting/knitnn.mf +++ b/Master/texmf-dist/fonts/source/public/knitting/knitnn.mf @@ -1,4 +1,5 @@ -%mode=localfont; +% Date: 2010/08/10 + mode_setup; boolean gridfont; gridfont := false; diff --git a/Master/texmf-dist/fonts/source/public/knitting/knitnp.mf b/Master/texmf-dist/fonts/source/public/knitting/knitnp.mf index 023cdd9e93c..61da7351076 100644 --- a/Master/texmf-dist/fonts/source/public/knitting/knitnp.mf +++ b/Master/texmf-dist/fonts/source/public/knitting/knitnp.mf @@ -1,4 +1,5 @@ -%mode=localfont; +% Date: 2010/08/10 + mode_setup; boolean gridfont; gridfont := false; diff --git a/Master/texmf-dist/fonts/source/public/knitting/knitnr.mf b/Master/texmf-dist/fonts/source/public/knitting/knitnr.mf index 5c7d6f2dd8f..081a17f3e2d 100644 --- a/Master/texmf-dist/fonts/source/public/knitting/knitnr.mf +++ b/Master/texmf-dist/fonts/source/public/knitting/knitnr.mf @@ -1,4 +1,5 @@ -%mode=localfont; +% Date: 2010/08/10 + mode_setup; boolean gridfont; gridfont := false; diff --git a/Master/texmf-dist/fonts/source/public/knitting/knitw_sc_in.mf b/Master/texmf-dist/fonts/source/public/knitting/knitw_sc_in.mf new file mode 100644 index 00000000000..c7f4cb7534e --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/knitting/knitw_sc_in.mf @@ -0,0 +1,25 @@ +% Date: 2010/08/10 + +mode_setup; + +boolean gridfont; gridfont := true; +fonttype = counttype; + +def incrwidth (expr stsin, stsout) = stsin*wd# enddef; +def decrwidth (expr stsin, stsout) = stsin*wd# enddef; +boolean incrwidthdefined; incrwidthdefined = true; + +wd# = widewd#; +input knit_dimens; + +if known ps_output: + font_identifier := "KnittingSymbols-wide-incount"; +fi + +string Vtitle; Vtitle := "Knit font for checking stitch counts"; + +input knit_symbols; + +input knit_grid_cables; + +end diff --git a/Master/texmf-dist/fonts/source/public/knitting/knitw_sc_out.mf b/Master/texmf-dist/fonts/source/public/knitting/knitw_sc_out.mf new file mode 100644 index 00000000000..9a0dd7c60bc --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/knitting/knitw_sc_out.mf @@ -0,0 +1,25 @@ +% Date: 2010/08/10 + +mode_setup; + +boolean gridfont; gridfont := true; +fonttype = counttype; + +def incrwidth (expr stsin, stsout) = stsout*wd# enddef; +def decrwidth (expr stsin, stsout) = stsout*wd# enddef; +boolean incrwidthdefined; incrwidthdefined = true; + +wd# = widewd#; +input knit_dimens; + +if known ps_output: + font_identifier := "KnittingSymbols-wide-outcount"; +fi + +string Vtitle; Vtitle := "Knit wide font for checking stitch counts"; + +input knit_symbols; + +input knit_grid_cables; + +end diff --git a/Master/texmf-dist/fonts/source/public/knitting/knitwg.mf b/Master/texmf-dist/fonts/source/public/knitting/knitwg.mf index 5fb5bd7efa0..7af89fe103c 100644 --- a/Master/texmf-dist/fonts/source/public/knitting/knitwg.mf +++ b/Master/texmf-dist/fonts/source/public/knitting/knitwg.mf @@ -1,4 +1,5 @@ -%mode=localfont; % Run mf knit_grid; then run gftopk knit_grid.600gf +% Date: 2010/08/10 + mode_setup; boolean gridfont; gridfont := true; diff --git a/Master/texmf-dist/fonts/source/public/knitting/knitwn.mf b/Master/texmf-dist/fonts/source/public/knitting/knitwn.mf index 8470efbde72..4c1ac2266eb 100644 --- a/Master/texmf-dist/fonts/source/public/knitting/knitwn.mf +++ b/Master/texmf-dist/fonts/source/public/knitting/knitwn.mf @@ -1,4 +1,5 @@ -%mode=localfont; % Run mf knit_grid; then run gftopk knit_grid.600gf +% Date: 2010/08/10 + mode_setup; boolean gridfont; gridfont := true; diff --git a/Master/texmf-dist/fonts/source/public/knitting/knitwp.mf b/Master/texmf-dist/fonts/source/public/knitting/knitwp.mf index 3b5e821655a..abe4307ac4f 100644 --- a/Master/texmf-dist/fonts/source/public/knitting/knitwp.mf +++ b/Master/texmf-dist/fonts/source/public/knitting/knitwp.mf @@ -1,4 +1,5 @@ -%mode=localfont; % Run mf knit_grid; then run gftopk knit_grid.600gf +% Date: 2010/08/10 + mode_setup; boolean gridfont; gridfont := true; |