1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
if odd smudge: epsil:=1; else: epsil:=0; fi;
show epsil;
def oddone(expr code,first)=
beginchar(code,gow#,goh#,0); "One digit black stone";
italcorr 0;
adjust_fit(0,0);
currentpicture:=blackstone;
for n=-(smudge-epsil)/2 step 1 until (smudge+epsil)/2:
currentpicture:=currentpicture-
(first shifted (oneleft,oneheight) shifted (0,n));
endfor;
endchar;
enddef;
def evenone(expr code,first)=
beginchar(code,gow#,goh#,0); "One digit white stone";
italcorr 0;
adjust_fit(0,0);
currentpicture:=whitestone+(first shifted (oneleft,oneheight));
endchar;
enddef;
def oddtwo(expr code,first,second)=
beginchar(code,gow#,goh#,0); "Two digit black stone";
italcorr 0;
adjust_fit(0,0);
currentpicture:=blackstone;
for n=-(smudge-epsil)/2 step 1 until (smudge+epsil)/2:
currentpicture:=blackstone-
(first shifted (twoleft,twoheight) shifted (0,n))-
(second shifted (tworight,twoheight) shifted (0,n));
endfor;
endchar;
enddef;
def eventwo(expr code,first,second)=
beginchar(code,gow#,goh#,0); "Two digit white stone";
italcorr 0;
adjust_fit(0,0);
currentpicture:=whitestone+(first shifted (twoleft,twoheight))+
(second shifted (tworight,twoheight));
endchar;
enddef;
def oddthree(expr code,first,second,third)=
beginchar(code,gow#,goh#,0); "Three digit black stone";
italcorr 0;
adjust_fit(0,0);
currentpicture:=blackstone;
for n=-(smudge-epsil)/2 step 1 until (smudge+epsil)/2:
currentpicture:=blackstone-
(first shifted (threeleft,threeheight) shifted (0,n))-
(second shifted (threemiddle,threeheight) shifted (0,n))-
(third shifted (threeright,threeheight) shifted (0,n));
endfor;
endchar;
enddef;
def eventhree(expr code,first,second,third)=
beginchar(code,gow#,goh#,0); "Three digit white stone";
italcorr 0;
adjust_fit(0,0);
currentpicture:=whitestone+
(first shifted (threeleft,threeheight))+
(second shifted (threemiddle,threeheight))+
(third shifted (threeright,threeheight));
endchar;
enddef;
|