diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /fonts/bartel-chess-fonts |
Initial commit
Diffstat (limited to 'fonts/bartel-chess-fonts')
104 files changed, 7325 insertions, 0 deletions
diff --git a/fonts/bartel-chess-fonts/README b/fonts/bartel-chess-fonts/README new file mode 100644 index 0000000000..a4051d1461 --- /dev/null +++ b/fonts/bartel-chess-fonts/README @@ -0,0 +1,44 @@ +README for bartel-chess-fonts +============================= + +The fonts contained in this package are originally distributed +on CTAN in the + chess-problem-diagrams +(in the directory CTAN/macros/latex/contrib/chess-problem-diagrams) +as + CTAN/macros/latex/contrib/chess-problem-diagrams/fonts.zip + +The original README states: + + The font sources by Elmar Bartel are published under conditions of the + GNU General Public License. + +This package was create to ease installation, in this process tfm files +for all fonts have been created (but fselch30 and fselch34 which are +broken). + +To keep the namespace of metafont files sane, the following files have +been renamed to less generic names: + bishop.mf -> elch-bishop.mf + blackfield.mf -> elch-blackfield.mf + chbase.mf -> elch-chbase.mf + equi.mf -> elch-equi.mf + geo.mf -> elch-geo.mf + king.mf -> elch-king.mf + knight.mf -> elch-knight.mf + pawn.mf -> elch-pawn.mf + queen.mf -> elch-queen.mf + rook.mf -> elch-rook.mf +plus the respective input statements in fselch.mf adapted. + +Furthermore, the files in the original fonts.zip have been split +into those that are actually needed by the fselch* pkelch* driver +sources in the root directory, and additional test files +(in the subdirectory doc). + +Any complains should be send to + tex-live@tug.org + +Norbert Preining +for the TeX Live Team + diff --git a/fonts/bartel-chess-fonts/elch-bishop.mf b/fonts/bartel-chess-fonts/elch-bishop.mf new file mode 100644 index 0000000000..f27a4f45e5 --- /dev/null +++ b/fonts/bartel-chess-fonts/elch-bishop.mf @@ -0,0 +1,318 @@ +%====================================================================== +% This is +% bishop.mf +% +% Copyright (C) 1989-93 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%====================================================================== +% +def slope(expr orig,middle,far,wd,angle) = + begingroup + save x, y, p; + path p.l,p.r; + pair inter; + + z0r= orig; + z1r= middle; + z2= far; + penpos0(wd,90+angle); + penpos1(wd,90); + penpos2(wd,90+angle); + forsuffixes e=l,r: + p.e:= z2e{dir angle}.. z1e{right} .. {dir angle}z0e; + endfor; + inter = p.l intersectiontimes p.l reflectedabout (orig,orig+up); + reverse p.r -- + subpath (0,xpart inter) of p.l .. + reverse subpath (0,xpart inter) of p.l + reflectedabout (orig,orig+up) -- + p.r reflectedabout (orig,orig+up) + endgroup +enddef; + +def MakeBishopPath = + + numeric TopDiameter; + TopDiameter = .08qs; + DefineFootBows( .13qs, % Distance to BottomSpace + .39qs, % BowOneWidth + .17qs, % FootHeight + .31, % BowTwoLoc + .12, % WidthToHeight + .87, % BowTwoLen + .65); % BowThreeLen + x4l + x4r = qs; + x4r - x4l = .45qs; + x4 = x3; + y4l = y4r = y4 = y3 + .16qs; % Sides of the shape with + % vertical tangents + + x5 = x4; + top (y5 + TopDiameter) = qs - TopSpace + .04qs; + + pair TopDir.l, TopDir.r; + TopDir.l = dir 35; + TopDir.r = (xpart TopDir.l, -ypart TopDir.l); + + numeric TopDiameter; + TopDiameter = .10qs; + + path LeftShape,RightShape,BishopPath; + LeftShape = z1l .. z2l .. z3l & z3l .. {up}z4l .. {TopDir.l}z5; + RightShape= z5{TopDir.r} .. {down}z4r .. z3r & z3r .. z2r .. z1r; + BishopPath = LeftShape & RightShape & Bow0 & cycle; + + path Peak; + Peak:= fullcircle scaled TopDiameter + shifted (z5+.5TopDiameter*up); + + path CrossV,CrossH; + + z7= .25[z3,z5]; + z8= .62[z3,z5]; + CrossV:= z7 .. z8; + CrossH= CrossV rotatedaround (.5[z7,z8],90); + + path Slope; + path s; + numeric angle; + + angle= 60; + x12 = SideSpace; + y12 = BottomSpace; + y11 = .5[y12,y10]; + x11 = .65[x12,x10]; + z10 = z0; + s= slope(z10,z11,z12,2.7thin,35); + Slope:= s .. point 0 of s & cycle; + +enddef; + +def MakeWhiteBishop = + pickup chess_pen; + clearit; + draw BishopPath; + forsuffixes $=2,3: draw Bow$; endfor + draw Peak; + draw CrossV; + draw CrossH; + %pickup inner_pen; + draw Slope; + WhiteMan:= currentpicture; +enddef; + +def MakeBlackBishop = + pickup chess_pen scaled 1.1; + clearit; + filldraw BishopPath; + forsuffixes $=2,3: undraw ShortenPath(Bow$,1.2thin); endfor + %undraw ShortenPath(ParallelPath(LeftShape,-thin),thin); + %undraw ShortenPath(ParallelPath(RightShape,-thin),thin); + filldraw Peak; + undraw CrossV; + undraw CrossH; + pickup inner_pen; + filldraw Slope; + BlackMan:= currentpicture; +enddef; + +def MakeOuterShape = + clearit; + pickup frame_pen; + filldraw BishopPath; + filldraw Peak; + filldraw Slope; + cullit; + OuterShape:= currentpicture; +enddef; + +MakeBishopPath; +MakeWhiteBishop; +MakeBlackBishop; +MakeNeutral(WhiteMan,BlackMan); +MakeOuterShape; + +%=========================================================== +%% this one for testing +%beginchar(Bishop+White+OnBlack, qs#, qs#, 0); +% "White bishop on black field"; +% MakeBlackField; +% currentpicture:= currentpicture - OuterShape; +% cullit; +% currentpicture:= currentpicture + WhiteMan; +% %currentpicture:= currentpicture + BlackMan; +%endchar; +%endinput +%=========================================================== + +beginchar(Bishop+White+OnWhite, qs#, qs#, 0); + "White bishop on white field"; + currentpicture:= WhiteMan; +endchar; + +beginchar(Bishop+White+OnWhite+LeftTurned, qs#, qs#, 0); + "White bishop on white field rotated to the left"; + currentpicture:= TurnLeft(WhiteMan); +endchar; + +beginchar(Bishop+White+OnWhite+RightTurned, qs#, qs#, 0); + "White bishop on white field rotated to the right"; + currentpicture:= TurnRight(WhiteMan); +endchar; + +beginchar(Bishop+White+OnWhite+UpSideDown, qs#, qs#, 0); + "White bishop on white field upside down"; + currentpicture:= TurnUpSideDown(WhiteMan); +endchar; + +beginchar(Bishop+Black+OnWhite, qs#, qs#, 0); + "Black bishop on white field"; + currentpicture:= BlackMan; +endchar; + +beginchar(Bishop+Black+OnWhite+LeftTurned, qs#, qs#, 0); + "Black bishop on white field rotated to the left"; + currentpicture:= TurnLeft(BlackMan); +endchar; + +beginchar(Bishop+Black+OnWhite+RightTurned, qs#, qs#, 0); + "Black bishop on white field rotated to the right"; + currentpicture:= TurnRight(BlackMan); +endchar; + +beginchar(Bishop+Black+OnWhite+UpSideDown, qs#, qs#, 0); + "Black bishop on white field upside down"; + currentpicture:= TurnUpSideDown(BlackMan); +endchar; + +beginchar(Bishop+Neutral+OnWhite, qs#, qs#, 0); + "Neutral bishop on white field"; + currentpicture:= NeutralMan; +endchar; + +beginchar(Bishop+Neutral+OnWhite+LeftTurned, qs#, qs#, 0); + "Neutral bishop on white field rotated to the left"; + currentpicture:= TurnLeft(NeutralMan); +endchar; + +beginchar(Bishop+Neutral+OnWhite+RightTurned, qs#, qs#, 0); + "Neutral bishop on white field rotated to the right"; + currentpicture:= TurnRight(NeutralMan); +endchar; + +beginchar(Bishop+Neutral+OnWhite+UpSideDown, qs#, qs#, 0); + "Neutral bishop on white field upside down"; + currentpicture:= TurnUpSideDown(NeutralMan); +endchar; + +beginchar(Bishop+White+OnBlack, qs#, qs#, 0); + "White bishop on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + WhiteMan; +endchar; + +beginchar(Bishop+White+OnBlack+LeftTurned, qs#, qs#, 0); + "White bishop on black field turned to the left"; + MakeBlackField; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(WhiteMan); +endchar; + +beginchar(Bishop+White+OnBlack+RightTurned, qs#, qs#, 0); + "White bishop on black field turned to the right"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(WhiteMan); +endchar; + +beginchar(Bishop+White+OnBlack+UpSideDown, qs#, qs#, 0); + "White bishop on black field upsidedown"; + MakeBlackField; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(WhiteMan); +endchar; + +beginchar(Bishop+Neutral+OnBlack, qs#, qs#, 0); + "Neutral bishop on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + NeutralMan; +endchar; + +beginchar(Bishop+Neutral+OnBlack+LeftTurned, qs#, qs#, 0); + "Neutral bishop on black field turned to the left"; + MakeBlackField; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(NeutralMan); +endchar; + +beginchar(Bishop+Neutral+OnBlack+RightTurned, qs#, qs#, 0); + "Neutral bishop on black field turned to the right"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(NeutralMan); +endchar; + +beginchar(Bishop+Neutral+OnBlack+UpSideDown, qs#, qs#, 0); + "Neutral bishop on black field upsidedown"; + MakeBlackField; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(NeutralMan); +endchar; + +beginchar(Bishop+Black+OnBlack, qs#, qs#, 0); + "Black bishop on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + BlackMan; +endchar; + +beginchar(Bishop+Black+OnBlack+LeftTurned, qs#, qs#, 0); + "Black bishop on black field turned to the left"; + MakeBlackField; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(BlackMan); +endchar; + +beginchar(Bishop+Black+OnBlack+RightTurned, qs#, qs#, 0); + "Black bishop on black field turned to the right"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(BlackMan); +endchar; + +beginchar(Bishop+Black+OnBlack+UpSideDown, qs#, qs#, 0); + "Black bishop on black field upsidedown"; + MakeBlackField; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(BlackMan); +endchar; + +endinput + diff --git a/fonts/bartel-chess-fonts/elch-blackfield.mf b/fonts/bartel-chess-fonts/elch-blackfield.mf new file mode 100644 index 0000000000..b055c2e5cc --- /dev/null +++ b/fonts/bartel-chess-fonts/elch-blackfield.mf @@ -0,0 +1,112 @@ +%====================================================================== +% This is +% blackfield.mf +% +% Copyright (C) 1989-93 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%====================================================================== +% +def MakeBlackField = + + if unknown BlackField: + + pair ua[],ub[],la[],lb[],ul,lr,ma,mb; + + numeric n,part, penscale; + + if unknown HatchCount: + n= 8 + else: + n= HatchCount + fi; + if unknown HatchLinePart: + part= 5 + else: + part= HatchLinePart + fi; + + penscale= (qs/(part*n)); +% pickup pensquare scaled penscale; + pickup pencircle scaled penscale; + bot lft ma = (0,0); + top rt mb = (w,w); + draw ma--mb; + + top lft ul = (0,h); + bot rt lr = (w,0); + + numeric xdelta,ydelta; + xdelta= floor((xpart(lr) - xpart(ma)) / n); + ydelta= floor((ypart(ul) - ypart(ma)) / n); +% xdelta= floor((xpart(lr) - xpart(ma) - penscale) / n); +% ydelta= floor((ypart(ul) - ypart(ma) - penscale) / n); +% xdelta= floor((xpart(lr) - xpart(ma)) / (n+.5))); +% ydelta= floor((ypart(ul) - ypart(ma)) / (n+.5)); + +% The correct loop-specification would be: +% for i=1 upto n: +% But it is possible (especially when the pixles per field are +% below 50), that the calculated xdelta leaves ugly white space +% in the corners. So we draw casually more than n hatch lines. + numeric nn; + nn = floor((xpart(mb))/xdelta); + if nn > n: + message "info: will draw " & decimal (nn-n) & " more hatch-line" + if nn-n>1: & "s" fi + & " in the upper corner of blackfield."; + fi + for i=1 upto nn: + lft ua[i] = (0,ypart(ma)+(i*ydelta)); + top ub[i] = (xpart(mb)-(i*xdelta),h); + draw ua[i]--ub[i]; + endfor; + +% Here the same as above... + numeric nn; + nn = floor((ypart(mb))/ydelta); + if nn > n: + message "info: will draw " & decimal (nn-n) & " more hatch-line" + if nn-n>1: & "s" fi + & " in the lower corner of blackfield."; + fi + for i=1 upto nn: + bot la[i] = (xpart(ma)+(i*xdelta),0); + rt lb[i] = (w,ypart(mb)-(i*ydelta)); + draw la[i]--lb[i]; + endfor; + % This is for situations, where the the ydelta leaves + % space for one more stroke in the lower right corner of the + % the field. Then we do one more stroke. + % It should occure very seldom. + i:= n+1; + bot la[i] = (xpart(ma)+(i*xdelta),0); + rt lb[i] = (w,ypart(mb)-(i*ydelta)); + if ypart(lb[i]) > 0: + draw la[i]--lb[i]; + fi; + cullit; + picture BlackField; + BlackField:= currentpicture; + + else: + currentpicture:= BlackField; + fi; + +enddef; + +beginchar(144,qs#,qs#,0); "Empty black field"; + MakeBlackField; +endchar; diff --git a/fonts/bartel-chess-fonts/elch-chbase.mf b/fonts/bartel-chess-fonts/elch-chbase.mf new file mode 100644 index 0000000000..6e6915e7b6 --- /dev/null +++ b/fonts/bartel-chess-fonts/elch-chbase.mf @@ -0,0 +1,288 @@ +%====================================================================== +% This is +% chbase.mf +% +% Copyright (C) 1989-93 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +% +%====================================================================== + +% correcting the size of qs to make it a good pixelcount +if .5qs <> good.x .5qs: + qs:= qs if qs# * hppp > round(qs): - else: + fi 1; +fi + +if proofing>0: input screengrid; fi; + +% the center of the field +pair Center; Center = (qs/2,qs/2); + +picture BlackMan, WhiteMan, NeutralMan, OuterShape; + +% Some definitions for numbering the characters +% the position of the relevant character in the fonttable +% is calculated as sum of four offsets: +% +% PieceNumber + PieceColor + FieldColor + Turned +% +% This give the following table: +% +% WoW NoW BoW WoB NoB BoB +% Pawn 0 6 12 18 24 30 +% Knight 1 7 13 19 25 31 +% Bishop 2 8 14 20 26 32 +% Rook 3 9 15 21 27 33 +% Queen 4 10 16 22 28 34 +% King 5 11 17 23 29 35 +% + +% Numbers of the pieces +Pawn = 0; Knight = 1; Bishop = 2; Rook = 3; Queen = 4; King = 5; + +% Offsets for colors of the pieces +White = 0; Neutral = 6; Black = 12; + +% Offsets for the background +OnWhite = 0; OnBlack = 18; + +% Offsets for the turning +LeftTurned = 36; RightTurned = 72; UpSideDown = 108; + +% Offsets for geometric figures +% These figures should be point symmetric +Circle = 145; +Triangle = 146 +Square = 147; +geo1 = 148; +geo2 = 149; +geo3 = 150; + +% Offsets for geometric figures which can only be turned left +% to get a realy other shape. +Equihopper = 180; +free1 = 181; +free2 = 182; +free3 = 183; +free4 = 184; +free5 = 185; % this is not possible, since the turned, black + % on black version is over 255: 185+36+18+12 = 256!!!! + +% Makros for turning +def TurnLeft(expr p) = + p rotatedaround (Center,90); +enddef; + +def TurnRight(expr p) = + p rotatedaround (Center,-90); +enddef; + +def TurnUpSideDown(expr p) = + p rotatedaround (Center,180); +enddef; + +% +% Macros for shorten and lengthening paths +% +% ShortenPath: The given path is shorted at both ends, with the +% real amount of pixels given +% ShortenBegin, ShortenEnd: The same as above for one end only +% LengthenPath: The path is elongated at both ends with a straight +% line, in the direction of the path at the end +% LengthenBegin, LengthenEnd: The same as above for one end only +% +def Perpend(expr d,p,real) = + begingroup + save dd; pair dd; + dd = d/length(d); + (p+100*(dd rotated 90) -- p+100*(dd rotated -90)) shifted (dd*real) + endgroup; +enddef; +def ShortenPath(expr p,real) = + begingroup + save pa,pe; path pa,pe; + pa = Perpend(direction 0 of p,point 0 of p,real); + pe = Perpend(-direction length(p) of p,point length(p) of p,real); + subpath ( + xpart(p intersectiontimes pa), + xpart(p intersectiontimes pe)) of p + endgroup +enddef; +def ShortenBegin(expr p,real) = + begingroup + save pa; path pa; + pa = Perpend(direction 0 of p,point 0 of p,real); + subpath (xpart(p intersectiontimes pa),length(p)) of p + endgroup +enddef; +def ShortenEnd(expr p,real) = + begingroup + save pe; path pe; + pe = Perpend(-direction length(p) of p,point length(p) of p,real); + subpath (0, xpart(p intersectiontimes pe)) of p + endgroup +enddef; +def LengthenBegin(expr p,real) = + begingroup + save dd; pair dd; + dd= direction 0 of p; dd:= dd/length(dd); + point 0 of p - real*dd -- p + endgroup +enddef; +def LengthenEnd(expr p,real) = + begingroup + save dd; pair dd; + dd= direction length(p) of p; dd:= dd/length(dd); + p -- point length(p) of p + real*dd + endgroup +enddef; +def Lengthen(expr p,real) = + begingroup + save db; pair db; + save de; pair de; + db= direction 0 of p; db:= db/length(db); + de= direction length(p) of p; de:= de/length(de); + point 0 of p - real*db -- p -- point length(p) of p + real*de + endgroup +enddef; +% +% This macro is used by ParallelPath +% +def NewPoint(expr p,t,dist) = + { begingroup pair Dir; + Dir= direction t of p; %show p; show t; show Dir; + Dir + endgroup } + (point t of p + (Dir rotated 90)*(dist/length(Dir))) +enddef; +def xyNewPoint(expr p,t,xdist,ydist) = + { begingroup pair Dir; + Dir= direction t of p; %show p; show t; show Dir; + Dir + endgroup } + (point t of p + (cosd(angle(Dir)+90)*xdist, sind(angle(Dir)+90)*ydist)) +enddef; + +% Macro for getting a path parallel to the given path, in distance dist +% +def ParallelPath(expr p,dist) = + begingroup + save Dir; pair Dir; Dir = direction 0 of p; + + ((point 0 of p)+(Dir rotated 90)*(dist/length(Dir))) {Dir} + for t=.5 step .5 until length(p): + .. NewPoint(p,t,dist) + endfor + endgroup +enddef; + +% Macro to get different distance in x and y direction +% +def xyParallelPath(expr p, xdist, ydist) = + begingroup + save Dir; pair Dir; Dir = direction 0 of p; + + ((point 0 of p)+(cosd(angle(Dir)+90)*xdist,sind(angle(Dir)+90)*ydist)) {Dir} + for t=.5 step .5 until length(p): + .. xyNewPoint(p,t,xdist,ydist) + endfor + endgroup +enddef; + +def DefineFootBows( + % This macro depends on the values of qs and BottomSpace + % and uses the makro ParallelPath. + % It is used to generate the bottom bows of King, Queen and Bishop + expr BottomDist, %This is the space to BottomSpace + BowOneWidth, %This is the width of the main bow + FootHeight, %Distance from bottom of Bow0 to top of Bow3 + BowTwoLoc, %Relative location of Bow2 between Bow3 and + % Bow1. 0 means position at position at Bow1, + % 1.0 means position at Bow3. + WidthToHeight, %Ratio of BowOneWidth/2 to Bowheight + BowTwoLen, %Length of Bow2 relative to Bow1 + BowThreeLen %Lenght of Bow3 relative to Bow1 + ) = + + % All parameters are in pixels when not otherwise statet. + % Points are numbered from 0 to 3 from lower to upper + % Points to the left have suffix l, right suffix r + % points without further suffix are in the center of the bows + + path Bow[]; + numeric BowHeight; + numeric tl,tr,l[],x[]l,x[]r,x[],y[]l,y[]r,y[]; + + BowHeight = BowOneWidth*WidthToHeight/2; + + % We start with the first bow + rt x1r + lft x1l = qs; x1r - x1l = BowOneWidth; + y1 = BottomSpace + 2*BowHeight + BottomDist; + x1 = .5qs; + y1l = y1r = y1 - BowHeight; + Bow1 = z1l .. {right} z1 .. z1r; + + z0 = z1 shifted (down*2*BowHeight); + Bow0 = z1r .. {left} z0 .. z1l; + + Bow3= ParallelPath(Bow1,FootHeight-2*BowHeight); + l3 = length(Bow3); + cu:= (1-BowThreeLen)/2; + Bow3:= subpath (cu*l3,(1-cu)*l3) of Bow3; + z3l = point 0 of Bow3; + z3 = point .5*length(Bow3) of Bow3; + z3r = point infinity of Bow3; + +%show point 0 of reverse Bow3; +%show z3r; + + Bow2= ParallelPath(Bow1,(FootHeight-2*BowHeight)*BowTwoLoc); + l2 = length(Bow2); + cu:= (1-BowTwoLen)/2; + Bow2:= subpath (cu*l2,(1-cu)*l2) of Bow2; + z2l = point 0 of Bow2; + z2 = point .5length(Bow3) of Bow2; + z2r = point infinity of Bow2; + labels(1l,1,1r,2l,2r,3l,3r); +enddef; +% +% Macro for generation the neutral piece from two pictures +% given as Parameter +def MakeNeutral(expr White,Black) = + if unknown LeftHalft: picture LeftHalf; fi + LeftHalf:= Black; + cull LeftHalf keeping (1,infinity); + addto LeftHalf contour (unitsquare yscaled qs xscaled (qs/2)); + cull LeftHalf keeping (2,2); + + if unknown RightHalf: picture RightHalf; fi + RightHalf:= White; + cull RightHalf keeping (1,infinity); + addto RightHalf contour (unitsquare yscaled qs xscaled (qs/2) shifted (qs/2,0)); + cull RightHalf keeping (2,2); + NeutralMan:= LeftHalf; + addto NeutralMan also RightHalf; +enddef; +% +% Makro to get a grid of real output pixels when proofing +def PixelGrid(expr PixPerInch, w) = + if proofing > 0: + begingroup + numeric d; + d = pixels_per_inch/PixPerInch; + makegrid(0,for i=d step d until w: ,i endfor)(0,for i=d step d until w: ,i endfor) + endgroup; + fi; +enddef; diff --git a/fonts/bartel-chess-fonts/elch-equi.mf b/fonts/bartel-chess-fonts/elch-equi.mf new file mode 100644 index 0000000000..545309917c --- /dev/null +++ b/fonts/bartel-chess-fonts/elch-equi.mf @@ -0,0 +1,245 @@ +%====================================================================== +% This is +% equi.mf +% +% Copyright (C) 1995 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%====================================================================== +% +% 11 _______________________ 12 +% \ / +% \ / +% \ / +% 9 \---------------/ 10 +% \ / +% \ / +% \ / +% \ / +% \ / +% \ / +% 7 +-------------+ 8 - +% |<---wdbar--->| | htbar +% 5 +-------------+ 6 - +% / \ +% / \ +% / \ +% / \ +% / \ +% / \ +% / \ +% 3 /-----------------\ 4 +% / \ +% / \ +% 1 ----------------------- 2 +% |<--------wdbot-------->| +% +def SetParam = + numeric wdbott, wdbar, htbar, diagpos, rdiagpos; + wdbott:= .75 BottomWidth; + wdbar:= .50 BottomWidth; + htbar:= 0.065*(qs - BottomSpace - TopSpace); + diagpos=.095; + rdiagpos= 1-diagpos; +enddef; + +def DefinePointsAndPaths = + % left points are odd numbered from 1 to 11 from lower to upper + % right points are even numbered from 2 to 12 lower tot upper + numeric x[], y[]; + + SetParam; + + % At first the diag's + rt x1 = rt x11 = .5(qs-wdbott); + lft x2 = lft x12 = .5(qs+wdbott); + bot y1 = bot y2 = BottomSpace; + top y11 = top y12 = qs-TopSpace; + z0 = (.5qs, .5qs); + path shape; shape:= z1--z0--z11--z12--z0--z2--z1--cycle; + + % now the top and bottom inner rule + path Ndiag; Ndiag= z2--z11; + path Zdiag; Zdiag= z12--z1; + z4 = point diagpos of Ndiag; + z3 = point rdiagpos of Zdiag; + z9 = point rdiagpos of Ndiag; + z10 = point diagpos of Zdiag; + path botin; botin= z3--z4; + path topin; topin= z9--z10; + + % the bar in the middle + y7 - y5 = y8 - y6 = htbar; + x6 - x5 = x8 - x7 = wdbar; + x7 + x8 = x5 + x6 = qs; + y5 + y7 = y8 + y6 = qs; + path bar; bar=z5--z6--z8--z7--z5--cycle; +enddef; + + +def MakeWhiteEquihopper = + clearit; + pickup chess_pen; + draw shape; + pickup inner_pen; + draw topin; + draw botin; + erase fill bar; + draw bar; + WhiteMan:= currentpicture; +enddef; + +def MakeBlackEquihopper = + clearit; + pickup chess_pen; + filldraw shape; + pickup chess_pen scaled 1.1; + undraw ShortenPath(topin, 2.5thin); + undraw ShortenPath(botin, 2.5thin); + filldraw bar; + BlackMan:= currentpicture; +enddef; + +def MakeOuterShape = + clearit; + pickup frame_pen; + filldraw shape; + filldraw bar; + cullit; + OuterShape:= currentpicture; +enddef; + +DefinePointsAndPaths; +MakeWhiteEquihopper; +MakeBlackEquihopper; +MakeNeutral(WhiteMan, BlackMan); +MakeOuterShape; + +if proofing > 0: + ScreenGrid(0,qs)(0,qs); + % If you want a stop after each generated char: + %let _endchar= endchar; + %def endchar = + % string ans; + % ans= readstring; + % _endchar; + %enddef; +fi; + +%%=========================================================== +%% this one for testing +%beginchar(Equihopper+White+OnWhite, qs#, qs#, 0); +% "White Equihopper on white field"; +% currentpicture:= WhiteMan; +% %currentpicture:= BlackMan; +%endchar; +%endinput +%%=========================================================== + +beginchar(Equihopper+White+OnWhite, qs#, qs#, 0); + "White equihopper on white field"; + currentpicture:= WhiteMan; +endchar; + +beginchar(Equihopper+White+OnWhite+LeftTurned, qs#, qs#, 0); + "White equihopper turned to the left on white field"; + currentpicture:= TurnLeft(WhiteMan); +endchar; + +%=========================================================== + +beginchar(Equihopper+White+OnBlack, qs#, qs#, 0); + "White equihopper on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + WhiteMan; +endchar; + +beginchar(Equihopper+White+OnBlack+LeftTurned, qs#, qs#, 0); + "White equihopper turned to the left on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(WhiteMan); +endchar; + +%=========================================================== + +beginchar(Equihopper+Neutral+OnWhite, qs#, qs#, 0); + "Neutral equihopper on white field"; + currentpicture:= NeutralMan; +endchar; + +beginchar(Equihopper+Neutral+OnWhite+LeftTurned, qs#, qs#, 0); + "Neutral equihopper turned to the left on white field"; + currentpicture:= TurnLeft(NeutralMan); +endchar; + +%=========================================================== + +beginchar(Equihopper+Neutral+OnBlack, qs#, qs#, 0); + "Neutral equihopper on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + NeutralMan; +endchar; + +beginchar(Equihopper+Neutral+OnBlack+LeftTurned, qs#, qs#, 0); + "Neutral equihopper turned to the left on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(NeutralMan); +endchar; + +%=========================================================== + +beginchar(Equihopper+Black+OnWhite, qs#, qs#, 0); + "Black equihopper on white field"; + currentpicture:= BlackMan; +endchar; + +beginchar(Equihopper+Black+OnWhite+LeftTurned, qs#, qs#, 0); + "Black equihopper turned to the left on white field"; + currentpicture:= TurnLeft(BlackMan); +endchar; + +%=========================================================== + +beginchar(Equihopper+Black+OnBlack, qs#, qs#, 0); + "Black equihopper on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + BlackMan; +endchar; + +beginchar(Equihopper+Black+OnBlack+LeftTurned, qs#, qs#, 0); + "Black equihopper turned to the left on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(BlackMan); +endchar; + +endinput diff --git a/fonts/bartel-chess-fonts/elch-geo.mf b/fonts/bartel-chess-fonts/elch-geo.mf new file mode 100644 index 0000000000..e14dffb842 --- /dev/null +++ b/fonts/bartel-chess-fonts/elch-geo.mf @@ -0,0 +1,109 @@ +% This is +% geo.mf +% +% Copyright (C) 1989-92 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +% +% +%we have to define six essential characters: +% WoW NoW BoW WoB NoB BoB +%Pawn 0 6 12 18 24 30 +%Knight 1 7 13 19 25 31 +%Bishop 2 8 14 20 26 32 +%Rook 3 9 15 21 27 33 +%Queen 4 10 16 22 28 34 +%King 5 11 17 23 29 35 + +% All these cases are repeated three more times: +% Left turned, Right turned and upside down +%------------------------------------------ +% From this result the first free positions +% usable for simple geometric signs. + +def MakeCirclePath = + path CirclePath; + CirclePath = fullcircle scaled .70qs shifted Center; +enddef; + +def MakeWhiteCircle = + pickup chess_pen; + clearit; + draw CirclePath; + cullit; + WhiteMan:= currentpicture; +enddef; + +def MakeBlackCircle = + pickup chess_pen; + clearit; + filldraw CirclePath; + cullit; + BlackMan:= currentpicture; +enddef; + +def MakeOuterShape = + pickup frame_pen; + clearit; + filldraw CirclePath; + cullit; + OuterShape:= currentpicture; +enddef; + + +MakeCirclePath; +MakeWhiteCircle; +MakeBlackCircle; +MakeNeutral(WhiteMan, BlackMan); +MakeOuterShape; + +beginchar(Circle+White+OnWhite, qs#, qs#, 0); + "White circle on white field"; + currentpicture:= WhiteMan; +endchar; + +beginchar(Circle+Black+OnWhite, qs#, qs#, 0); + "Black circle on white field"; + currentpicture:= BlackMan; +endchar; + +beginchar(Circle+Neutral+OnWhite, qs#, qs#, 0); + "Neutral circle on white field"; + currentpicture:= NeutralMan; +endchar; + +beginchar(Circle+White+OnBlack, qs#, qs#, 0); + "White circle on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + WhiteMan; +endchar; + +beginchar(Circle+Neutral+OnBlack, qs#, qs#, 0); + "Neutral circle on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + NeutralMan; +endchar; + +beginchar(Circle+Black+OnBlack, qs#, qs#, 0); + "Black circle on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + BlackMan; +endchar; diff --git a/fonts/bartel-chess-fonts/elch-king.mf b/fonts/bartel-chess-fonts/elch-king.mf new file mode 100644 index 0000000000..ad089ef3b2 --- /dev/null +++ b/fonts/bartel-chess-fonts/elch-king.mf @@ -0,0 +1,342 @@ +%====================================================================== +% This is +% king.mf +% +% Copyright (C) 1989-93 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%====================================================================== +% +def SetParam = + numeric BowOneW,ThreeFour,SixHor,FourSix; + BowOneW = .53qs; + ThreeFour = .07; + FourFive = .65; % z5 is Top of Heart + SixHor = 1.52; + FourSix = .27; + + numeric CrossWidth, CrossHeight, CrossAbove; + CrossWidth = .20; + CrossHeight = .10; + CrossAbove = .20; %Middle of cross above center of heart. +enddef; + +def DefinePointsAndBows = + % Points are numbered from 0 to 9 from lower to upper + % Points to the left have suffix a, right suffic b + % points without further suffix are in the center + + SetParam; + DefineFootBows( 0, % No Space to Bottom + BowOneW, + .275qs,% FootHeight + .42, % BowTwoLoc + .195, % WidthToHeight + 0.91, % BowTwoLen + 0.82); % BowThreeLen + + z4 = z3 + BowOneW*ThreeFour*up; + z5 = z4 + BowOneW*FourFive*up; + y6l= y6r = y4 + BowOneW*FourSix; + x6l + x6r = qs; x6r - x6l = SixHor*BowOneW; + + z7 = z5 + CrossAbove*BowOneW*up; + y7 = y7l = y7r; + x7l + x7r = qs; x7r - x7l = CrossWidth*BowOneW; + z8 = z7 + CrossHeight*BowOneW*up; + + path Cross[]; + Cross1= z5--z8; + Cross2= z7l--z7r; +enddef; + +def DrawCross = + draw Cross1; + draw Cross2; +enddef; + +def DefineKingPaths = + path LeftPath,RightPath,LeftInnerPath,RightInnerPath, + OuterPath,TopHeartPath,HeartPath; + LeftPath = z1l .. z2l .. z3l & z3l{-1.3,1} .. z6l .. {.1,-1} z4 -- z3; + RightPath= reverse LeftPath reflectedabout (z3,z4); + %RightPath= z3 -- z4 {up} .. z6r .. z3r .. z2r .. z1r; + LeftInnerPath = ParallelPath(subpath (1.8,5)of LeftPath, + -1.6*thin); + RightInnerPath = LeftInnerPath reflectedabout (z3,z4); + + OuterPath = LeftPath .. RightPath .. Bow0 .. cycle; + HeartStart = 3.81; + HeartPath = subpath (4,HeartStart) of LeftPath & + point HeartStart of LeftPath + {-direction HeartStart of LeftPath}.. + {right}z5{right}.. + point HeartStart of reverse RightPath + {direction HeartStart of reverse RightPath} & + subpath (HeartStart,4) of reverse RightPath; %.. point HeartStart of LeftPath; + +enddef; + +def MakeWhiteKing = + clearit; + pickup chess_pen; + draw Bow[1]; + draw Bow[2]; + draw Bow[3]; + draw OuterPath; + draw HeartPath; + DrawCross; + %pickup inner_pen; + %pickup chess_pen; + %draw ParallelPath(subpath(1.7,5)of LeftPath,-2thin); + %draw ParallelPath(subpath(0,3.3)of RightPath,-2thin); + if proofing > 0: + ScreenGrid(0,qs)(0,qs); + fi; + WhiteMan:= currentpicture; +enddef; + +def MakeBlackKing = + clearit; + pickup chess_pen; + filldraw HeartPath .. cycle; + DrawCross; + cullit; + undraw ParallelPath(subpath (.6,3.4) of HeartPath, -thin); + cullit; + filldraw OuterPath; + cullit; + pickup chess_pen scaled 1.1; + undraw ShortenPath(Bow[1],1.5thin); + undraw ShortenPath(Bow[2],1.6thin); + undraw ShortenPath(Bow[3],1.2thin); + undraw subpath (4,9) of ParallelPath(LeftPath,-thin); + undraw subpath (0,6) of ParallelPath(RightPath,-thin); + BlackMan:= currentpicture; +enddef; + +def MakeOuterShape = + clearit; + pickup frame_pen; + DrawCross; + filldraw OuterPath; + filldraw HeartPath .. cycle; + cullit; + OuterShape:= currentpicture; +enddef; + +DefinePointsAndBows; +DefineKingPaths; + +MakeWhiteKing; +MakeBlackKing; +MakeNeutral(WhiteMan, BlackMan); +MakeOuterShape; + + +%ScreenGrid(0,qs,x6r)(0,qs,y6r); + +%=========================================================== +% this one for testing +%beginchar(King+Black+OnBlack, qs#, qs#, 0); +% "Black king on black field"; +% MakeBlackField; +% cullit; +% currentpicture:= currentpicture - OuterShape; +% cullit; +% currentpicture:= currentpicture + BlackMan; +%endchar; +%endinput +%=========================================================== + +beginchar(King+White+OnWhite, qs#, qs#, 0); + "White king on white field"; + currentpicture:= WhiteMan; + %labels(z0,z1l,z1,z1r,z2l,z2,z2r); + %labels(z3l,z3,z3l,z4,z5,z6l,z6r); + %labels(z7l,z7,z7r,z8); +endchar; + +beginchar(King+White+OnWhite+LeftTurned, qs#, qs#, 0); + "White king turned to the left on white field"; + currentpicture:= TurnLeft(WhiteMan); +endchar; + +beginchar(King+White+OnWhite+RightTurned, qs#, qs#, 0); + "White king turned to the right on white field"; + currentpicture:= TurnRight(WhiteMan); +endchar; + +beginchar(King+White+OnWhite+UpSideDown, qs#, qs#, 0); + "White king turned upsidedown on white field"; + currentpicture:= TurnUpSideDown(WhiteMan); +endchar; + +%=========================================================== + +beginchar(King+White+OnBlack, qs#, qs#, 0); + "White king on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + WhiteMan; +endchar; + +beginchar(King+White+OnBlack+LeftTurned, qs#, qs#, 0); + "White king turned to the left on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(WhiteMan); +endchar; + +beginchar(King+White+OnBlack+RightTurned, qs#, qs#, 0); + "White king turned to the right on black field"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(WhiteMan); +endchar; + +beginchar(King+White+OnBlack+UpSideDown, qs#, qs#, 0); + "White king turned upsidedown on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(WhiteMan); +endchar; + +%=========================================================== + +beginchar(King+Neutral+OnWhite, qs#, qs#, 0); + "Neutral king on white field"; + currentpicture:= NeutralMan; +endchar; + +beginchar(King+Neutral+OnWhite+LeftTurned, qs#, qs#, 0); + "Neutral king turned to the left on white field"; + currentpicture:= TurnLeft(NeutralMan); +endchar; + +beginchar(King+Neutral+OnWhite+RightTurned, qs#, qs#, 0); + "Neutral king turned to the right on white field"; + currentpicture:= TurnRight(NeutralMan); +endchar; + +beginchar(King+Neutral+OnWhite+UpSideDown, qs#, qs#, 0); + "Neutral king turned upsidedown on white field"; + currentpicture:= TurnUpSideDown(NeutralMan); +endchar; + +%=========================================================== + +beginchar(King+Neutral+OnBlack, qs#, qs#, 0); + "Neutral king on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + NeutralMan; +endchar; + +beginchar(King+Neutral+OnBlack+LeftTurned, qs#, qs#, 0); + "Neutral king turned to the left on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(NeutralMan); +endchar; + +beginchar(King+Neutral+OnBlack+RightTurned, qs#, qs#, 0); + "Neutral king turned to the right on black field"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(NeutralMan); +endchar; + +beginchar(King+Neutral+OnBlack+UpSideDown, qs#, qs#, 0); + "Neutral king turned upsidedown on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(NeutralMan); +endchar; + +%=========================================================== + +beginchar(King+Black+OnWhite, qs#, qs#, 0); + "Black king on white field"; + currentpicture:= BlackMan; +endchar; + +beginchar(King+Black+OnWhite+LeftTurned, qs#, qs#, 0); + "Black king turned to the left on white field"; + currentpicture:= TurnLeft(BlackMan); +endchar; + +beginchar(King+Black+OnWhite+RightTurned, qs#, qs#, 0); + "Black king turned to the right on white field"; + currentpicture:= TurnRight(BlackMan); +endchar; + +beginchar(King+Black+OnWhite+UpSideDown, qs#, qs#, 0); + "Black king turned upsidedown on white field"; + currentpicture:= TurnUpSideDown(BlackMan); +endchar; + +%=========================================================== + +beginchar(King+Black+OnBlack, qs#, qs#, 0); + "Black king on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + BlackMan; +endchar; + +beginchar(King+Black+OnBlack+LeftTurned, qs#, qs#, 0); + "Black king turned to the left on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(BlackMan); +endchar; + +beginchar(King+Black+OnBlack+RightTurned, qs#, qs#, 0); + "Black king turned to the right on black field"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(BlackMan); +endchar; + +beginchar(King+Black+OnBlack+UpSideDown, qs#, qs#, 0); + "Black king turned upsidedown on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(BlackMan); +endchar; + +endinput diff --git a/fonts/bartel-chess-fonts/elch-knight.mf b/fonts/bartel-chess-fonts/elch-knight.mf new file mode 100644 index 0000000000..85e1453c32 --- /dev/null +++ b/fonts/bartel-chess-fonts/elch-knight.mf @@ -0,0 +1,450 @@ +%====================================================================== +% This is +% knight.mf +% +% Copyright (C) 1989-93 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%====================================================================== +% +def sympoint (expr p,d,a) = + % Come to point p in direction d + angel a, and leave symmetrical + % to d - a This gives us a peak in p pointing in direction d. + % sharpnes is specified by a. a= 0 no peak, a=90 real peak; + + {dir (angle(d)+a)} p {dir(angle(d)+180-a)} +enddef; + +def Ear(expr p,pd,q,qd,a,r,rd) = + p{pd} .. sympoint(q,qd,a) .. {rd}r +enddef; + +def DefineKnightPath = + % we construct the path from right to left. + % Ie we begin with the nack and come then to the ears, + % the nose etc + z0 = (.33qs,BottomSpace); % The leftmost bottompoint + z1 = (qs-SideSpace,BottomSpace); % The right bottom edge + path Foot; + Foot = z0 -- z1; + % z2 will be later defined, it + % is the connection to the right + % ear + z4 = (.465qs,qs-TopSpace+.035qs); % The peak of the right ear + z3 = z4 + (.042qs,-0.12qs); % The right lower point of the + % right ear + z5 = z3 + (-.09qs,.015qs ); % The left lower point of the + % right ear + + % Now comes the definition of the right ear + % There are two paths: + % RightEar: The complete path for the ear + % sRightEar: The subpath for the whole shape + path RightEar, sRightEar; + RightEar = Ear(z3,(1,10),z4,(0,1),35,z5,(1,-10)); + sRightEar = subpath (.25,1.85) of RightEar; + z2 = point 0 of sRightEar; % The right + z6 = point 2 of sRightEar; % The left connection point of + % the right ear + + % Now we can also define the nack + path Nack; + Nack = z1{up} .. tension 1 and 1 .. {left}z2; + + z7 = z6 + (-.08qs,-0.05qs); % This is the point under the + % left ear + + % Now the two pathes from the right to the left ear. + % EarUnderEar, goes from the right ear under the left ear + % EarToEar connects only the two ears + + path EarUnderEar,EarToEar; + EarUnderEar= z6{left} .. {-5,-4}z7; + EarToEar = subpath (0,.4) of EarUnderEar; + + z8 = point 1 of EarToEar; % The connection point and the + % start of the left ear + + % to get easier definition of the following points + % we define a line bx from z7 (point under left ear) down to z13 + % (leftmost point of shape) ie the begining of nose and mount + + z13 = (SideSpace,0.41qs); % The leftmost point of the + % shape + pair bx,by; + bx = z13 - z7; + by = z13 rotatedabout (z7,-90); + + z9 = z7 + .21bx + .21by; % the peak of the left ear + z10= z7 + .15bx + .08by; % the left point of the left ear + + % Now the path for the leaft ear + path LeftEar; + LeftEar= Ear(z8,(-1,3),z9,(-1,2),20,z10,(2,-3)); + + z11 = z7 + .45bx + .10by; + z12 = z7 + .50bx + .06by; + z26 = z7 + .16bx - .02by; % the eye point + + path Bless; + Bless = z10{dir(angle(bx)-15)} .. z11 .. z12 .. {down} z13; + + % the points from z14 to z17 are defined via a line nx + % from z13 to z18 + pair nx,ny; + + z19 = (.255qs,.315qs); + nx = z19 - z13; + ny = nx rotatedabout ((0,0),90); + + z14 = z13 + .30nx - .22ny; % the point between mouth + % and nose + z15 = z13 + .60nx - .15ny; % the upper point of mouth + z16 = z13 + .70nx + .31ny; % the inner point of mouth + z17 = z13 + .76nx - .02ny; % + z18 = z13 + .82nx - .07ny; % + z25 = z13 + .22nx + .28ny; % the location of the nose + + path MouthNose; + MouthNose = z13 .. z14{nx} .. z15 ... sympoint(z16,(z16-z17),0) + ... z17 .. z18 .. z19; + + % the points from z20 to z23 are defined via a line nx + % from z19 to z23 + pair ux,uy; + + z23 = (.546qs,.64qs); + ux = z23 - z19; + uy = z23 rotatedabout (z19,90); + + z20 = z19 + .15ux + .01uy; + z21 = z19 + .45ux - .02uy; + z22 = z19 + .90ux - .11uy; + path UnderMouth, sUnderMouth; + UnderMouth = z19..z20..z21..z22..{up}z23; + sUnderMouth = subpath (0,3) of UnderMouth; + + z24 = z22 + (.008qs,-.05qs); + path ToFoot; + %ToFoot = z22..{down}z24 .. {down}z0; + ToFoot = z22..z24..{down}z0; + + + path KnightShape; + KnightShape = Foot & Nack & sRightEar & EarToEar + & LeftEar & Bless & MouthNose + & sUnderMouth & ToFoot & cycle; + +enddef; + +def DefineNosePath(expr p,s) = + begingroup + if proofing >0: + show p,s; + fi; + save z; pair z[]; + + z0 + (0,s) = p; + pair px,py; + py= p - z0; + px= py rotated -90; + z1= z0 + 0.10px + 0.50py; + z2= z0 + 0.70px + 1.00py; + z3= z0 + 0.70px + 1.60py; + z4= z0 + 0.10px + 2.10py; + z5= z0 - 0.20px + 1.90py; + z6= z0 - 0.60px + 0.50py; + z7= z0 - 0.60px + 0.10py; + z8= z0 - 0.50px + 0.00py; + forsuffixes i=0,1,2,3,4,5,6,7,8: + z[i].. + endfor cycle + endgroup +enddef; + +def EyePath (expr p,s) = + begingroup + save z; pair z[]; + + z0 + (0,s) = p; + pair px,py; + py= p - z0; + px= py rotated -90; + + z1= z0 + 1.00px + 1.00py; + + z0{0,1} .. {1,0} z1 & z1 {0,-1} .. {-1,0}z0 & cycle + endgroup +enddef; + +def EyeBrowPath (expr p,s) = + begingroup + save z; pair z[]; + + z0 + (0,s) = p; + pair px,py; + py= p - z0; + px= py rotated -90; + + z1= z0 - 0.74px - 0.74py; + z2= z0 + 1.74px + 1.74py; + + z1{0,1} .. {1,0}z2 + endgroup +enddef; + +def MakeWhiteKnight = + clearit; + pickup chess_pen; + draw Foot; + draw RightEar; + draw EarUnderEar; + draw LeftEar & Bless & MouthNose & UnderMouth; + draw ToFoot; + draw EyePath(z26,.025qs); + filldraw DefineNosePath(z25,.015qs); + pickup chess_pen xscaled 2 rotated -10; + draw ShortenEnd(Nack,thin); + pickup chess_pen scaled 0.6; + draw EyeBrowPath(z26,.030qs); + WhiteMan:= currentpicture; +enddef; + +def MakeBlackKnight = + clearit; + pickup chess_pen; + + filldraw KnightShape; + cullit; + unfilldraw DefineNosePath(z25,.015qs); + undraw EyePath(z26,.025qs); + undraw ParallelPath(EarUnderEar,1.2thin) rotatedaround(z6,-20); + pickup chess_pen xscaled 2 rotated -20; + undraw ShortenPath(xyParallelPath(Nack,1.5thin,thin),thin); + pickup chess_pen scaled .6; + undraw subpath (3,3.5) of UnderMouth; + undraw EyeBrowPath(z26,.030qs); + undraw subpath (2.5,3) of MouthNose; + BlackMan:= currentpicture; +enddef; + +def MakeKnightSpace = + clearit; + pickup frame_pen; + filldraw KnightShape; + cullit; + OuterShape:= currentpicture; +enddef; + +DefineKnightPath; +%DefineNosePath(z25,.2qs); + +MakeWhiteKnight; +MakeBlackKnight; +MakeNeutral(WhiteMan,BlackMan); +MakeKnightSpace; + +%=========================================================== +% this one for testing +%beginchar(Knight+Black+OnBlack, qs#, qs#, 0); +% "White knight on black field"; +% MakeBlackField; +% cullit; +% currentpicture:= currentpicture - OuterShape; +% cullit; +% currentpicture:= currentpicture + BlackMan; +%endchar; +%endinput +%=========================================================== + +beginchar(Knight+White+OnWhite, qs#, qs#, 0); + "White knight on white field"; + currentpicture:= WhiteMan; +% labels(z0,z1l,z1,z1r,z2l,z2,z2r); +% labels(z3l,z3,z3l,z4,z5,z6l,z6r); +% labels(z7l,z7,z7r,z8); +endchar; + +beginchar(Knight+White+OnWhite+LeftTurned, qs#, qs#, 0); + "White knight turned to the left on white field"; + currentpicture:= TurnLeft(WhiteMan); +endchar; + +beginchar(Knight+White+OnWhite+RightTurned, qs#, qs#, 0); + "White knight turned to the right on white field"; + currentpicture:= TurnRight(WhiteMan); +endchar; + +beginchar(Knight+White+OnWhite+UpSideDown, qs#, qs#, 0); + "White knight turned upsidedown on white field"; + currentpicture:= TurnUpSideDown(WhiteMan); +endchar; + +%=========================================================== + +beginchar(Knight+White+OnBlack, qs#, qs#, 0); + "White knight on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + WhiteMan; +endchar; + +beginchar(Knight+White+OnBlack+LeftTurned, qs#, qs#, 0); + "White knight turned to the left on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(WhiteMan); +endchar; + +beginchar(Knight+White+OnBlack+RightTurned, qs#, qs#, 0); + "White knight turned to the right on black field"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(WhiteMan); +endchar; + +beginchar(Knight+White+OnBlack+UpSideDown, qs#, qs#, 0); + "White knight turned upsidedown on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(WhiteMan); +endchar; + +%=========================================================== + +beginchar(Knight+Neutral+OnWhite, qs#, qs#, 0); + "Neutral knight on white field"; + currentpicture:= NeutralMan; +endchar; + +beginchar(Knight+Neutral+OnWhite+LeftTurned, qs#, qs#, 0); + "Neutral knight turned to the left on white field"; + currentpicture:= TurnLeft(NeutralMan); +endchar; + +beginchar(Knight+Neutral+OnWhite+RightTurned, qs#, qs#, 0); + "Neutral knight turned to the right on white field"; + currentpicture:= TurnRight(NeutralMan); +endchar; + +beginchar(Knight+Neutral+OnWhite+UpSideDown, qs#, qs#, 0); + "Neutral knight turned upsidedown on white field"; + currentpicture:= TurnUpSideDown(NeutralMan); +endchar; + +%=========================================================== + +beginchar(Knight+Neutral+OnBlack, qs#, qs#, 0); + "Neutral knight on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + NeutralMan; +endchar; + +beginchar(Knight+Neutral+OnBlack+LeftTurned, qs#, qs#, 0); + "Neutral knight turned to the left on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(NeutralMan); +endchar; + +beginchar(Knight+Neutral+OnBlack+RightTurned, qs#, qs#, 0); + "Neutral knight turned to the right on black field"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(NeutralMan); +endchar; + +beginchar(Knight+Neutral+OnBlack+UpSideDown, qs#, qs#, 0); + "Neutral knight turned upsidedown on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(NeutralMan); +endchar; + +%=========================================================== + +beginchar(Knight+Black+OnWhite, qs#, qs#, 0); + "Black knight on white field"; + currentpicture:= BlackMan; +endchar; + +beginchar(Knight+Black+OnWhite+LeftTurned, qs#, qs#, 0); + "Black knight turned to the left on white field"; + currentpicture:= TurnLeft(BlackMan); +endchar; + +beginchar(Knight+Black+OnWhite+RightTurned, qs#, qs#, 0); + "Black knight turned to the right on white field"; + currentpicture:= TurnRight(BlackMan); +endchar; + +beginchar(Knight+Black+OnWhite+UpSideDown, qs#, qs#, 0); + "Black knight turned upsidedown on white field"; + currentpicture:= TurnUpSideDown(BlackMan); +endchar; + +%=========================================================== + +beginchar(Knight+Black+OnBlack, qs#, qs#, 0); + "Black knight on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + BlackMan; +endchar; + +beginchar(Knight+Black+OnBlack+LeftTurned, qs#, qs#, 0); + "Black knight turned to the left on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(BlackMan); +endchar; + +beginchar(Knight+Black+OnBlack+RightTurned, qs#, qs#, 0); + "Black knight turned to the right on black field"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(BlackMan); +endchar; + +beginchar(Knight+Black+OnBlack+UpSideDown, qs#, qs#, 0); + "Black knight turned upsidedown on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(BlackMan); +endchar; + +endinput diff --git a/fonts/bartel-chess-fonts/elch-pawn.mf b/fonts/bartel-chess-fonts/elch-pawn.mf new file mode 100644 index 0000000000..687e12ab26 --- /dev/null +++ b/fonts/bartel-chess-fonts/elch-pawn.mf @@ -0,0 +1,360 @@ +%====================================================================== +% This is +% pawn.mf +% +% Copyright (C) 1989-93 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +% This is the oldest part of all my the MF-sources. +% I started Metafonting with this figure. +% ElB. +%====================================================================== + +%----------------------------------------------------------- +% This macro depends on some global sizes: +% thin, BottomSpace, BottomWidth, sidewith +% The values are defined as basic sizes of the Chess Characters + +def PawnShape(expr wbf,hbf,wmf,hmf,wtf,htf,ibm,imt) = + %begingroup + %save wb,wm,wt,hb,hm,ht,interbm,intermt; + numeric wb,wm,wt,hb,hm,ht,interbm,intermt; + wb = BottomWidth*wbf; % width of bottom ellipse + hb = hbf*wb; % hight of bottom ellipse + wm = wmf*wb; hm = hmf*wm; % width and hight of middle ellipse + wt = wtf*wb; ht = htf*wt; % width and hight of top ellipse + interbm = ibm*thin; % amount of intersection of bottom + % and middle + intermt = imt*thin; % amount of intersection of middle + %and top + %save superb,superm,supert; + numeric superb,superm,supert; + superb=.73; + superm=.75; + supert=.73; + + %save topb,topm,topt; + numeric topb,topm,topt; + topb=BottomSpace+hb; + topm=topb+hm-interbm; + topt=topm+ht-intermt; + + %screenrule((0,BottomSpace),(qs,BottomSpace)); + %screenrule(((qs-wb)/2,0),((qs-wb)/2,qs)); + %screenrule(((qs+wb)/2,0),((qs+wb)/2,qs)); + + %screenrule((0,topb),(qs,topb)); + %screenrule((0,topm),(qs,topm)); + %screenrule((0,topt),(qs,topt)); + + %save bp,mp,tp; + numeric bp,mp,tp; + path bp,mp,tp,PawnPath; + + %save x,y,z; + %pair z[]b,x[]b,y[]b; + %pair z[]m,x[]m,y[]m; + %pair z[]t,x[]t,y[]t; + + bot rt z1b = ((qs+wb)/2, BottomSpace); + bot lft z3b = ((qs-wb)/2, BottomSpace); + bot y4b + hb = top y2b - hb = BottomSpace; + x2b = x4b = qs/2; + bp=superellipse(z1b,z2b,z3b,z4b,superb); + bp:= subpath(0,4) of bp; + + rt x1m - wm/2 = lft x3m + wm/2 = qs/2; + top y2m = bot y4m + hm = topm; + y1m = y3m = (y2m+y4m)/2; + x2m = x4m = qs/2; + mp=superellipse(z1m,z2m,z3m,z4m,superm); + + rt x1t - wt/2 = lft x3t + wt/2 = qs/2; + top y2t = bot y4t + ht = topt; + y1t = y3t = (y2t+y4t)/2; + x2t = x4t = qs/2; + tp=superellipse(z1t,z2t,z3t,z4t,supert); + + % compute the intersectiontimes on the right side of the pawn + % The pathtimes of superellipses range from 0 to 8 + + %save scbr,scmbr,scmtr,sctr; + numeric scbr,scmbr,scmtr,sctr; + scbr = xpart (bp intersectiontimes (subpath(6,8)of mp)); + scmbr = xpart (mp intersectiontimes (subpath(0,2)of bp)); + scmtr = xpart (mp intersectiontimes (subpath(6,8)of tp)); + sctr = xpart (tp intersectiontimes (subpath(0,2)of mp)); + + % here is a macro to mirror pathtimes of superellipses on y-axis + def mr(expr v) = + if v > 4: 12-v; + else: 4-v; + fi + enddef; + + % Now the left intersectionpoints + %save scbl,scmbl,scmtl,sctl; + numeric scbl,scmbl,scmtl,sctl; + scbl = mr(scbr); + scmbl = mr(scmbr); + scmtl = mr(scmtr); + sctl = mr(sctr); + + PawnPath:=subpath(0,scbr)of bp .. + subpath(scmbr,(8+scmtr)) of mp .. + subpath(sctr,8+sctl) of tp .. + subpath(scmtl,scmbl) of mp .. + subpath(scbl,4) of bp; + %endgroup + +enddef; +%----------------------------------------------------------- +def MakePawnPath = + pickup chess_pen; + if unknown PawnPath: + % wb = qs - 2*sidespace; % width of bottom ellipse + % hb = hbf*wb; % hight of bottom ellipse + % wm = wmf*wb; hm = hmf*wm; % width and hight of middle + % ellipse + % wt = wtf*wb; ht = htf*wt; % width and hight of top + % ellipse + % + % wbf, hbf, ,wmf, hmf, wtf, htf, ibm, imt + %PawnShape( .80, .50, .55, .85, .3, 1.0, 2.0, 1.2); + %PawnShape( .85, .55, .60, .90, .4, 1.0, 2.0, 1.2); + PawnShape( .77, .61, .60, .84, .35, 0.95, 1.8, 1.4); + fi +enddef; +%------------------------------------------------------------ +def CorrectPawnEdges = + pickup sqr; + drawdot(z1b); + drawdot(z3b); +enddef; +%----------------------------------------------------------- + +%we have to define six essential characters: +% WoW NoW BoW WoB NoB BoB +%Pawn 0 6 12 18 24 30 +%Knight 1 7 13 19 25 31 +%Bishop 2 8 14 20 26 32 +%Rook 3 9 15 21 27 33 +%Queen 4 10 16 22 28 34 +%King 5 11 17 23 29 35 + +% All these cases are repeated three more times: +% Left turned, Right turned and upside down +%------------------------------------------ + + +def MakeWhitePawn = + pickup chess_pen; + clearit; + MakePawnPath; + draw PawnPath -- cycle; + cullit; + WhiteMan:= currentpicture; +enddef; + +def MakeBlackPawn = + pickup chess_pen; + clearit; + MakePawnPath; + filldraw PawnPath -- cycle; + cullit; + BlackMan:= currentpicture; +enddef; + +def MakeOuterShape = + pickup frame_pen; + clearit; + filldraw PawnPath -- cycle; + cullit; + OuterShape:= currentpicture; +enddef; + +MakeWhitePawn; +MakeBlackPawn; +MakeNeutral(WhiteMan, BlackMan); +MakeOuterShape; + +%=========================================================== +% this one for testing +%beginchar(Pawn+White+OnBlack, qs#, qs#, 0); +% "White pawn on black field"; +% MakeBlackField; +% currentpicture:= currentpicture - OuterShape; +% cullit; +% currentpicture:= currentpicture + WhiteMan; +%endchar; +%endinput +%=========================================================== + +beginchar(Pawn+White+OnWhite, qs#, qs#, 0); + "White pawn on white field"; + currentpicture:= WhiteMan; +endchar; + +beginchar(Pawn+White+OnWhite+LeftTurned, qs#, qs#, 0); + "White pawn on white field rotated to the left"; + currentpicture:= TurnLeft(WhiteMan); +endchar; + +beginchar(Pawn+White+OnWhite+RightTurned, qs#, qs#, 0); + "White pawn on white field rotated to the right"; + currentpicture:= TurnRight(WhiteMan); +endchar; + +beginchar(Pawn+White+OnWhite+UpSideDown, qs#, qs#, 0); + "White pawn on white field upside down"; + currentpicture:= TurnUpSideDown(WhiteMan); +endchar; + +beginchar(Pawn+Black+OnWhite, qs#, qs#, 0); + "Black pawn on white field"; + currentpicture:= BlackMan; +endchar; + +beginchar(Pawn+Black+OnWhite+LeftTurned, qs#, qs#, 0); + "Black pawn on white field rotated to the left"; + currentpicture:= TurnLeft(BlackMan); +endchar; + +beginchar(Pawn+Black+OnWhite+RightTurned, qs#, qs#, 0); + "Black pawn on white field rotated to the right"; + currentpicture:= TurnRight(BlackMan); +endchar; + +beginchar(Pawn+Black+OnWhite+UpSideDown, qs#, qs#, 0); + "Black pawn on white field upside down"; + currentpicture:= TurnUpSideDown(BlackMan); +endchar; + +beginchar(Pawn+Neutral+OnWhite, qs#, qs#, 0); + "Neutral pawn on white field"; + currentpicture:= NeutralMan; +endchar; + +beginchar(Pawn+Neutral+OnWhite+LeftTurned, qs#, qs#, 0); + "Neutral pawn on white field rotated to the left"; + currentpicture:= TurnLeft(NeutralMan); +endchar; + +beginchar(Pawn+Neutral+OnWhite+RightTurned, qs#, qs#, 0); + "Neutral pawn on white field rotated to the right"; + currentpicture:= TurnRight(NeutralMan); +endchar; + +beginchar(Pawn+Neutral+OnWhite+UpSideDown, qs#, qs#, 0); + "Neutral pawn on white field upside down"; + currentpicture:= TurnUpSideDown(NeutralMan); +endchar; + +beginchar(Pawn+White+OnBlack, qs#, qs#, 0); + "White pawn on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + WhiteMan; +endchar; + +beginchar(Pawn+White+OnBlack+LeftTurned, qs#, qs#, 0); + "White pawn on black field turned to the left"; + MakeBlackField; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(WhiteMan); +endchar; + +beginchar(Pawn+White+OnBlack+RightTurned, qs#, qs#, 0); + "White pawn on black field turned to the right"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(WhiteMan); +endchar; + +beginchar(Pawn+White+OnBlack+UpSideDown, qs#, qs#, 0); + "White pawn on black field upsidedown"; + MakeBlackField; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(WhiteMan); +endchar; + +beginchar(Pawn+Neutral+OnBlack, qs#, qs#, 0); + "Neutral pawn on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + NeutralMan; +endchar; + +beginchar(Pawn+Neutral+OnBlack+LeftTurned, qs#, qs#, 0); + "Neutral pawn on black field turned to the left"; + MakeBlackField; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(NeutralMan); +endchar; + +beginchar(Pawn+Neutral+OnBlack+RightTurned, qs#, qs#, 0); + "Neutral pawn on black field turned to the right"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(NeutralMan); +endchar; + +beginchar(Pawn+Neutral+OnBlack+UpSideDown, qs#, qs#, 0); + "Neutral pawn on black field upsidedown"; + MakeBlackField; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(NeutralMan); +endchar; + +beginchar(Pawn+Black+OnBlack, qs#, qs#, 0); + "Black pawn on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + BlackMan; +endchar; + +beginchar(Pawn+Black+OnBlack+LeftTurned, qs#, qs#, 0); + "Black pawn on black field turned to the left"; + MakeBlackField; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(BlackMan); +endchar; + +beginchar(Pawn+Black+OnBlack+RightTurned, qs#, qs#, 0); + "Black pawn on black field turned to the right"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(BlackMan); +endchar; + +beginchar(Pawn+Black+OnBlack+UpSideDown, qs#, qs#, 0); + "Black pawn on black field upsidedown"; + MakeBlackField; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(BlackMan); +endchar; diff --git a/fonts/bartel-chess-fonts/elch-queen.mf b/fonts/bartel-chess-fonts/elch-queen.mf new file mode 100644 index 0000000000..52b5ac371f --- /dev/null +++ b/fonts/bartel-chess-fonts/elch-queen.mf @@ -0,0 +1,441 @@ +%====================================================================== +% This is +% queen.mf +% +% Copyright (C) 1989-93 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%====================================================================== + +def OneCurl (expr a,da, b,db, above, pangle) = + begingroup + save dx, dy, p; + pair dx; dx= b-a; + pair dy; dy= dx rotated 90; + pair p; p= (a+.5dx+above*dy); + a{da} .. {dx rotated pangle}p & + p{dx rotated -pangle} .. {db}b + endgroup +enddef; + +def SplitPath(suffix $) % the first suffix of z + (expr p, % the path + n, % how often + shdelta % the shift multiplier + % it's used to 'drift' the points + % away from the center + ) = + % This makro takes a path, and defines n eqhal spaced + % good points on the path. If shdelta is a small amount + % greater zero, the pieces are smaller at the end of the + % path. + begingroup + pair dl[]; + pair dr[]; + numeric i,l,r,delta; + + i= 0; + l= 0; + r= length(p); + delta= length(p)/n; + forever: + if i = n-i: + z$l[i] = z$r[i] = point .5length(p) of p; + dl[i] = dr[i] = direction .5length(p) of p; + else: + numeric shift; + if i=0: shift = 0 else: shift = (n-i)*shdelta*delta fi; + z$l[i] = good.lft (point (l-shift) of p); + dl[i] = direction (l-shift) of p; + z$r[i] = good.rt (point (r+shift) of p); + dr[i] = direction (r+shift) of p; + fi + l:= l+delta; + r:= r-delta; + exitif r-l < 0; + i:= incr i; + endfor; + for i:= incr i step 1 until n: + z$l[i] = z$r[n-i]; + z$r[i] = z$l[n-i]; + dl[i] = dr[n-i]; + dr[i] = dl[n-i]; + endfor; + endgroup +enddef; + +def CurlPath(suffix $) + (expr p, % the path + n, % how often + above, % the peak above the path + pangle, % the direction at the peak + shdelta % the shift multiplier + % it's used to 'drift' the points + % away from the center + ) = + begingroup + save dl, dr; + save i,l,r,delta,shift; + SplitPath($, p, n, shdelta); + OneCurl(z$l0, dl0, z$l1, dl1, above, pangle) + for i:= 2 step 1 until n: + & OneCurl(z$l[i-1], dl[i-1], z4l[i], dl[i], above, pangle) + endfor + endgroup +enddef; + +def SplitPoints(suffix $) % The same definition as SplitPath + (expr p, % the path + n, % how often + shdelta % the shift multiplier + % it's used to 'drift' the points + % away from the center + ) = + begingroup + save dl, dr; + save i,l,r,delta,shift; + SplitPath($, p, n, shdelta); + endgroup +enddef; + +def Kegel(expr p,q) = + begingroup + path KPath; + numeric Width[],x[].a,y[].a,x[].b,y[].b; + numeric Base,MiddlePos,BowIns,Height,LowerHeight,TopHeight; + + + Width0 = Base = length(q-p); + Width1 = 1.30Base; + Width2 = 0.35Base; + Width3 = 1.30Base; % Diameter of circle + Height = 5.75Base; + MiddlePos = 0.25; + + BowIns = Width3/2+-+Width2/2; + LowerHeight + TopHeight = Height - Width3 + BowIns; + LowerHeight = MiddlePos*(LowerHeight+TopHeight); + + z0a = p; + z0b = z0a + (Width0,0); + forsuffixes $=1,2: + x$a + x$b = x0a + x0b; x$b - x$a = Width$; + endfor; + y1a = y1b = y0a + LowerHeight; + y2a = y2b = y1a + TopHeight; + x3a = .5(x2b+x2a); + y3a = y2a + BowIns; + %labels(0a,0b,1a,1b,2a,2b,3a); + + path LeftP,RightP,KgCircle; + LeftP= z2a -- z1a -- z0a; + RightP= z0b -- z1b -- z2b; + KgCircle= halfcircle rotated 180 scaled Width3 shifted z3a; + + path KPath; + KPath:= RightP .. + subpath ((ypart((z1b -- 1.5[z1b,z2b]) + intersectiontimes KgCircle)),4) of KgCircle .. + halfcircle scaled Width3 shifted z3a .. + subpath (0,ypart((z1a -- 1.5[z1a,z2a]) + intersectiontimes KgCircle)) of KgCircle .. + LeftP; + reverse (KPath rotatedaround(p, angle (q-p))) + endgroup; +enddef; + +def cCircle (expr bl, br, t, r) = + % draw a circle with diameter r clockweise(!) at top + % of triangle bl,br,t + (reverse (halfcircle & halfcircle rotated 180)) + scaled r shifted (left*.5r) rotated angle(.5[bl,br]-t) shifted t +enddef; + +def DefineQueenPath(expr n) = + %SetParam; + DefineFootBows(-.034qs, % No Space to Bottom + .72qs, % BowOneWidth + .26qs, % FootHeight + .40, % BowTwoLoc + .15, % WidthToHeight + .66, % BowTwoLen + 0.66); % BowThreeLen + +% This is not needed for the fs-Type of queen. +% path KPath, +% numeric b,s; +% % b and s define the ratio of 5 peak bases and 4 spaces. +% % if you want more or other spacing change the values +% b = 1.1s; +% 5b + 4s = length(Bow3); +% +% pair at,bt; +% at= point 0 of Bow3; +% bt= point b of Bow3; +% KPath:= Kegel(at, bt); +% for t=b+s step b+s until length(Bow3): +% KPath:= KPath .. subpath(t-s,t) of Bow3; +% KPath:= KPath .. Kegel(point t of Bow3, +% point(t+b)of Bow3); +% endfor; + + % Some correction of the lower bows, to make + % the corners more round + Bow0:= ShortenPath(Bow0, 5thin); + Bow1:= ShortenPath(Bow1, 5thin); + x1l:= lft(x1l + 2.5thin); + x1r:= rt(x1r - 2.5thin); + Bow0:= z1r{down} .. Bow0 .. {up}z1l; + Bow1:= z1l{up} .. Bow1 .. {down}z1r; + + Bow4:= Lengthen(ParallelPath(Bow3, .10qs), .05qs); + z4l = good.lft (point 0 of Bow4); + z4 = point .5length(Bow4) of Bow4; + z4r = good.rt point infinity of Bow4; + Bow4:= z4l {direction 0 of Bow4} .. + z4 {right} .. + z4r {direction infinity of Bow4}; + + Bow4:= CurlPath(4, Bow4, n, .15, 35, .04); + + z5l = good.lft (SideSpace, .72qs); + z5r = good.rt (qs-SideSpace, .72qs); +show z5l, z5r; + z5 = (.5qs, .83qs); + Bow5 = z5l .. z5 .. z5r; + SplitPoints(5, Bow5, n-1, .01); + + path cPath; + cPath = z4l0 + for i=0 step 1 until n-1: + & z4l[i] -- z5l[i] & + cCircle(z4l[i],z4l[i+1],z5l[i],.09qs) -- z4l[i+1] + endfor; + + path LeftPath,RightPath,QueenShape; + LeftPath:= z1l -- z2l -- z3l -- z4l; + RightPath:= z4r -- z3r -- z2r -- z1r; + QueenShape:= Bow0 & + LeftPath & + cPath & + RightPath & + cycle; +enddef; + +pickup chess_pen; + +def MakeWhiteQueen = + clearit; + pickup chess_pen; + draw QueenShape; + %forsuffixes $=0,1,2,3,4,5: undraw z4r$; endfor; + %forsuffixes $=0,1,2,3,4,5: draw z4l$; endfor; + %forsuffixes $=0,1,2,3,4: draw z5l$; endfor; + forsuffixes $=1,2,3,4: draw Bow$; endfor; + WhiteMan:= currentpicture; +enddef; + +def MakeBlackQueen = + clearit; + pickup chess_pen scaled 1.1; + filldraw QueenShape; + cullit; + forsuffixes $=1,2,3: + undraw ShortenPath(Bow$, thin); + endfor; + BlackMan:= currentpicture; +enddef; + +def MakeOuterShape = + clearit; + pickup frame_pen; + filldraw QueenShape; + cullit; + OuterShape:= currentpicture; +enddef; + +DefineQueenPath(5); +MakeWhiteQueen; +MakeBlackQueen; +MakeNeutral(WhiteMan,BlackMan); +MakeOuterShape; + +%=========================================================== +% this one for testing +%beginchar(Queen+White+OnBlack, qs#, qs#, 0); +% "White queen on black field"; +% MakeBlackField; +% currentpicture:= currentpicture - OuterShape; +% cullit; +% currentpicture:= currentpicture + WhiteMan; +%endchar; +%endinput +%=========================================================== + +beginchar(Queen+White+OnWhite, qs#, qs#, 0); + "White queen on white field"; + currentpicture:= WhiteMan; +endchar; + +beginchar(Queen+White+OnWhite+LeftTurned, qs#, qs#, 0); + "White queen on white field rotated to the left"; + currentpicture:= TurnLeft(WhiteMan); +endchar; + +beginchar(Queen+White+OnWhite+RightTurned, qs#, qs#, 0); + "White queen on white field rotated to the right"; + currentpicture:= TurnRight(WhiteMan); +endchar; + +beginchar(Queen+White+OnWhite+UpSideDown, qs#, qs#, 0); + "White queen on white field upside down"; + currentpicture:= TurnUpSideDown(WhiteMan); +endchar; + +beginchar(Queen+Black+OnWhite, qs#, qs#, 0); + "Black queen on white field"; + currentpicture:= BlackMan; +endchar; + +beginchar(Queen+Black+OnWhite+LeftTurned, qs#, qs#, 0); + "Black queen on white field rotated to the left"; + currentpicture:= TurnLeft(BlackMan); +endchar; + +beginchar(Queen+Black+OnWhite+RightTurned, qs#, qs#, 0); + "Black queen on white field rotated to the right"; + currentpicture:= TurnRight(BlackMan); +endchar; + +beginchar(Queen+Black+OnWhite+UpSideDown, qs#, qs#, 0); + "Black queen on white field upside down"; + currentpicture:= TurnUpSideDown(BlackMan); +endchar; + +beginchar(Queen+Neutral+OnWhite, qs#, qs#, 0); + "Neutral queen on white field"; + currentpicture:= NeutralMan; +endchar; + +beginchar(Queen+Neutral+OnWhite+LeftTurned, qs#, qs#, 0); + "Neutral queen on white field rotated to the left"; + currentpicture:= TurnLeft(NeutralMan); +endchar; + +beginchar(Queen+Neutral+OnWhite+RightTurned, qs#, qs#, 0); + "Neutral queen on white field rotated to the right"; + currentpicture:= TurnRight(NeutralMan); +endchar; + +beginchar(Queen+Neutral+OnWhite+UpSideDown, qs#, qs#, 0); + "Neutral queen on white field upside down"; + currentpicture:= TurnUpSideDown(NeutralMan); +endchar; + +beginchar(Queen+White+OnBlack, qs#, qs#, 0); + "White queen on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + WhiteMan; +endchar; + +beginchar(Queen+White+OnBlack+LeftTurned, qs#, qs#, 0); + "White queen on black field turned to the left"; + MakeBlackField; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(WhiteMan); +endchar; + +beginchar(Queen+White+OnBlack+RightTurned, qs#, qs#, 0); + "White queen on black field turned to the right"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(WhiteMan); +endchar; + +beginchar(Queen+White+OnBlack+UpSideDown, qs#, qs#, 0); + "White queen on black field upsidedown"; + MakeBlackField; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(WhiteMan); +endchar; + +beginchar(Queen+Neutral+OnBlack, qs#, qs#, 0); + "Neutral queen on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + NeutralMan; +endchar; + +beginchar(Queen+Neutral+OnBlack+LeftTurned, qs#, qs#, 0); + "Neutral queen on black field turned to the left"; + MakeBlackField; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(NeutralMan); +endchar; + +beginchar(Queen+Neutral+OnBlack+RightTurned, qs#, qs#, 0); + "Neutral queen on black field turned to the right"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(NeutralMan); +endchar; + +beginchar(Queen+Neutral+OnBlack+UpSideDown, qs#, qs#, 0); + "Neutral queen on black field upsidedown"; + MakeBlackField; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(NeutralMan); +endchar; + +beginchar(Queen+Black+OnBlack, qs#, qs#, 0); + "Black queen on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + BlackMan; +endchar; + +beginchar(Queen+Black+OnBlack+LeftTurned, qs#, qs#, 0); + "Black queen on black field turned to the left"; + MakeBlackField; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(BlackMan); +endchar; + +beginchar(Queen+Black+OnBlack+RightTurned, qs#, qs#, 0); + "Black queen on black field turned to the right"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(BlackMan); +endchar; + +beginchar(Queen+Black+OnBlack+UpSideDown, qs#, qs#, 0); + "Black queen on black field upsidedown"; + MakeBlackField; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(BlackMan); +endchar; diff --git a/fonts/bartel-chess-fonts/elch-rook.mf b/fonts/bartel-chess-fonts/elch-rook.mf new file mode 100644 index 0000000000..e65230fd87 --- /dev/null +++ b/fonts/bartel-chess-fonts/elch-rook.mf @@ -0,0 +1,325 @@ +%====================================================================== +% This is +% rook.mf +% +% Copyright (C) 1989-93 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%====================================================================== + +def MakeRookPath = + + numeric wdbotta,wdbottb,wdstem,wdtop; % The widths + numeric htbotta,htbottb,htbottc,httopa,httopb; + numeric x[]; numeric y[]; + + wdbotta:= .90 BottomWidth; + wdbottb:= .72 BottomWidth; + wdstem := .51 BottomWidth; + wdtop := .74 BottomWidth; + + htbotta:= .12BottomWidth; + htbottb:= .16BottomWidth; + htbottc:= .12BottomWidth; + httopa := .13BottomWidth; + httopb := .20BottomWidth; + + rt x1 = rt x3 = .5(qs+wdbotta); + lft x2 = lft x4 = .5(qs-wdbotta); + bot y1 = bot y2 = BottomSpace; + top y3 = top y4 = BottomSpace+htbotta; + + y5 = y6 = y4; + top y8 - bot y6 = top y7 - bot y5 = htbottb; + rt x5 = rt x7 = .5(qs+wdbottb); + lft x6 = lft x8 = .5(qs-wdbottb); + + top y9 - bot y7 = top y10 - bot y8 = htbottc; + rt x9 = rt x11 = .5(qs+wdstem); + lft x10 = lft x12 = .5(qs-wdstem); + top y13 - bot y11 = top y14 - bot y12 = httopa; + top y15 - bot y13 = top y16 - bot y14 = httopb; + top y15 = top y16 = qs - TopSpace + .01qs; + rt x13 = rt x15 = .5(qs+wdtop); + lft x14 = lft x16 = .5(qs-wdtop); + + path LeftP,RightP,RookPath,SmP[]; + LeftP= z16--z14--z12--z10--z8--z6--z4--z2; + RightP= z1--z3--z5--z7--z9--z11--z13--z15; + + def RookTopPath(expr nn) = + numeric wdt; wdt = abs xpart(z15-z16)/(2nn+3); + numeric sdt; sdt = wdt; + pair pt,pb; + path TopP; TopP=z15; + pt = z15-(sdt,0); + bot pb = z15-(sdt,.5httopb); + for i=1 upto nn+1: + TopP:= TopP--pt--pb; + pb:= pb-(wdt,0); + pt:= pt-(wdt,0); + TopP:= TopP--pb--pt; + pb:= pb-(wdt,0); + pt:= pt-(wdt,0); + endfor; + TopP:= TopP--z16; + enddef; + + RookTopPath(1); + RookPath=RightP & TopP & LeftP -- cycle; + + SmP1= z5--z6; + SmP2= z7--z8; + SmP3= z9--z10; + SmP4= z11--z12; + SmP5= z13--z14; + + if proofing > 0: + labels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); + def PixelGrid(expr PixPerInch, w) = + if proofing > 0: + begingroup + numeric d; + d = pixels_per_inch/PixPerInch; + makegrid(0, + for i=d step d until w: ,i endfor) + (0,for i=d step d until w: ,i endfor) + endgroup; + fi; + enddef; + PixelGrid(400,qs); + fi + +enddef; +%------------------------------------------------------------ +def DrawInner = + %pickup inner_pen; + pickup chess_pen; + forsuffixes $=1,2,3,4,5: + draw SmP$; + endfor; +enddef; +%------------------------------------------------------------ +def UnDrawInner = + pickup chess_pen scaled 1.1; + forsuffixes $=1,3,4: + undraw ShortenPath(SmP$,thin); + undraw ShortenPath(SmP2,1.5thin); + undraw ShortenPath(SmP5,1.5thin); + endfor; +enddef; +%------------------------------------------------------------ + +def MakeWhiteRook = + clearit; + draw RookPath; + DrawInner; + cullit; + WhiteMan:= currentpicture; +enddef; + +def MakeBlackRook = + clearit; + filldraw RookPath; + UnDrawInner; + cullit; + BlackMan:= currentpicture; +enddef; + +def MakeOuterShape = + clearit; + pickup frame_pen; + filldraw RookPath; + cullit; + OuterShape:= currentpicture; +enddef; + +MakeRookPath; +MakeWhiteRook; +MakeBlackRook; +MakeNeutral(WhiteMan, BlackMan); +MakeOuterShape; + +%=========================================================== +% this one for testing +%beginchar(Rook+White+OnBlack, qs#, qs#, 0); +% "White rook on black field"; +% MakeBlackField; +% currentpicture:= currentpicture - OuterShape; +% cullit; +% currentpicture:= currentpicture + WhiteMan; +%endchar; +%beginchar(Rook+Black+OnWhite, qs#, qs#, 0); +% "Black rook on white field"; +% currentpicture:= BlackMan; +%endchar; +%endinput +%----------------------------------------------------------------------- +% +beginchar(Rook+White+OnWhite, qs#, qs#, 0); + "White rook on white field"; + currentpicture:= WhiteMan; +endchar; + +beginchar(Rook+White+OnWhite+LeftTurned, qs#, qs#, 0); + "White rook on white field rotated to the left"; + currentpicture:= TurnLeft(WhiteMan); +endchar; + +beginchar(Rook+White+OnWhite+RightTurned, qs#, qs#, 0); + "White rook on white field rotated to the right"; + currentpicture:= TurnRight(WhiteMan); +endchar; + +beginchar(Rook+White+OnWhite+UpSideDown, qs#, qs#, 0); + "White rook on white field upside down"; + currentpicture:= TurnUpSideDown(WhiteMan); +endchar; + +beginchar(Rook+Black+OnWhite, qs#, qs#, 0); + "Black rook on white field"; + currentpicture:= BlackMan; +endchar; + +beginchar(Rook+Black+OnWhite+LeftTurned, qs#, qs#, 0); + "Black rook on white field rotated to the left"; + currentpicture:= TurnLeft(BlackMan); +endchar; + +beginchar(Rook+Black+OnWhite+RightTurned, qs#, qs#, 0); + "Black rook on white field rotated to the right"; + currentpicture:= TurnRight(BlackMan); +endchar; + +beginchar(Rook+Black+OnWhite+UpSideDown, qs#, qs#, 0); + "Black rook on white field upside down"; + currentpicture:= TurnUpSideDown(BlackMan); +endchar; + +beginchar(Rook+Neutral+OnWhite, qs#, qs#, 0); + "Neutral rook on white field"; + currentpicture:= NeutralMan; +endchar; + +beginchar(Rook+Neutral+OnWhite+LeftTurned, qs#, qs#, 0); + "Neutral rook on white field rotated to the left"; + currentpicture:= TurnLeft(NeutralMan); +endchar; + +beginchar(Rook+Neutral+OnWhite+RightTurned, qs#, qs#, 0); + "Neutral rook on white field rotated to the right"; + currentpicture:= TurnRight(NeutralMan); +endchar; + +beginchar(Rook+Neutral+OnWhite+UpSideDown, qs#, qs#, 0); + "Neutral rook on white field upside down"; + currentpicture:= TurnUpSideDown(NeutralMan); +endchar; + +beginchar(Rook+White+OnBlack, qs#, qs#, 0); + "White rook on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + WhiteMan; +endchar; + +beginchar(Rook+White+OnBlack+LeftTurned, qs#, qs#, 0); + "White rook on black field turned to the left"; + MakeBlackField; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(WhiteMan); +endchar; + +beginchar(Rook+White+OnBlack+RightTurned, qs#, qs#, 0); + "White rook on black field turned to the right"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(WhiteMan); +endchar; + +beginchar(Rook+White+OnBlack+UpSideDown, qs#, qs#, 0); + "White rook on black field upsidedown"; + MakeBlackField; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(WhiteMan); +endchar; + +beginchar(Rook+Neutral+OnBlack, qs#, qs#, 0); + "Neutral rook on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + NeutralMan; +endchar; + +beginchar(Rook+Neutral+OnBlack+LeftTurned, qs#, qs#, 0); + "Neutral rook on black field turned to the left"; + MakeBlackField; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(NeutralMan); +endchar; + +beginchar(Rook+Neutral+OnBlack+RightTurned, qs#, qs#, 0); + "Neutral rook on black field turned to the right"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(NeutralMan); +endchar; + +beginchar(Rook+Neutral+OnBlack+UpSideDown, qs#, qs#, 0); + "Neutral rook on black field upsidedown"; + MakeBlackField; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(NeutralMan); +endchar; + +beginchar(Rook+Black+OnBlack, qs#, qs#, 0); + "Black rook on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + BlackMan; +endchar; + +beginchar(Rook+Black+OnBlack+LeftTurned, qs#, qs#, 0); + "Black rook on black field turned to the left"; + MakeBlackField; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(BlackMan); +endchar; + +beginchar(Rook+Black+OnBlack+RightTurned, qs#, qs#, 0); + "Black rook on black field turned to the right"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(BlackMan); +endchar; + +beginchar(Rook+Black+OnBlack+UpSideDown, qs#, qs#, 0); + "Black rook on black field upsidedown"; + MakeBlackField; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(BlackMan); +endchar; diff --git a/fonts/bartel-chess-fonts/fselch.mf b/fonts/bartel-chess-fonts/fselch.mf new file mode 100644 index 0000000000..cdd65a59cc --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch.mf @@ -0,0 +1,67 @@ +%====================================================================== +% This is +% fselch.mf +% +% Copyright (C) 1989-93,95 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%====================================================================== +% + +thin#=0.03qs#; +inner_thin# = .66thin#; +frame_thin# = 4thin#; + +SideSpace# = .11qs#; +BottomWidth# = qs# - 2SideSpace#; +BottomSpace# = .12qs#; +TopSpace# = .12qs#; + +%----------------------------------------------------------------------- +% Now define our pixels +define_whole_pixels(qs,thin,inner_thin,frame_thin); +define_pixels(SideSpace,BottomWidth,BottomSpace,TopSpace); + +%----------------------------------------------------------------------- +% defining our pens +pen chess_pen; chess_pen = pencircle scaled thin; +pen inner_pen; inner_pen = pencircle scaled inner_thin; +pen frame_pen; frame_pen = pencircle scaled frame_thin; +pickup chess_pen; + +%----------------------------------------------------------------------- +% get our base +input elch-chbase.mf; + +%----------------------------------------------------------------------- +% now generate the figures +pickup chess_pen; input elch-blackfield.mf; +pickup chess_pen; input elch-pawn.mf; +pickup chess_pen; input elch-knight.mf; +pickup chess_pen; input elch-queen.mf; +pickup chess_pen; input elch-king.mf; +pickup chess_pen; input elch-bishop.mf; +pickup chess_pen; input elch-rook.mf; +pickup chess_pen; input elch-geo.mf; +pickup chess_pen; input elch-equi.mf; + +%---------------------------------------------------------------------- +% Now the fontdimension parameters +font_normal_space qs#; +font_normal_stretch 0; +font_normal_shrink 0; +font_x_height qs#; +font_quad qs#; +font_extra_space 0; diff --git a/fonts/bartel-chess-fonts/fselch10.mf b/fonts/bartel-chess-fonts/fselch10.mf new file mode 100644 index 0000000000..45f516a211 --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch10.mf @@ -0,0 +1,29 @@ +%====================================================================== +% This is +% fselch10.mf +% +% Copyright (C) 1989-93 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%====================================================================== +% + +proofing:=1; +mode_setup; + +qs#:= 10pt#; +numeric HatchLinePart; HatchLinePart=6; +input fselch.mf; +end; diff --git a/fonts/bartel-chess-fonts/fselch10.tfm b/fonts/bartel-chess-fonts/fselch10.tfm Binary files differnew file mode 100644 index 0000000000..87d689a717 --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch10.tfm diff --git a/fonts/bartel-chess-fonts/fselch11.mf b/fonts/bartel-chess-fonts/fselch11.mf new file mode 100644 index 0000000000..0f02f7382c --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch11.mf @@ -0,0 +1,26 @@ +%====================================================================== +% This is +% fselch11.mf +% +% Copyright (C) 1989-93 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%====================================================================== +% +mode_setup; + +qs#:= 11pt#; +input fselch.mf; +end; diff --git a/fonts/bartel-chess-fonts/fselch11.tfm b/fonts/bartel-chess-fonts/fselch11.tfm Binary files differnew file mode 100644 index 0000000000..6f14f87812 --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch11.tfm diff --git a/fonts/bartel-chess-fonts/fselch12.mf b/fonts/bartel-chess-fonts/fselch12.mf new file mode 100644 index 0000000000..23ff2c9051 --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch12.mf @@ -0,0 +1,26 @@ +%====================================================================== +% This is +% fselch12.mf +% +% Copyright (C) 1989-93 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%====================================================================== +% +mode_setup; + +qs#:= 12pt#; +input fselch.mf; +end; diff --git a/fonts/bartel-chess-fonts/fselch12.tfm b/fonts/bartel-chess-fonts/fselch12.tfm Binary files differnew file mode 100644 index 0000000000..1aab8d53aa --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch12.tfm diff --git a/fonts/bartel-chess-fonts/fselch13.mf b/fonts/bartel-chess-fonts/fselch13.mf new file mode 100644 index 0000000000..13ca49e80e --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch13.mf @@ -0,0 +1,26 @@ +%====================================================================== +% This is +% fselch13.mf +% +% Copyright (C) 1989-93 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%====================================================================== +% +mode_setup; + +qs#:= 13pt#; +input fselch.mf; +end; diff --git a/fonts/bartel-chess-fonts/fselch13.tfm b/fonts/bartel-chess-fonts/fselch13.tfm Binary files differnew file mode 100644 index 0000000000..c4ab8182e9 --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch13.tfm diff --git a/fonts/bartel-chess-fonts/fselch14.mf b/fonts/bartel-chess-fonts/fselch14.mf new file mode 100644 index 0000000000..24419bd49c --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch14.mf @@ -0,0 +1,26 @@ +%====================================================================== +% This is +% fselch14.mf +% +% Copyright (C) 1989-93 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%====================================================================== +% +mode_setup; + +qs#:= 14pt#; +input fselch.mf; +end; diff --git a/fonts/bartel-chess-fonts/fselch14.tfm b/fonts/bartel-chess-fonts/fselch14.tfm Binary files differnew file mode 100644 index 0000000000..69c4158d73 --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch14.tfm diff --git a/fonts/bartel-chess-fonts/fselch16.mf b/fonts/bartel-chess-fonts/fselch16.mf new file mode 100644 index 0000000000..5a0a80d655 --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch16.mf @@ -0,0 +1,26 @@ +%====================================================================== +% This is +% fselch16.mf +% +% Copyright (C) 1989-93 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%====================================================================== +% +mode_setup; + +qs#:= 16pt#; +input fselch.mf; +end; diff --git a/fonts/bartel-chess-fonts/fselch16.tfm b/fonts/bartel-chess-fonts/fselch16.tfm Binary files differnew file mode 100644 index 0000000000..7bc87dc9e4 --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch16.tfm diff --git a/fonts/bartel-chess-fonts/fselch17.mf b/fonts/bartel-chess-fonts/fselch17.mf new file mode 100644 index 0000000000..8cbb938067 --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch17.mf @@ -0,0 +1,26 @@ +%====================================================================== +% This is +% fselch17.mf +% +% Copyright (C) 1989-93 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%====================================================================== +% +mode_setup; + +qs#:= 17pt#; +input fselch.mf; +end; diff --git a/fonts/bartel-chess-fonts/fselch17.tfm b/fonts/bartel-chess-fonts/fselch17.tfm Binary files differnew file mode 100644 index 0000000000..cea1b20556 --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch17.tfm diff --git a/fonts/bartel-chess-fonts/fselch20.mf b/fonts/bartel-chess-fonts/fselch20.mf new file mode 100644 index 0000000000..9d638275cf --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch20.mf @@ -0,0 +1,26 @@ +%====================================================================== +% This is +% fselch20.mf +% +% Copyright (C) 1989-93 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%====================================================================== +% +mode_setup; + +qs#:= 20pt#; +input fselch.mf; +end; diff --git a/fonts/bartel-chess-fonts/fselch20.tfm b/fonts/bartel-chess-fonts/fselch20.tfm Binary files differnew file mode 100644 index 0000000000..537cac086e --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch20.tfm diff --git a/fonts/bartel-chess-fonts/fselch24.mf b/fonts/bartel-chess-fonts/fselch24.mf new file mode 100644 index 0000000000..646e031aae --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch24.mf @@ -0,0 +1,26 @@ +%====================================================================== +% This is +% fselch24.mf +% +% Copyright (C) 1989-93 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%====================================================================== +% +mode_setup; + +qs#:= 24pt#; +input fselch.mf; +end; diff --git a/fonts/bartel-chess-fonts/fselch24.tfm b/fonts/bartel-chess-fonts/fselch24.tfm Binary files differnew file mode 100644 index 0000000000..5b1242f2fd --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch24.tfm diff --git a/fonts/bartel-chess-fonts/fselch32.mf b/fonts/bartel-chess-fonts/fselch32.mf new file mode 100644 index 0000000000..d8c6a87958 --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch32.mf @@ -0,0 +1,26 @@ +%====================================================================== +% This is +% fselch32.mf +% +% Copyright (C) 1989-93 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%====================================================================== +% +mode_setup; + +qs#:= 32pt#; +input fselch.mf; +end; diff --git a/fonts/bartel-chess-fonts/fselch32.tfm b/fonts/bartel-chess-fonts/fselch32.tfm Binary files differnew file mode 100644 index 0000000000..9f2ef2a1b3 --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch32.tfm diff --git a/fonts/bartel-chess-fonts/fselch36.mf b/fonts/bartel-chess-fonts/fselch36.mf new file mode 100644 index 0000000000..e1338f9539 --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch36.mf @@ -0,0 +1,27 @@ +%====================================================================== +% This is +% fselch36.mf +% +% Copyright (C) 1989-93 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%====================================================================== +% + +mode_setup; + +qs#:= 36pt#; +input fselch.mf; +end; diff --git a/fonts/bartel-chess-fonts/fselch36.tfm b/fonts/bartel-chess-fonts/fselch36.tfm Binary files differnew file mode 100644 index 0000000000..18a1f2c1df --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch36.tfm diff --git a/fonts/bartel-chess-fonts/fselch6.mf b/fonts/bartel-chess-fonts/fselch6.mf new file mode 100644 index 0000000000..dbe168160f --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch6.mf @@ -0,0 +1,27 @@ +%====================================================================== +% This is +% fselch6.mf +% +% Copyright (C) 1989-93 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%====================================================================== +% +mode_setup; + +qs#:= 6pt#; +numeric HatchLinePart; HatchLinePart=7; +input fselch.mf; +end; diff --git a/fonts/bartel-chess-fonts/fselch6.tfm b/fonts/bartel-chess-fonts/fselch6.tfm Binary files differnew file mode 100644 index 0000000000..e010f9d0be --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch6.tfm diff --git a/fonts/bartel-chess-fonts/fselch7.mf b/fonts/bartel-chess-fonts/fselch7.mf new file mode 100644 index 0000000000..0dc3556a40 --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch7.mf @@ -0,0 +1,27 @@ +%====================================================================== +% This is +% fselch7.mf +% +% Copyright (C) 1989-93 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%====================================================================== +% +mode_setup; + +qs#:= 7pt#; +numeric HatchLinePart; HatchLinePart=7; +input fselch.mf; +end; diff --git a/fonts/bartel-chess-fonts/fselch7.tfm b/fonts/bartel-chess-fonts/fselch7.tfm Binary files differnew file mode 100644 index 0000000000..26d53801fb --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch7.tfm diff --git a/fonts/bartel-chess-fonts/fselch8.mf b/fonts/bartel-chess-fonts/fselch8.mf new file mode 100644 index 0000000000..21312d1b4b --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch8.mf @@ -0,0 +1,26 @@ +%====================================================================== +% This is +% fselch8.mf +% +% Copyright (C) 1989-93 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%====================================================================== +% +mode_setup; + +qs#:= 8pt#; +input fselch.mf; +end; diff --git a/fonts/bartel-chess-fonts/fselch8.tfm b/fonts/bartel-chess-fonts/fselch8.tfm Binary files differnew file mode 100644 index 0000000000..64d0b14b46 --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch8.tfm diff --git a/fonts/bartel-chess-fonts/fselch9.mf b/fonts/bartel-chess-fonts/fselch9.mf new file mode 100644 index 0000000000..7877b87d72 --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch9.mf @@ -0,0 +1,27 @@ +%====================================================================== +% This is +% fselch9.mf +% +% Copyright (C) 1989-93 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%====================================================================== +% +mode_setup; + +qs#:= 9pt#; +numeric HatchLinePart; HatchLinePart=7; +input fselch.mf; +end; diff --git a/fonts/bartel-chess-fonts/fselch9.tfm b/fonts/bartel-chess-fonts/fselch9.tfm Binary files differnew file mode 100644 index 0000000000..3c9d5d3157 --- /dev/null +++ b/fonts/bartel-chess-fonts/fselch9.tfm diff --git a/fonts/bartel-chess-fonts/other-sources/CGA.mf b/fonts/bartel-chess-fonts/other-sources/CGA.mf new file mode 100644 index 0000000000..5a88287418 --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/CGA.mf @@ -0,0 +1,10 @@ +% 10pt should give 22 pixel +% Defintions for the special agfa mode +proofing:= 0; +fontmaking:= 1; +tracingtitles:= 1; +aspect_ratio:= 1; +pixels_per_inch:= 25*72/10; +blacker:= .2; +fillin:= .1; +o_correction:= 1; diff --git a/fonts/bartel-chess-fonts/other-sources/agfa.mf b/fonts/bartel-chess-fonts/other-sources/agfa.mf new file mode 100644 index 0000000000..fb3575383b --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/agfa.mf @@ -0,0 +1,8 @@ +% Defintions for the special agfa mode +proofing:= 0; +fontmaking:= 1; +tracingtitles:= 1; +pixels_per_inch:= 400; +blacker:= .2; +fillin:= .1; +o_correction:= 1; diff --git a/fonts/bartel-chess-fonts/other-sources/amiga-PAL.mf b/fonts/bartel-chess-fonts/other-sources/amiga-PAL.mf new file mode 100644 index 0000000000..2d4e45b9e1 --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/amiga-PAL.mf @@ -0,0 +1,10 @@ +% 10pt should give 25 pixel +% Defintions for the special CGA +proofing:= 0; +fontmaking:= 1; +tracingtitles:= 1; +aspect_ratio:= 1; +pixels_per_inch:= 25*72/10; +blacker:= .2; +fillin:= .1; +o_correction:= 1; diff --git a/fonts/bartel-chess-fonts/other-sources/amiga.mf b/fonts/bartel-chess-fonts/other-sources/amiga.mf new file mode 100644 index 0000000000..1674d30801 --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/amiga.mf @@ -0,0 +1,10 @@ +% 10pt should give 22 pixel +% Defintions for the special agfa mode +proofing:= 0; +fontmaking:= 1; +tracingtitles:= 1; +aspect_ratio:= 22/52; +pixels_per_inch:= 44*72/10; +blacker:= .2; +fillin:= .1; +o_correction:= 1; diff --git a/fonts/bartel-chess-fonts/other-sources/chess.mf b/fonts/bartel-chess-fonts/other-sources/chess.mf new file mode 100644 index 0000000000..7066ecf954 --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/chess.mf @@ -0,0 +1,92 @@ +%====================================================================== +% This is +% chess.mf +% +% Copyright (C) 19895 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%====================================================================== +% + +% This file is only for testing purposes +%mode_setup; +qs#:= 30pt#; + +%% +%% what follows is a testing version of +%% fselch.mf; + +% The following values should match the values given +% to the Xresources: +% mf*width: 700 +% mf*height: 700 +% +screen_rows:= 700; +screen_cols:= 700; + +def openit = openwindow currentwindow + from origin to (screen_rows, screen_cols) at (-20, qs+20) +enddef; + + +thin#=0.03qs#; +inner_thin# = .66thin#; +frame_thin# = 4thin#; + +SideSpace# = .11qs#; +BottomWidth# = qs# - 2SideSpace#; +BottomSpace# = .12qs#; +TopSpace# = .12qs#; + +%----------------------------------------------------------------------- +% Now define our pixels +define_whole_pixels(qs,thin,inner_thin,frame_thin); +define_pixels(SideSpace,BottomWidth,BottomSpace,TopSpace); + +%----------------------------------------------------------------------- +% defining our pens +pen chess_pen; chess_pen = pencircle scaled thin; +pen inner_pen; inner_pen = pencircle scaled inner_thin; +pen frame_pen; frame_pen = pencircle scaled frame_thin; +pickup chess_pen; + +%----------------------------------------------------------------------- +% get our base +input chbase.mf; + +%----------------------------------------------------------------------- +% now generate the figures +pickup chess_pen; input blackfield.mf; +%pickup chess_pen; input pawn.mf; +%pickup chess_pen; input knight.mf; +%Pickup chess_pen; input queen.mf; +%pickup chess_pen; input king.mf; +pickup chess_pen; input bishop.mf; +%pickup chess_pen; input rook.mf; +%pickup chess_pen; input geo.mf; +%pickup chess_pen; input equi.mf; + +%---------------------------------------------------------------------- +% Now the fontdimension parameters +font_normal_space qs#; +font_normal_stretch 0; +font_normal_shrink 0; +font_x_height qs#; +font_quad qs#; +font_extra_space 0; + + + +%end; diff --git a/fonts/bartel-chess-fonts/other-sources/fselch15.mf b/fonts/bartel-chess-fonts/other-sources/fselch15.mf new file mode 100644 index 0000000000..d9dad08961 --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/fselch15.mf @@ -0,0 +1,2 @@ +design_size := 15; +input b-fselch; diff --git a/fonts/bartel-chess-fonts/other-sources/fselch30.mf b/fonts/bartel-chess-fonts/other-sources/fselch30.mf new file mode 100644 index 0000000000..1a99868e14 --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/fselch30.mf @@ -0,0 +1,26 @@ +%====================================================================== +% This is +% fselch30.mf +% +% Copyright (C) 1989-93 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%====================================================================== +% +mode_setup; + +qs#:= 30pt#; +input fselch.mf; +end; diff --git a/fonts/bartel-chess-fonts/other-sources/fselch34.mf b/fonts/bartel-chess-fonts/other-sources/fselch34.mf new file mode 100644 index 0000000000..2450c29820 --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/fselch34.mf @@ -0,0 +1,26 @@ +%====================================================================== +% This is +% fselch34.mf +% +% Copyright (C) 1989-93 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%====================================================================== +% +mode_setup; + +qs#:= 34pt#; +input fselch.mf; +end; diff --git a/fonts/bartel-chess-fonts/other-sources/fselch5mm.mf b/fonts/bartel-chess-fonts/other-sources/fselch5mm.mf new file mode 100644 index 0000000000..6fa2eb0e76 --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/fselch5mm.mf @@ -0,0 +1,26 @@ +%====================================================================== +% This is +% fselch5mm.mf +% +% Copyright (C) 1989-93 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%====================================================================== +% +mode_setup; + +qs#:= 5mm#; +input fselch.mf; +end; diff --git a/fonts/bartel-chess-fonts/other-sources/pkelch.mfj b/fonts/bartel-chess-fonts/other-sources/pkelch.mfj new file mode 100644 index 0000000000..601b0978bb --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/pkelch.mfj @@ -0,0 +1,10 @@ +% +% pkelch.mfj +% +input[modes]; +{ + m; + base=plain; + mags=s0 sh s1; + fonts=pkelch8 pkelch9 pkelch10 pkelch11 pkelch12 pkelch14 pkelch16; +} diff --git a/fonts/bartel-chess-fonts/other-sources/pkfootbows.mf b/fonts/bartel-chess-fonts/other-sources/pkfootbows.mf new file mode 100644 index 0000000000..b23cad095a --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/pkfootbows.mf @@ -0,0 +1,83 @@ +% This is +% pkfootbows.mf +% +% Copyright (C) 1989-92 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +% +def DefineFootBows( + % This macro depends on the values of qs and BottomSpace + % and uses the makro ParallelPath. + expr BottomDist, %This is the space to BottomSpace + BowOneWidth, %This is the width of the main bow + FootHeight, %Distance from bottom of Bow0 to top of Bow3 + BowTwoLoc, %Relative location of Bow2 between Bow3 and + % Bow1. 0 means position at position at Bow1, + % 1.0 means position at Bow3. + WidthToHeight, %Ratio of BowOneWidth/2 to Bowheight + BowTwoLen, %Length of Bow2 relative to Bow1 + BowThreeLen %Lenght of Bow3 relative to Bow1 + ) = + + % All parameters are in pixels when not otherwise statet. + % Points are numbered from 0 to 3 from lower to upper + % Points to the left have suffix l, right suffix r + % points without further suffix are in the center of the bows + + path Bow[]; + numeric BowHeight; + numeric l[],x[]l,x[]r,x[],y[]l,y[]r,y[]; + + BowHeight = BowOneWidth*WidthToHeight/2; + + % We start with the first bow + x1r + x1l = qs; x1r - x1l = BowOneWidth; + y1 = BottomSpace + 2*BowHeight + BottomDist; + x1 = .5qs; + y1l = y1r = y1 - BowHeight; + Bow1 = z1l .. {right} z1 .. z1r; + + z0 = z1 shifted (down*2*BowHeight); + Bow0 = z1r .. {left} z0 .. z1l; + + Bow3= ParallelPath(Bow1,FootHeight-2*BowHeight); + l3 = length(Bow3); + cu:= (1-BowThreeLen)/2; + Bow3:= subpath (cu*l3,(1-cu)*l3) of Bow3; + z3l = point 0 of Bow3; + z3 = point .5*length(Bow3) of Bow3; + z3r = point infinity of Bow3; + + if proofing >0: + show point 0 of reverse Bow3; + show z3r; + fi; + + Bow2= ParallelPath(Bow1,(FootHeight-2*BowHeight)*BowTwoLoc); + l2 = length(Bow2); + cu:= (1-BowTwoLen)/2; + Bow2:= subpath (cu*l2,(1-cu)*l2) of Bow2; + z2l = point 0 of Bow2; + z2 = point .5length(Bow3) of Bow2; + z2r = point infinity of Bow2; + labels(1l,1,1r,2l,2r,3l,3r); +enddef; + +%DefineFootBows( .55qs, % BowOneWidth +% .25qs, % FootHeight +% .40, % BowTwoLoc +% .13, % WidthToHeight +% .90, % BowTwoLen +% .95); % BowThreeLen diff --git a/fonts/bartel-chess-fonts/other-sources/pkmakeneutral.mf b/fonts/bartel-chess-fonts/other-sources/pkmakeneutral.mf new file mode 100644 index 0000000000..6645cf573d --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/pkmakeneutral.mf @@ -0,0 +1,35 @@ +% This is +% pkmakeneutral.mf +% +% Copyright (C) 1989-92 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +% +def MakeNeutral(expr White,Black) = + if unknown LeftHalft: picture LeftHalf; fi + LeftHalf:= Black; + cull LeftHalf keeping (1,infinity); + addto LeftHalf contour (unitsquare yscaled qs xscaled (qs/2)); + cull LeftHalf keeping (2,2); + + if unknown RightHalf: picture RightHalf; fi + RightHalf:= White; + cull RightHalf keeping (1,infinity); + addto RightHalf contour + (unitsquare yscaled qs xscaled (qs/2) shifted (qs/2,0)); + cull RightHalf keeping (2,2); + NeutralMan:= LeftHalf; + addto NeutralMan also RightHalf; +enddef; diff --git a/fonts/bartel-chess-fonts/other-sources/pkparallel.mf b/fonts/bartel-chess-fonts/other-sources/pkparallel.mf new file mode 100644 index 0000000000..1b389e0863 --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/pkparallel.mf @@ -0,0 +1,36 @@ +% This is +% pkparallel.mf +% +% Copyright (C) 1989-92 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +% +def NewPoint(expr p,t,dist) = + { begingroup pair Dir; + Dir= direction t of p; %show p; show t; show Dir; + Dir + endgroup } + (point t of p + (Dir rotated 90)*(dist/length(Dir))) +enddef; +def ParallelPath(expr p,dist) = + begingroup + save Dir; pair Dir; Dir = direction 0 of p; + + ((point 0 of p)+(Dir rotated 90)*(dist/length(Dir))) {Dir} + for t=.5 step .5 until length(p): + .. NewPoint(p,t,dist) + endfor + endgroup +enddef; diff --git a/fonts/bartel-chess-fonts/other-sources/pkscreengrid.mf b/fonts/bartel-chess-fonts/other-sources/pkscreengrid.mf new file mode 100644 index 0000000000..c158cd3448 --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/pkscreengrid.mf @@ -0,0 +1,27 @@ +% This is +% pkscreengrid.mf +% +% Copyright (C) 1989-92 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +% + + +vardef ScreenGrid(text xlist,ylist) = + xmin:= min(xlist); xmax:= max(xlist); + ymin:= min(ylist); ymax:= max(ylist); + for x=xlist: screenrule((x,ymin),(x,ymax)); endfor + for y=ylist: screenrule((xmin,y),(xmax,y)); endfor +enddef; diff --git a/fonts/bartel-chess-fonts/other-sources/pkshorten.mf b/fonts/bartel-chess-fonts/other-sources/pkshorten.mf new file mode 100644 index 0000000000..06cc736d29 --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/pkshorten.mf @@ -0,0 +1,75 @@ +% This is +% pkshorten.mf +% +% Copyright (C) 1989-92 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +% + + +def Perpend(expr d,p,real) = + begingroup + save dd; pair dd; + dd = d/length(d); + (p+100*(dd rotated 90) -- p+100*(dd rotated -90)) shifted (dd*real) + endgroup; +enddef; +def ShortenPath(expr p,real) = + begingroup + save pa,pe; path pa,pe; + pa = Perpend(direction 0 of p,point 0 of p,real); + pe = Perpend(-direction length(p) of p,point length(p) of p,real); + subpath ( + xpart(p intersectiontimes pa), + xpart(p intersectiontimes pe)) of p + endgroup +enddef; +def ShortenBegin(expr p,real) = + begingroup + save pa; path pa; + pa = Perpend(direction 0 of p,point 0 of p,real); + subpath (xpart(p intersectiontimes pa),length(p)) of p + endgroup +enddef; +def ShortenEnd(expr p,real) = + begingroup + save pe; path pe; + pe = Perpend(-direction length(p) of p,point length(p) of p,real); + subpath (0, xpart(p intersectiontimes pe)) of p + endgroup +enddef; +def LengthenBegin(expr p,real) = + begingroup + save dd; pair dd; + dd= direction 0 of p; dd:= dd/length(dd); + point 0 of p - real*dd -- p + endgroup +enddef; +def LengthenEnd(expr p,real) = + begingroup + save dd; pair dd; + dd= direction length(p) of p; dd:= dd/length(dd); + p -- point length(p) of p + real*dd + endgroup +enddef; +def Lengthen(expr p,real) = + begingroup + save db; pair db; + save de; pair de; + db= direction 0 of p; db:= db/length(db); + de= direction length(p) of p; de:= de/length(de); + point 0 of p - real*db -- p -- point length(p) of p + real*de + endgroup +enddef; diff --git a/fonts/bartel-chess-fonts/other-sources/px150.mf b/fonts/bartel-chess-fonts/other-sources/px150.mf new file mode 100644 index 0000000000..166955cd26 --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/px150.mf @@ -0,0 +1,9 @@ +% 10pt should give 150 pixel +proofing:= 0; +fontmaking:= 1; +tracingtitles:= 1; +aspect_ratio:= 1; +pixels_per_inch:= 150*72/10; +blacker:= .2; +fillin:= .1; +o_correction:= 1; diff --git a/fonts/bartel-chess-fonts/other-sources/px17.mf b/fonts/bartel-chess-fonts/other-sources/px17.mf new file mode 100644 index 0000000000..8e0fc3207f --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/px17.mf @@ -0,0 +1,9 @@ +% 10pt should give 17 pixel +proofing:= 0; +fontmaking:= 1; +tracingtitles:= 1; +aspect_ratio:= 1; +pixels_per_inch:= 17*72/10; +blacker:= .2; +fillin:= .1; +o_correction:= 1; diff --git a/fonts/bartel-chess-fonts/other-sources/px20.mf b/fonts/bartel-chess-fonts/other-sources/px20.mf new file mode 100644 index 0000000000..dfda97846b --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/px20.mf @@ -0,0 +1,10 @@ +% 10pt should give 20 pixel +% Defintions for the special CGA +proofing:= 0; +fontmaking:= 1; +tracingtitles:= 1; +aspect_ratio:= 1; +pixels_per_inch:= 20*72/10; +blacker:= .2; +fillin:= .1; +o_correction:= 1; diff --git a/fonts/bartel-chess-fonts/other-sources/px21.mf b/fonts/bartel-chess-fonts/other-sources/px21.mf new file mode 100644 index 0000000000..0669943624 --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/px21.mf @@ -0,0 +1,10 @@ +% 10pt should give 21 pixel +% Defintions for the special CGA +proofing:= 0; +fontmaking:= 1; +tracingtitles:= 1; +aspect_ratio:= 1; +pixels_per_inch:= 21*72/10; +blacker:= .2; +fillin:= .1; +o_correction:= 1; diff --git a/fonts/bartel-chess-fonts/other-sources/px23.mf b/fonts/bartel-chess-fonts/other-sources/px23.mf new file mode 100644 index 0000000000..bc8d896e79 --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/px23.mf @@ -0,0 +1,10 @@ +% 10pt should give 23 pixel +% Defintions for the special CGA +proofing:= 0; +fontmaking:= 1; +tracingtitles:= 1; +aspect_ratio:= 1; +pixels_per_inch:= 23*72/10; +blacker:= .2; +fillin:= .1; +o_correction:= 1; diff --git a/fonts/bartel-chess-fonts/other-sources/px25.mf b/fonts/bartel-chess-fonts/other-sources/px25.mf new file mode 100644 index 0000000000..4fdee76102 --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/px25.mf @@ -0,0 +1,9 @@ +% 10pt should give 25 pixel +proofing:= 0; +fontmaking:= 1; +tracingtitles:= 1; +aspect_ratio:= 1; +pixels_per_inch:= 25*72/10; +blacker:= .2; +fillin:= .1; +o_correction:= 1; diff --git a/fonts/bartel-chess-fonts/other-sources/px29.mf b/fonts/bartel-chess-fonts/other-sources/px29.mf new file mode 100644 index 0000000000..09217f54fc --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/px29.mf @@ -0,0 +1,10 @@ +% 10pt should give 29 pixel +% Defintions for the special CGA +proofing:= 0; +fontmaking:= 1; +tracingtitles:= 1; +aspect_ratio:= 1; +pixels_per_inch:= 29*72/10; +blacker:= .2; +fillin:= .1; +o_correction:= 1; diff --git a/fonts/bartel-chess-fonts/other-sources/px31.mf b/fonts/bartel-chess-fonts/other-sources/px31.mf new file mode 100644 index 0000000000..32ec37d59d --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/px31.mf @@ -0,0 +1,10 @@ +% 10pt should give 31 pixel +% Defintions for the special CGA +proofing:= 0; +fontmaking:= 1; +tracingtitles:= 1; +aspect_ratio:= 1; +pixels_per_inch:= 31*72/10; +blacker:= .2; +fillin:= .1; +o_correction:= 1; diff --git a/fonts/bartel-chess-fonts/other-sources/px33.mf b/fonts/bartel-chess-fonts/other-sources/px33.mf new file mode 100644 index 0000000000..9da3970865 --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/px33.mf @@ -0,0 +1,9 @@ +% 10pt should give 33 pixel +proofing:= 0; +fontmaking:= 1; +tracingtitles:= 1; +aspect_ratio:= 1; +pixels_per_inch:= 33*72/10; +blacker:= .2; +fillin:= .1; +o_correction:= 1; diff --git a/fonts/bartel-chess-fonts/other-sources/px41.mf b/fonts/bartel-chess-fonts/other-sources/px41.mf new file mode 100644 index 0000000000..49b0d64fdf --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/px41.mf @@ -0,0 +1,9 @@ +% 10pt should give 41 pixel +proofing:= 0; +fontmaking:= 1; +tracingtitles:= 1; +aspect_ratio:= 1; +pixels_per_inch:= 41*72/10; +blacker:= .2; +fillin:= .1; +o_correction:= 1; diff --git a/fonts/bartel-chess-fonts/other-sources/px45.mf b/fonts/bartel-chess-fonts/other-sources/px45.mf new file mode 100644 index 0000000000..71ee097a82 --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/px45.mf @@ -0,0 +1,9 @@ +% 10pt should give 45 pixel +proofing:= 0; +fontmaking:= 1; +tracingtitles:= 1; +aspect_ratio:= 1; +pixels_per_inch:= 45*72/10; +blacker:= .2; +fillin:= .1; +o_correction:= 1; diff --git a/fonts/bartel-chess-fonts/other-sources/px49.mf b/fonts/bartel-chess-fonts/other-sources/px49.mf new file mode 100644 index 0000000000..f8d0d85988 --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/px49.mf @@ -0,0 +1,9 @@ +% 10pt should give 49 pixel +proofing:= 0; +fontmaking:= 1; +tracingtitles:= 1; +aspect_ratio:= 1; +pixels_per_inch:= 49*72/10; +blacker:= .2; +fillin:= .1; +o_correction:= 1; diff --git a/fonts/bartel-chess-fonts/other-sources/px53.mf b/fonts/bartel-chess-fonts/other-sources/px53.mf new file mode 100644 index 0000000000..8bf1753b9a --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/px53.mf @@ -0,0 +1,9 @@ +% 10pt should give 53 pixel +proofing:= 0; +fontmaking:= 1; +tracingtitles:= 1; +aspect_ratio:= 1; +pixels_per_inch:= 53*72/10; +blacker:= .2; +fillin:= .1; +o_correction:= 1; diff --git a/fonts/bartel-chess-fonts/other-sources/px57.mf b/fonts/bartel-chess-fonts/other-sources/px57.mf new file mode 100644 index 0000000000..ba9c4a6456 --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/px57.mf @@ -0,0 +1,9 @@ +% 10pt should give 57 pixel +proofing:= 0; +fontmaking:= 1; +tracingtitles:= 1; +aspect_ratio:= 1; +pixels_per_inch:= 57*72/10; +blacker:= .2; +fillin:= .1; +o_correction:= 1; diff --git a/fonts/bartel-chess-fonts/other-sources/px63.mf b/fonts/bartel-chess-fonts/other-sources/px63.mf new file mode 100644 index 0000000000..87cc06eac2 --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/px63.mf @@ -0,0 +1,9 @@ +% 10pt should give 63 pixel +proofing:= 0; +fontmaking:= 1; +tracingtitles:= 1; +aspect_ratio:= 1; +pixels_per_inch:= 63*72/10; +blacker:= .2; +fillin:= .1; +o_correction:= 1; diff --git a/fonts/bartel-chess-fonts/other-sources/px700.mf b/fonts/bartel-chess-fonts/other-sources/px700.mf new file mode 100644 index 0000000000..d28d1c7327 --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/px700.mf @@ -0,0 +1,9 @@ +% 10pt should give 33 pixel +proofing:= 0; +fontmaking:= 1; +tracingtitles:= 1; +aspect_ratio:= 1; +pixels_per_inch:= 700*72/10; +blacker:= .2; +fillin:= .1; +o_correction:= 1; diff --git a/fonts/bartel-chess-fonts/other-sources/px71.mf b/fonts/bartel-chess-fonts/other-sources/px71.mf new file mode 100644 index 0000000000..ed19859792 --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/px71.mf @@ -0,0 +1,9 @@ +% 10pt should give 71 pixel +proofing:= 0; +fontmaking:= 1; +tracingtitles:= 1; +aspect_ratio:= 1; +pixels_per_inch:= 71*72/10; +blacker:= .2; +fillin:= .1; +o_correction:= 1; diff --git a/fonts/bartel-chess-fonts/other-sources/px72.mf b/fonts/bartel-chess-fonts/other-sources/px72.mf new file mode 100644 index 0000000000..14273b2daf --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/px72.mf @@ -0,0 +1,9 @@ +% 10pt should give 72 pixel +proofing:= 0; +fontmaking:= 1; +tracingtitles:= 1; +aspect_ratio:= 1; +pixels_per_inch:= 72*72/10; +blacker:= .2; +fillin:= .1; +o_correction:= 1; diff --git a/fonts/bartel-chess-fonts/other-sources/px79.mf b/fonts/bartel-chess-fonts/other-sources/px79.mf new file mode 100644 index 0000000000..f3d71eb0e2 --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/px79.mf @@ -0,0 +1,9 @@ +% 10pt should give 79 pixel +proofing:= 0; +fontmaking:= 1; +tracingtitles:= 1; +aspect_ratio:= 1; +pixels_per_inch:= 79*72/10; +blacker:= .2; +fillin:= .1; +o_correction:= 1; diff --git a/fonts/bartel-chess-fonts/other-sources/px9.mf b/fonts/bartel-chess-fonts/other-sources/px9.mf new file mode 100644 index 0000000000..b5526de85e --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/px9.mf @@ -0,0 +1,9 @@ +% 10pt should give 9 pixel +proofing:= 0; +fontmaking:= 1; +tracingtitles:= 1; +aspect_ratio:= 1; +pixels_per_inch:= 9*72/10; +blacker:= .2; +fillin:= .1; +o_correction:= 1; diff --git a/fonts/bartel-chess-fonts/other-sources/scan.mf b/fonts/bartel-chess-fonts/other-sources/scan.mf new file mode 100644 index 0000000000..3b2b8eca5e --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/scan.mf @@ -0,0 +1,8 @@ +% Defintions for the special agfa mode +proofing:= 0; +fontmaking:= 1; +tracingtitles:= 1; +pixels_per_inch:= 791; +blacker:= .2; +fillin:= .1; +o_correction:= 1; diff --git a/fonts/bartel-chess-fonts/other-sources/screengrid.mf b/fonts/bartel-chess-fonts/other-sources/screengrid.mf new file mode 100644 index 0000000000..c55f2c8363 --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/screengrid.mf @@ -0,0 +1,27 @@ +% This is +% screengrid.mf +% +% Copyright (C) 1989-92 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +% + + +vardef ScreenGrid(text xlist,ylist) = + xmin:= min(xlist); xmax:= max(xlist); + ymin:= min(ylist); ymax:= max(ylist); + for x=xlist: screenrule((x,ymin),(x,ymax)); endfor + for y=ylist: screenrule((xmin,y),(xmax,y)); endfor +enddef; diff --git a/fonts/bartel-chess-fonts/other-sources/tt.mf b/fonts/bartel-chess-fonts/other-sources/tt.mf new file mode 100644 index 0000000000..326cb3a920 --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/tt.mf @@ -0,0 +1,69 @@ +def OneCurl (expr a,da, b,db, above, pangle) = + begingroup + save dx, dy, p; + pair dx; dx= b-a; + pair dy; dy= dx rotated 90; + pair p; p= (a+.5dx+above*dy); + a{da} .. {dx rotated pangle}p & + p{dx rotated -pangle} .. {db}b + endgroup +enddef; + +def CurlIt(expr tp, % the path + n, % how often + above, % the peak above the path + pangle % the direction at the peak + ) = + + begingroup + save dl; pair dl[]; + save dr; pair dr[]; + save i,l,r,ll,rr,delta; + numeric i,l,r,delta + + i= 0; + l= 0; + r= length(tp); + delta= length(tp)/n; + forever: + if i = n-i: + z0l[i] = z0r[i] = point .5length(tp) of tp; + dl[i] = dr[i] = direction .5length(tp) of tp; + else: + numeric ll; + if i=0: ll = l else: ll = l-(n-i)*.06delta fi; + z0l[i] = good.lft (point ll of tp); + dl[i] = direction ll of tp; + numeric rr; + if i=0: rr = r else: rr = r+(n-i)*.06delta fi; + z0r[i] = good.rt (point rr of tp); + dr[i] = direction rr of tp; + fi + exitif r-l < eps; + i:= incr i; + l:= l+delta; + r:= r-delta; + endfor; + for i:= incr i step 1 until n: + z0l[i] = z0r[n-i]; + z0r[i] = z0l[n-i]; + dl[i] = dr[n-i]; + dr[i] = dl[n-i]; + endfor; + + OneCurl(z0l0, dl0, z0l1, dl1, above, pangle) + for i:= 2 step 1 until n: + & OneCurl(z0l[i-1], dl[i-1], z0l[i], dl[i], above, pangle) + endfor + endgroup +enddef; + +z0l = (10,10); +z0r = (200, 10); +z0 = .5[z0l,z0r] shifted 30up; + +draw CurlIt(z0l .. z0 .. z0r, 5, 0.1, 30); +undraw(z0l3); +showit; + +:map q :w:!mf diff --git a/fonts/bartel-chess-fonts/other-sources/turnboard.mf b/fonts/bartel-chess-fonts/other-sources/turnboard.mf new file mode 100644 index 0000000000..b19a37f816 --- /dev/null +++ b/fonts/bartel-chess-fonts/other-sources/turnboard.mf @@ -0,0 +1,55 @@ +% This is turnboard.mf +% +% This file contains only the definition of one charachter +% which can be used to show, that you want to turn the board +% +mode_setup; +% +% Define the size of the character +% +qs#:=12pt#; +% +% +define_pixels(qs); +beginchar(0,1qs#,1qs#,0); +pickup pencircle scaled 1/32qs; +% +% Define some points of the character +% +% This are the points for the 3/4 circle +% +z1=(1/8qs,1/8qs); +z2=(1/8qs,7/8qs); +z3=(7/8qs,7/8qs); +z4=(7/8qs,1/8qs); +% +% Tip of the circled arrow +% +z5=(13/16qs,1/16qs); +z6=(7/8qs,2/8qs); +z7=(1qs,1/8qs); +% +% A small chessboard inside the arrow +% +z8=(1/4qs,1/4qs); +z9=(1/4qs,1/2qs); +z10=(1/4qs,3/4qs); +z11=(1/2qs,1/4qs); +z12=(1/2qs,1/2qs); +z13=(1/2qs,3/4qs); +z14=(3/4qs,1/4qs); +z15=(3/4qs,1/2qs); +z16=(3/4qs,3/4qs); +% +% Show the 3/4 circled arrow around the board +% +draw z1{-1,1}..{1,1}z2{1,1}..{1,-1}z3{1,-1}..{-1,-1}z4; +fill z5--z6--z7--cycle; +draw z8--z10--z16--z14--cycle; +fill z8--z9--z12--z11--cycle; +fill z12--z13--z16--z15--cycle; +endchar; +% +% Thats all +% +end; diff --git a/fonts/bartel-chess-fonts/pkbase.mf b/fonts/bartel-chess-fonts/pkbase.mf new file mode 100644 index 0000000000..25df734e65 --- /dev/null +++ b/fonts/bartel-chess-fonts/pkbase.mf @@ -0,0 +1,228 @@ +% This is +% pkbase.mf +% +% Copyright (C) 1989-92 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +% +% correcting the size of qs to make it a good pixelcount +if .5qs <> good.x .5qs: + qs:= qs if qs# * hppp > round(qs): + else: - fi 1; +fi + +% the center of the field +pair Center; Center = (qs/2,qs/2); + +picture BlackMan, WhiteMan, NeutralMan, OuterShape; + +% Some definitions for numbering the characters +% +% Numbers of the pieces +Pawn = 0; Knight = 1; Bishop = 2; Rook = 3; Queen = 4; King = 5; +% Geometric pieces +Circle = 145; +% Offsets for colors of the pieces +White = 0; Neutral = 6; Black = 12; +% Offsets for the background +OnWhite = 0; OnBlack = 18; +% Offsets for the turning +LeftTurned = 36; RightTurned = 72; UpSideDown = 108; + +% Makros for turning +def TurnLeft(expr p) = + p rotatedaround (Center,90); +enddef; + +def TurnRight(expr p) = + p rotatedaround (Center,-90); +enddef; + +def TurnUpSideDown(expr p) = + p rotatedaround (Center,180); +enddef; + +% +% Macros for shorten and lengthening paths +% +% ShortenPath: The given path is shorted at both ends, with the +% real amount of pixels given +% ShortenBegin, ShortenEnd: The same as above for one end only +% LengthenPath: The path is elongated at both ends with a straight +% line, in the direction of the path at the end +% LengthenBegin, LengthenEnd: The same as above for one end only +% +def Perpend(expr d,p,real) = + begingroup + save dd; pair dd; + dd = d/length(d); + (p+100*(dd rotated 90) -- p+100*(dd rotated -90)) shifted (dd*real) + endgroup; +enddef; +def ShortenPath(expr p,real) = + begingroup + save pa,pe; path pa,pe; + pa = Perpend(direction 0 of p,point 0 of p,real); + pe = Perpend(-direction length(p) of p,point length(p) of p,real); + subpath ( + xpart(p intersectiontimes pa), + xpart(p intersectiontimes pe)) of p + endgroup +enddef; +def ShortenBegin(expr p,real) = + begingroup + save pa; path pa; + pa = Perpend(direction 0 of p,point 0 of p,real); + subpath (xpart(p intersectiontimes pa),length(p)) of p + endgroup +enddef; +def ShortenEnd(expr p,real) = + begingroup + save pe; path pe; + pe = Perpend(-direction length(p) of p,point length(p) of p,real); + subpath (0, xpart(p intersectiontimes pe)) of p + endgroup +enddef; +def LengthenBegin(expr p,real) = + begingroup + save dd; pair dd; + dd= direction 0 of p; dd:= dd/length(dd); + point 0 of p - real*dd -- p + endgroup +enddef; +def LengthenEnd(expr p,real) = + begingroup + save dd; pair dd; + dd= direction length(p) of p; dd:= dd/length(dd); + p -- point length(p) of p + real*dd + endgroup +enddef; +def Lengthen(expr p,real) = + begingroup + save db; pair db; + save de; pair de; + db= direction 0 of p; db:= db/length(db); + de= direction length(p) of p; de:= de/length(de); + point 0 of p - real*db -- p -- point length(p) of p + real*de + endgroup +enddef; +% +% This macro is used bye ParallelPath +% +def NewPoint(expr p,t,dist) = + { begingroup pair Dir; + Dir= direction t of p; %show p; show t; show Dir; + Dir + endgroup } + (point t of p + (Dir rotated 90)*(dist/length(Dir))) +enddef; + +% Macro for getting a path parallel to the given path, in distance dist +% +def ParallelPath(expr p,dist) = + begingroup + save Dir; pair Dir; Dir = direction 0 of p; + + ((point 0 of p)+(Dir rotated 90)*(dist/length(Dir))) {Dir} + for t=.5 step .5 until length(p): + .. NewPoint(p,t,dist) + endfor + endgroup +enddef; + +def DefineFootBows( + % This macro depends on the values of qs and BottomSpace + % and uses the makro ParallelPath. + % It is used to generate the bottom bows of King, Queen and Bishop + expr BottomDist, %This is the space to BottomSpace + BowOneWidth, %This is the width of the main bow + FootHeight, %Distance from bottom of Bow0 to top of Bow3 + BowTwoLoc, %Relative location of Bow2 between Bow3 and + % Bow1. 0 means position at position at Bow1, + % 1.0 means position at Bow3. + WidthToHeight, %Ratio of BowOneWidth/2 to Bowheight + BowTwoLen, %Length of Bow2 relative to Bow1 + BowThreeLen %Lenght of Bow3 relative to Bow1 + ) = + + % All parameters are in pixels when not otherwise statet. + % Points are numbered from 0 to 3 from lower to upper + % Points to the left have suffix l, right suffix r + % points without further suffix are in the center of the bows + + path Bow[]; + numeric BowHeight; + numeric l[],x[]l,x[]r,x[],y[]l,y[]r,y[]; + + BowHeight = BowOneWidth*WidthToHeight/2; + + % We start with the first bow + x1r + x1l = qs; x1r - x1l = BowOneWidth; + y1 = BottomSpace + 2*BowHeight + BottomDist; + x1 = .5qs; + y1l = y1r = y1 - BowHeight; + Bow1 = z1l .. {right} z1 .. z1r; + + z0 = z1 shifted (down*2*BowHeight); + Bow0 = z1r .. {left} z0 .. z1l; + + Bow3= ParallelPath(Bow1,FootHeight-2*BowHeight); + l3 = length(Bow3); + cu:= (1-BowThreeLen)/2; + Bow3:= subpath (cu*l3,(1-cu)*l3) of Bow3; + z3l = point 0 of Bow3; + z3 = point .5*length(Bow3) of Bow3; + z3r = point infinity of Bow3; + +%show point 0 of reverse Bow3; +%show z3r; + + Bow2= ParallelPath(Bow1,(FootHeight-2*BowHeight)*BowTwoLoc); + l2 = length(Bow2); + cu:= (1-BowTwoLen)/2; + Bow2:= subpath (cu*l2,(1-cu)*l2) of Bow2; + z2l = point 0 of Bow2; + z2 = point .5length(Bow3) of Bow2; + z2r = point infinity of Bow2; + labels(1l,1,1r,2l,2r,3l,3r); +enddef; +% +% Macro for generation the neutral piece from two pictures +% given as Parameter +def MakeNeutral(expr White,Black) = + if unknown LeftHalft: picture LeftHalf; fi + LeftHalf:= Black; + cull LeftHalf keeping (1,infinity); + addto LeftHalf contour (unitsquare yscaled qs xscaled (qs/2)); + cull LeftHalf keeping (2,2); + + if unknown RightHalf: picture RightHalf; fi + RightHalf:= White; + cull RightHalf keeping (1,infinity); + addto RightHalf contour (unitsquare yscaled qs xscaled (qs/2) shifted (qs/2,0)); + cull RightHalf keeping (2,2); + NeutralMan:= LeftHalf; + addto NeutralMan also RightHalf; +enddef; +% +% Makro to get a grid of real output pixels when proofing +def PixelGrid(expr PixPerInch, w) = + if proofing > 0: + begingroup + numeric d; + d = pixels_per_inch/PixPerInch; + makegrid(0,for i=d step d until w: ,i endfor)(0,for i=d step d until w: ,i endfor) + endgroup; + fi; +enddef; diff --git a/fonts/bartel-chess-fonts/pkbishop.mf b/fonts/bartel-chess-fonts/pkbishop.mf new file mode 100644 index 0000000000..8aa99fa922 --- /dev/null +++ b/fonts/bartel-chess-fonts/pkbishop.mf @@ -0,0 +1,298 @@ +% This is +% pkbishop.mf +% +% Copyright (C) 1989-92 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +% +def slope(expr orig,middle,far,wd,angle) = + begingroup + save x, y, p; + path p.l,p.r; + pair inter; + + z0r= orig; + z1r= middle; + z2= far; + penpos0(wd,90+angle); + penpos1(wd,90); + penpos2(wd,90+angle); + forsuffixes e=l,r: + p.e:= z2e{dir angle}.. z1e{right} .. {dir angle}z0e; + endfor; + inter = p.l intersectiontimes p.l reflectedabout (orig,orig+up); + reverse p.r -- + subpath (0,xpart inter) of p.l .. + reverse subpath (0,xpart inter) of p.l + reflectedabout (orig,orig+up) -- + p.r reflectedabout (orig,orig+up) + endgroup +enddef; + +def MakeBishopPath = + + numeric TopDiameter; + TopDiameter = .08qs; + DefineFootBows( .10qs, % Distance to BottomSpace + .44qs, % BowOneWidth + .20qs, % FootHeight + .40, % BowTwoLoc + .13, % WidthToHeight + .88, % BowTwoLen + .80); % BowThreeLen + x4l + x4r = qs; + x4r - x4l = .60qs; + x4 = x3; + y4l = y4r = y4 = y3 + .15qs; % Sides of the shape with + % vertical tangents + + x5 = x4; + top (y5 + TopDiameter) = qs - TopSpace; + + pair TopDir.l, TopDir.r; + TopDir.l = dir 45; + TopDir.r = (xpart TopDir.l, -ypart TopDir.l); + + numeric TopDiameter; + TopDiameter = .08qs; + + path LeftShape,RightShape,BishopPath; + LeftShape = z1l .. z2l .. z3l .. {up}z4l .. {TopDir.l}z5; + RightShape= z5{TopDir.r} .. z4r{down} .. z3r .. z2r .. z1r; + BishopPath = LeftShape & RightShape & Bow0 & cycle; + + path Peak; + Peak:= fullcircle scaled TopDiameter + shifted (z5+.5TopDiameter*up); + + path CrossV,CrossH; + + z7= .2[z3,z5]; + z8= .7[z3,z5]; + CrossV:= z7 .. z8; + CrossH= CrossV rotatedaround (.5[z7,z8],90); + + path Slope; + numeric angle; + + angle= 60; + x12 = SideSpace; + y12 = BottomSpace; + z11 = .5[z12,z10]; + z10 = z0; + Slope= slope(z10,z11,z12,1.2thin,50) .. cycle; + +enddef; + +def MakeWhiteBishop = + pickup chess_pen; + clearit; + draw BishopPath; + forsuffixes $=1,2,3: draw Bow$; endfor + draw Peak; + draw CrossV; + draw CrossH; + pickup inner_pen; + draw Slope; + WhiteMan:= currentpicture; +enddef; + +def MakeBlackBishop = + pickup chess_pen; + clearit; + filldraw BishopPath; + forsuffixes $=1,2,3: undraw ShortenPath(Bow$,1.2thin); endfor + undraw ShortenPath(ParallelPath(LeftShape,-thin),thin); + undraw ShortenPath(ParallelPath(RightShape,-thin),thin); + filldraw Peak; + undraw CrossV; + undraw CrossH; + pickup inner_pen; + filldraw Slope; + BlackMan:= currentpicture; +enddef; + +def MakeOuterShape = + clearit; + pickup frame_pen; + filldraw BishopPath; + filldraw Peak; + filldraw Slope; + cullit; + OuterShape:= currentpicture; +enddef; + +MakeBishopPath; +MakeWhiteBishop; +MakeBlackBishop; +MakeNeutral(WhiteMan,BlackMan); +MakeOuterShape; + +%----------------------------------------------------------------------- +beginchar(Bishop+White+OnWhite, qs#, qs#, 0); + "White bishop on white field"; + currentpicture:= WhiteMan; +endchar; + +beginchar(Bishop+White+OnWhite+LeftTurned, qs#, qs#, 0); + "White bishop on white field rotated to the left"; + currentpicture:= TurnLeft(WhiteMan); +endchar; + +beginchar(Bishop+White+OnWhite+RightTurned, qs#, qs#, 0); + "White bishop on white field rotated to the right"; + currentpicture:= TurnRight(WhiteMan); +endchar; + +beginchar(Bishop+White+OnWhite+UpSideDown, qs#, qs#, 0); + "White bishop on white field upside down"; + currentpicture:= TurnUpSideDown(WhiteMan); +endchar; + +beginchar(Bishop+Black+OnWhite, qs#, qs#, 0); + "Black bishop on white field"; + currentpicture:= BlackMan; +endchar; + +beginchar(Bishop+Black+OnWhite+LeftTurned, qs#, qs#, 0); + "Black bishop on white field rotated to the left"; + currentpicture:= TurnLeft(BlackMan); +endchar; + +beginchar(Bishop+Black+OnWhite+RightTurned, qs#, qs#, 0); + "Black bishop on white field rotated to the right"; + currentpicture:= TurnRight(BlackMan); +endchar; + +beginchar(Bishop+Black+OnWhite+UpSideDown, qs#, qs#, 0); + "Black bishop on white field upside down"; + currentpicture:= TurnUpSideDown(BlackMan); +endchar; + +beginchar(Bishop+Neutral+OnWhite, qs#, qs#, 0); + "Neutral bishop on white field"; + currentpicture:= NeutralMan; +endchar; + +beginchar(Bishop+Neutral+OnWhite+LeftTurned, qs#, qs#, 0); + "Neutral bishop on white field rotated to the left"; + currentpicture:= TurnLeft(NeutralMan); +endchar; + +beginchar(Bishop+Neutral+OnWhite+RightTurned, qs#, qs#, 0); + "Neutral bishop on white field rotated to the right"; + currentpicture:= TurnRight(NeutralMan); +endchar; + +beginchar(Bishop+Neutral+OnWhite+UpSideDown, qs#, qs#, 0); + "Neutral bishop on white field upside down"; + currentpicture:= TurnUpSideDown(NeutralMan); +endchar; + +beginchar(Bishop+White+OnBlack, qs#, qs#, 0); + "White bishop on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + WhiteMan; +endchar; + +beginchar(Bishop+White+OnBlack+LeftTurned, qs#, qs#, 0); + "White bishop on black field turned to the left"; + MakeBlackField; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(WhiteMan); +endchar; + +beginchar(Bishop+White+OnBlack+RightTurned, qs#, qs#, 0); + "White bishop on black field turned to the right"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(WhiteMan); +endchar; + +beginchar(Bishop+White+OnBlack+UpSideDown, qs#, qs#, 0); + "White bishop on black field upsidedown"; + MakeBlackField; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(WhiteMan); +endchar; + +beginchar(Bishop+Neutral+OnBlack, qs#, qs#, 0); + "Neutral bishop on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + NeutralMan; +endchar; + +beginchar(Bishop+Neutral+OnBlack+LeftTurned, qs#, qs#, 0); + "Neutral bishop on black field turned to the left"; + MakeBlackField; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(NeutralMan); +endchar; + +beginchar(Bishop+Neutral+OnBlack+RightTurned, qs#, qs#, 0); + "Neutral bishop on black field turned to the right"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(NeutralMan); +endchar; + +beginchar(Bishop+Neutral+OnBlack+UpSideDown, qs#, qs#, 0); + "Neutral bishop on black field upsidedown"; + MakeBlackField; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(NeutralMan); +endchar; + +beginchar(Bishop+Black+OnBlack, qs#, qs#, 0); + "Black bishop on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + BlackMan; +endchar; + +beginchar(Bishop+Black+OnBlack+LeftTurned, qs#, qs#, 0); + "Black bishop on black field turned to the left"; + MakeBlackField; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(BlackMan); +endchar; + +beginchar(Bishop+Black+OnBlack+RightTurned, qs#, qs#, 0); + "Black bishop on black field turned to the right"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(BlackMan); +endchar; + +beginchar(Bishop+Black+OnBlack+UpSideDown, qs#, qs#, 0); + "Black bishop on black field upsidedown"; + MakeBlackField; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(BlackMan); +endchar; diff --git a/fonts/bartel-chess-fonts/pkblackfield.mf b/fonts/bartel-chess-fonts/pkblackfield.mf new file mode 100644 index 0000000000..dd0fdc3768 --- /dev/null +++ b/fonts/bartel-chess-fonts/pkblackfield.mf @@ -0,0 +1,65 @@ +% This is +% pkblackfield.mf +% +% Copyright (C) 1989-92 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +% +def MakeBlackField = + + if unknown BlackField: + + pair ua[],ub[],la[],lb[],ul,lr,ma,mb; + + numeric n,part; + + n=7; part=6; + pickup pencircle scaled (qs/(part*n)); + bot lft ma = (0,0); + top rt mb = (w,w); + draw ma--mb; + + top lft ul = (0,h); + bot rt lr = (w,0); + + numeric xdelta,ydelta; + xdelta= floor((xpart(lr) - xpart(ma)) / n); + ydelta= floor((ypart(ul) - ypart(ma)) / n); + + for i=1 upto n: + lft ua[i] = (0,ypart(ma)+(i*ydelta)); + top ub[i] = (xpart(mb)-(i*xdelta),h); + draw ua[i]..ub[i]; + endfor; + + for i=1 upto n: + bot la[i] = (xpart(ma)+(i*xdelta),0); + rt lb[i] = (w,ypart(mb)-(i*ydelta)); + draw la[i]..lb[i]; + endfor; + + picture BlackField; + cullit; + BlackField:= currentpicture; + + else: + currentpicture:= BlackField; + fi; + +enddef; + +beginchar(144,qs#,qs#,0); "Empty black field"; + MakeBlackField; +endchar; diff --git a/fonts/bartel-chess-fonts/pkelch10.mf b/fonts/bartel-chess-fonts/pkelch10.mf new file mode 100644 index 0000000000..f11a03b593 --- /dev/null +++ b/fonts/bartel-chess-fonts/pkelch10.mf @@ -0,0 +1,85 @@ +% This is +% pkelch10.mf +% +% Copyright (C) 1989-92 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +% + +% mag=1.2; + +mode_def agfa = + proofing:= 0; + fontmaking:= 1; + tracingtitles:= 1; + pixels_per_inch:= 400; + blacker:= .2; + fillin:= .1; + o_correction:= 1; +enddef; + +%mode=agfa; +%mode=epsonfx; +%mode=hplaser; +mode_setup; + +qs#:= 10pt#; + +thin#=0.03qs#; +inner_thin# = .66thin#; +frame_thin# = 4thin#; + +SideSpace# = .11qs#; +BottomWidth# = qs# - 2SideSpace#; +BottomSpace# = .11qs#; +TopSpace# = .11qs#; + +%----------------------------------------------------------------------- +% Now define our pixels +define_whole_pixels(qs,thin,inner_thin,frame_thin); +define_pixels(SideSpace,BottomWidth,BottomSpace,TopSpace); + +%----------------------------------------------------------------------- +% defining our pens +pen chess_pen; chess_pen = pencircle scaled thin; +pen inner_pen; inner_pen = pencircle scaled inner_thin; +pen frame_pen; frame_pen = pencircle scaled frame_thin; +pickup chess_pen; + +%----------------------------------------------------------------------- +% get our base +input pkbase.mf; + +%----------------------------------------------------------------------- +% now generate the figures +pickup chess_pen; input pkblackfield.mf; +pickup chess_pen; input pkpawn.mf; +pickup chess_pen; input pkknight.mf; +pickup chess_pen; input pkqueen.mf; +pickup chess_pen; input pkking.mf; +pickup chess_pen; input pkbishop.mf; +pickup chess_pen; input pkrook.mf; +pickup chess_pen; input pkgeo.mf; + +%---------------------------------------------------------------------- +% Now the fontdimension parameters +font_normal_space qs#; +font_normal_stretch 0; +font_normal_shrink 0; +font_x_height qs#; +font_quad qs#; +font_extra_space 0; + +end; diff --git a/fonts/bartel-chess-fonts/pkelch10.tfm b/fonts/bartel-chess-fonts/pkelch10.tfm Binary files differnew file mode 100644 index 0000000000..201d63d658 --- /dev/null +++ b/fonts/bartel-chess-fonts/pkelch10.tfm diff --git a/fonts/bartel-chess-fonts/pkelch11.mf b/fonts/bartel-chess-fonts/pkelch11.mf new file mode 100644 index 0000000000..cf437bd959 --- /dev/null +++ b/fonts/bartel-chess-fonts/pkelch11.mf @@ -0,0 +1,85 @@ +% This is +% pkelch11.mf +% +% Copyright (C) 1989-92 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +% + +% mag=1.2; + +mode_def agfa = + proofing:= 0; + fontmaking:= 1; + tracingtitles:= 1; + pixels_per_inch:= 400; + blacker:= .2; + fillin:= .1; + o_correction:= 1; +enddef; + +%mode=agfa; +%mode=epsonfx; +%mode=hplaser; +mode_setup; + +qs#:= 11pt#; + +thin#=0.03qs#; +inner_thin# = .66thin#; +frame_thin# = 4thin#; + +SideSpace# = .11qs#; +BottomWidth# = qs# - 2SideSpace#; +BottomSpace# = .11qs#; +TopSpace# = .11qs#; + +%----------------------------------------------------------------------- +% Now define our pixels +define_whole_pixels(qs,thin,inner_thin,frame_thin); +define_pixels(SideSpace,BottomWidth,BottomSpace,TopSpace); + +%----------------------------------------------------------------------- +% defining our pens +pen chess_pen; chess_pen = pencircle scaled thin; +pen inner_pen; inner_pen = pencircle scaled inner_thin; +pen frame_pen; frame_pen = pencircle scaled frame_thin; +pickup chess_pen; + +%----------------------------------------------------------------------- +% get our base +input pkbase.mf; + +%----------------------------------------------------------------------- +% now generate the figures +pickup chess_pen; input pkblackfield.mf; +pickup chess_pen; input pkpawn.mf; +pickup chess_pen; input pkknight.mf; +pickup chess_pen; input pkqueen.mf; +pickup chess_pen; input pkking.mf; +pickup chess_pen; input pkbishop.mf; +pickup chess_pen; input pkrook.mf; +pickup chess_pen; input pkgeo.mf; + +%---------------------------------------------------------------------- +% Now the fontdimension parameters +font_normal_space qs#; +font_normal_stretch 0; +font_normal_shrink 0; +font_x_height qs#; +font_quad qs#; +font_extra_space 0; + +end; diff --git a/fonts/bartel-chess-fonts/pkelch11.tfm b/fonts/bartel-chess-fonts/pkelch11.tfm Binary files differnew file mode 100644 index 0000000000..b35bad9d5b --- /dev/null +++ b/fonts/bartel-chess-fonts/pkelch11.tfm diff --git a/fonts/bartel-chess-fonts/pkelch12.mf b/fonts/bartel-chess-fonts/pkelch12.mf new file mode 100644 index 0000000000..1f0533561d --- /dev/null +++ b/fonts/bartel-chess-fonts/pkelch12.mf @@ -0,0 +1,85 @@ +% This is +% pkelch12.mf +% +% Copyright (C) 1989-92 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +% + +% mag=1.2; + +mode_def agfa = + proofing:= 0; + fontmaking:= 1; + tracingtitles:= 1; + pixels_per_inch:= 400; + blacker:= .2; + fillin:= .1; + o_correction:= 1; +enddef; + +%mode=agfa; +%mode=epsonfx; +%mode=hplaser; +mode_setup; + +qs#:= 12pt#; + +thin#=0.03qs#; +inner_thin# = .66thin#; +frame_thin# = 4thin#; + +SideSpace# = .11qs#; +BottomWidth# = qs# - 2SideSpace#; +BottomSpace# = .11qs#; +TopSpace# = .11qs#; + +%----------------------------------------------------------------------- +% Now define our pixels +define_whole_pixels(qs,thin,inner_thin,frame_thin); +define_pixels(SideSpace,BottomWidth,BottomSpace,TopSpace); + +%----------------------------------------------------------------------- +% defining our pens +pen chess_pen; chess_pen = pencircle scaled thin; +pen inner_pen; inner_pen = pencircle scaled inner_thin; +pen frame_pen; frame_pen = pencircle scaled frame_thin; +pickup chess_pen; + +%----------------------------------------------------------------------- +% get our base +input pkbase.mf; + +%----------------------------------------------------------------------- +% now generate the figures +pickup chess_pen; input pkblackfield.mf; +pickup chess_pen; input pkpawn.mf; +pickup chess_pen; input pkknight.mf; +pickup chess_pen; input pkqueen.mf; +pickup chess_pen; input pkking.mf; +pickup chess_pen; input pkbishop.mf; +pickup chess_pen; input pkrook.mf; +pickup chess_pen; input pkgeo.mf; + +%---------------------------------------------------------------------- +% Now the fontdimension parameters +font_normal_space qs#; +font_normal_stretch 0; +font_normal_shrink 0; +font_x_height qs#; +font_quad qs#; +font_extra_space 0; + +end; diff --git a/fonts/bartel-chess-fonts/pkelch12.tfm b/fonts/bartel-chess-fonts/pkelch12.tfm Binary files differnew file mode 100644 index 0000000000..49410683d6 --- /dev/null +++ b/fonts/bartel-chess-fonts/pkelch12.tfm diff --git a/fonts/bartel-chess-fonts/pkelch14.mf b/fonts/bartel-chess-fonts/pkelch14.mf new file mode 100644 index 0000000000..c34df55c63 --- /dev/null +++ b/fonts/bartel-chess-fonts/pkelch14.mf @@ -0,0 +1,85 @@ +% This is +% pkelch14.mf +% +% Copyright (C) 1989-92 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +% + +% mag=1.2; + +mode_def agfa = + proofing:= 0; + fontmaking:= 1; + tracingtitles:= 1; + pixels_per_inch:= 400; + blacker:= .2; + fillin:= .1; + o_correction:= 1; +enddef; + +%mode=agfa; +%mode=epsonfx; +%mode=hplaser; +mode_setup; + +qs#:= 14pt#; + +thin#=0.03qs#; +inner_thin# = .66thin#; +frame_thin# = 4thin#; + +SideSpace# = .11qs#; +BottomWidth# = qs# - 2SideSpace#; +BottomSpace# = .11qs#; +TopSpace# = .11qs#; + +%----------------------------------------------------------------------- +% Now define our pixels +define_whole_pixels(qs,thin,inner_thin,frame_thin); +define_pixels(SideSpace,BottomWidth,BottomSpace,TopSpace); + +%----------------------------------------------------------------------- +% defining our pens +pen chess_pen; chess_pen = pencircle scaled thin; +pen inner_pen; inner_pen = pencircle scaled inner_thin; +pen frame_pen; frame_pen = pencircle scaled frame_thin; +pickup chess_pen; + +%----------------------------------------------------------------------- +% get our base +input pkbase.mf; + +%----------------------------------------------------------------------- +% now generate the figures +pickup chess_pen; input pkblackfield.mf; +pickup chess_pen; input pkpawn.mf; +pickup chess_pen; input pkknight.mf; +pickup chess_pen; input pkqueen.mf; +pickup chess_pen; input pkking.mf; +pickup chess_pen; input pkbishop.mf; +pickup chess_pen; input pkrook.mf; +pickup chess_pen; input pkgeo.mf; + +%---------------------------------------------------------------------- +% Now the fontdimension parameters +font_normal_space qs#; +font_normal_stretch 0; +font_normal_shrink 0; +font_x_height qs#; +font_quad qs#; +font_extra_space 0; + +end; diff --git a/fonts/bartel-chess-fonts/pkelch14.tfm b/fonts/bartel-chess-fonts/pkelch14.tfm Binary files differnew file mode 100644 index 0000000000..2bafdd557d --- /dev/null +++ b/fonts/bartel-chess-fonts/pkelch14.tfm diff --git a/fonts/bartel-chess-fonts/pkelch16.mf b/fonts/bartel-chess-fonts/pkelch16.mf new file mode 100644 index 0000000000..ccf65918d1 --- /dev/null +++ b/fonts/bartel-chess-fonts/pkelch16.mf @@ -0,0 +1,85 @@ +% This is +% pkelch16.mf +% +% Copyright (C) 1989-92 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +% + +% mag=1.2; + +mode_def agfa = + proofing:= 0; + fontmaking:= 1; + tracingtitles:= 1; + pixels_per_inch:= 400; + blacker:= .2; + fillin:= .1; + o_correction:= 1; +enddef; + +%mode=agfa; +%mode=epsonfx; +%mode=hplaser; +mode_setup; + +qs#:= 16pt#; + +thin#=0.03qs#; +inner_thin# = .66thin#; +frame_thin# = 4thin#; + +SideSpace# = .11qs#; +BottomWidth# = qs# - 2SideSpace#; +BottomSpace# = .11qs#; +TopSpace# = .11qs#; + +%----------------------------------------------------------------------- +% Now define our pixels +define_whole_pixels(qs,thin,inner_thin,frame_thin); +define_pixels(SideSpace,BottomWidth,BottomSpace,TopSpace); + +%----------------------------------------------------------------------- +% defining our pens +pen chess_pen; chess_pen = pencircle scaled thin; +pen inner_pen; inner_pen = pencircle scaled inner_thin; +pen frame_pen; frame_pen = pencircle scaled frame_thin; +pickup chess_pen; + +%----------------------------------------------------------------------- +% get our base +input pkbase.mf; + +%----------------------------------------------------------------------- +% now generate the figures +pickup chess_pen; input pkblackfield.mf; +pickup chess_pen; input pkpawn.mf; +pickup chess_pen; input pkknight.mf; +pickup chess_pen; input pkqueen.mf; +pickup chess_pen; input pkking.mf; +pickup chess_pen; input pkbishop.mf; +pickup chess_pen; input pkrook.mf; +pickup chess_pen; input pkgeo.mf; + +%---------------------------------------------------------------------- +% Now the fontdimension parameters +font_normal_space qs#; +font_normal_stretch 0; +font_normal_shrink 0; +font_x_height qs#; +font_quad qs#; +font_extra_space 0; + +end; diff --git a/fonts/bartel-chess-fonts/pkelch16.tfm b/fonts/bartel-chess-fonts/pkelch16.tfm Binary files differnew file mode 100644 index 0000000000..2b6b80f46d --- /dev/null +++ b/fonts/bartel-chess-fonts/pkelch16.tfm diff --git a/fonts/bartel-chess-fonts/pkelch8.mf b/fonts/bartel-chess-fonts/pkelch8.mf new file mode 100644 index 0000000000..de2231d83a --- /dev/null +++ b/fonts/bartel-chess-fonts/pkelch8.mf @@ -0,0 +1,85 @@ +% This is +% pkelch8.mf +% +% Copyright (C) 1989-92 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +% + +% mag=1.2; + +mode_def agfa = + proofing:= 0; + fontmaking:= 1; + tracingtitles:= 1; + pixels_per_inch:= 400; + blacker:= .2; + fillin:= .1; + o_correction:= 1; +enddef; + +%mode=agfa; +%mode=epsonfx; +%mode=hplaser; +mode_setup; + +qs#:= 8pt#; + +thin#=0.03qs#; +inner_thin# = .66thin#; +frame_thin# = 4thin#; + +SideSpace# = .11qs#; +BottomWidth# = qs# - 2SideSpace#; +BottomSpace# = .11qs#; +TopSpace# = .11qs#; + +%----------------------------------------------------------------------- +% Now define our pixels +define_whole_pixels(qs,thin,inner_thin,frame_thin); +define_pixels(SideSpace,BottomWidth,BottomSpace,TopSpace); + +%----------------------------------------------------------------------- +% defining our pens +pen chess_pen; chess_pen = pencircle scaled thin; +pen inner_pen; inner_pen = pencircle scaled inner_thin; +pen frame_pen; frame_pen = pencircle scaled frame_thin; +pickup chess_pen; + +%----------------------------------------------------------------------- +% get our base +input pkbase.mf; + +%----------------------------------------------------------------------- +% now generate the figures +pickup chess_pen; input pkblackfield.mf; +pickup chess_pen; input pkpawn.mf; +pickup chess_pen; input pkknight.mf; +pickup chess_pen; input pkqueen.mf; +pickup chess_pen; input pkking.mf; +pickup chess_pen; input pkbishop.mf; +pickup chess_pen; input pkrook.mf; +pickup chess_pen; input pkgeo.mf; + +%---------------------------------------------------------------------- +% Now the fontdimension parameters +font_normal_space qs#; +font_normal_stretch 0; +font_normal_shrink 0; +font_x_height qs#; +font_quad qs#; +font_extra_space 0; + +end; diff --git a/fonts/bartel-chess-fonts/pkelch8.tfm b/fonts/bartel-chess-fonts/pkelch8.tfm Binary files differnew file mode 100644 index 0000000000..22e3b6efa9 --- /dev/null +++ b/fonts/bartel-chess-fonts/pkelch8.tfm diff --git a/fonts/bartel-chess-fonts/pkelch9.mf b/fonts/bartel-chess-fonts/pkelch9.mf new file mode 100644 index 0000000000..2ac48263e6 --- /dev/null +++ b/fonts/bartel-chess-fonts/pkelch9.mf @@ -0,0 +1,85 @@ +% This is +% pkelch9.mf +% +% Copyright (C) 1989-92 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +% + +% mag=1.2; + +mode_def agfa = + proofing:= 0; + fontmaking:= 1; + tracingtitles:= 1; + pixels_per_inch:= 400; + blacker:= .2; + fillin:= .1; + o_correction:= 1; +enddef; + +%mode=agfa; +%mode=epsonfx; +%mode=hplaser; +mode_setup; + +qs#:= 9pt#; + +thin#=0.03qs#; +inner_thin# = .66thin#; +frame_thin# = 4thin#; + +SideSpace# = .11qs#; +BottomWidth# = qs# - 2SideSpace#; +BottomSpace# = .11qs#; +TopSpace# = .11qs#; + +%----------------------------------------------------------------------- +% Now define our pixels +define_whole_pixels(qs,thin,inner_thin,frame_thin); +define_pixels(SideSpace,BottomWidth,BottomSpace,TopSpace); + +%----------------------------------------------------------------------- +% defining our pens +pen chess_pen; chess_pen = pencircle scaled thin; +pen inner_pen; inner_pen = pencircle scaled inner_thin; +pen frame_pen; frame_pen = pencircle scaled frame_thin; +pickup chess_pen; + +%----------------------------------------------------------------------- +% get our base +input pkbase.mf; + +%----------------------------------------------------------------------- +% now generate the figures +pickup chess_pen; input pkblackfield.mf; +pickup chess_pen; input pkpawn.mf; +pickup chess_pen; input pkknight.mf; +pickup chess_pen; input pkqueen.mf; +pickup chess_pen; input pkking.mf; +pickup chess_pen; input pkbishop.mf; +pickup chess_pen; input pkrook.mf; +pickup chess_pen; input pkgeo.mf; + +%---------------------------------------------------------------------- +% Now the fontdimension parameters +font_normal_space qs#; +font_normal_stretch 0; +font_normal_shrink 0; +font_x_height qs#; +font_quad qs#; +font_extra_space 0; + +end; diff --git a/fonts/bartel-chess-fonts/pkelch9.tfm b/fonts/bartel-chess-fonts/pkelch9.tfm Binary files differnew file mode 100644 index 0000000000..10f6361cbf --- /dev/null +++ b/fonts/bartel-chess-fonts/pkelch9.tfm diff --git a/fonts/bartel-chess-fonts/pkgeo.mf b/fonts/bartel-chess-fonts/pkgeo.mf new file mode 100644 index 0000000000..f9b7229c68 --- /dev/null +++ b/fonts/bartel-chess-fonts/pkgeo.mf @@ -0,0 +1,109 @@ +% This is +% pkgeo.mf +% +% Copyright (C) 1989-92 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +% +% +%we have to define six essential characters: +% WoW NoW BoW WoB NoB BoB +%Pawn 0 6 12 18 24 30 +%Knight 1 7 13 19 25 31 +%Bishop 2 8 14 20 26 32 +%Rook 3 9 15 21 27 33 +%Queen 4 10 16 22 28 34 +%King 5 11 17 23 29 35 + +% All these cases are repeated three more times: +% Left turned, Right turned and upside down +%------------------------------------------ +% From this result the first free positions +% usable for simple geometric signs. + +def MakeCirclePath = + path CirclePath; + CirclePath = fullcircle scaled .75qs shifted Center; +enddef; + +def MakeWhiteCircle = + pickup chess_pen; + clearit; + draw CirclePath; + cullit; + WhiteMan:= currentpicture; +enddef; + +def MakeBlackCircle = + pickup chess_pen; + clearit; + filldraw CirclePath; + cullit; + BlackMan:= currentpicture; +enddef; + +def MakeOuterShape = + pickup frame_pen; + clearit; + filldraw CirclePath; + cullit; + OuterShape:= currentpicture; +enddef; + + +MakeCirclePath; +MakeWhiteCircle; +MakeBlackCircle; +MakeNeutral(WhiteMan, BlackMan); +MakeOuterShape ; + +beginchar(Circle+White+OnWhite, qs#, qs#, 0); + "White circle on white field"; + currentpicture:= WhiteMan; +endchar; + +beginchar(Circle+Black+OnWhite, qs#, qs#, 0); + "Black circle on white field"; + currentpicture:= BlackMan; +endchar; + +beginchar(Circle+Neutral+OnWhite, qs#, qs#, 0); + "Neutral circle on white field"; + currentpicture:= NeutralMan; +endchar; + +beginchar(Circle+White+OnBlack, qs#, qs#, 0); + "White circle on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + WhiteMan; +endchar; + +beginchar(Circle+Neutral+OnBlack, qs#, qs#, 0); + "Neutral circle on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + NeutralMan; +endchar; + +beginchar(Circle+Black+OnBlack, qs#, qs#, 0); + "Black circle on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + BlackMan; +endchar; diff --git a/fonts/bartel-chess-fonts/pkking.mf b/fonts/bartel-chess-fonts/pkking.mf new file mode 100644 index 0000000000..54dd32fe47 --- /dev/null +++ b/fonts/bartel-chess-fonts/pkking.mf @@ -0,0 +1,342 @@ +% This is +% pkking.mf +% +% Copyright (C) 1989-92 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +% +%we have to define six essential characters: +% WoW NoW BoW WoB NoB BoB +%Pawn 0 6 12 18 24 30 +%Knight 1 7 13 19 25 31 +%Bishop 2 8 14 20 26 32 +%Rook 3 9 15 21 27 33 +%Queen 4 10 16 22 28 34 +%King 5 11 17 23 29 35 + +def SetParam = + numeric BowOneW,ThreeFour,SixHor,FourSix; + BowOneW = .52qs; + ThreeFour = .10; + FourFive = .60; % z5 is Top of Heart + SixHor = 1.40; + FourSix = .29; + + numeric CrossWidth, CrossHeight, CrossAbove; + CrossWidth = .30; + CrossHeight = .18; + CrossAbove = .18; %Middle of cross above center of heart. +enddef; + +def DefinePointsAndBows = + % Points are numbered from 0 to 9 from lower to upper + % Points to the left have suffix a, right suffic b + % points without further suffix are in the center + + SetParam; + DefineFootBows( 0, % No Space to Bottom + BowOneW, + .22qs, % FootHeight + .40, % BowTwoLoc + .15, % WidthToHeight + .90, % BowTwoLen + 1.00); % BowThreeLen + + z4 = z3 + BowOneW*ThreeFour*up; + z5 = z4 + BowOneW*FourFive*up; + y6l= y6r = y4 + BowOneW*FourSix; + x6l + x6r = qs; x6r - x6l = SixHor*BowOneW; + + z7 = z5 + CrossAbove*BowOneW*up; + y7 = y7l = y7r; + x7l + x7r = qs; x7r - x7l = CrossWidth*BowOneW; + z8 = z7 + CrossHeight*BowOneW*up; + + path Cross[]; + Cross1= z5--z8; + Cross2= z7l--z7r; +enddef; + +def DrawCross = + draw Cross1; + draw Cross2; +enddef; + +def UnDrawCross = + undraw Cross1; + undraw Cross2; +enddef; + +def DefineKingPaths = + path LeftPath,RightPath,LeftInnerPath,RightInnerPath, + OuterPath,TopHeartPath,HeartPath; + LeftPath = z1l .. z2l .. z3l .. z6l .. {down} z4 -- z3; + RightPath= reverse LeftPath reflectedabout (z3,z4); + %RightPath= z3 -- z4 {up} .. z6r .. z3r .. z2r .. z1r; + LeftInnerPath = ParallelPath(subpath (1.8,5)of LeftPath, + -1.6*thin); + RightInnerPath = LeftInnerPath reflectedabout (z3,z4); + + OuterPath = LeftPath .. RightPath .. Bow0 .. cycle; + HeartStart = 3.75; + HeartPath = subpath (4,HeartStart) of LeftPath & + point HeartStart of LeftPath + {-direction HeartStart of LeftPath}.. + {right}z5{right}.. + point HeartStart of reverse RightPath + {direction HeartStart of reverse RightPath} & + subpath (HeartStart,4) of reverse RightPath; + +enddef; + +def MakeWhiteKing = + clearit; + pickup chess_pen; + draw Bow[1]; + draw Bow[2]; + draw Bow[3]; + draw OuterPath; + draw HeartPath; + DrawCross; + %pickup inner_pen; + %pickup chess_pen; + %draw ParallelPath(subpath(1.7,5)of LeftPath,-2thin); + %draw ParallelPath(subpath(0,3.3)of RightPath,-2thin); + if proofing > 0: + ScreenGrid(0,qs)(0,qs); + fi; + WhiteMan:= currentpicture; +enddef; + +def MakeBlackKing = + clearit; + pickup chess_pen; + filldraw HeartPath .. cycle; + DrawCross; + cullit; + undraw ParallelPath(subpath (.6,3.4) of HeartPath, -thin); + cullit; + filldraw OuterPath; + cullit; + undraw ShortenPath(Bow[1],1.5thin); + undraw ShortenPath(Bow[2],1.2thin); + undraw ShortenPath(Bow[3],1.2thin); + undraw ShortenBegin(ParallelPath(LeftPath,-thin),1.2thin); + undraw ShortenEnd(ParallelPath(RightPath,-thin),1.2thin); + BlackMan:= currentpicture; +enddef; + +def MakeOuterShape = + clearit; + pickup frame_pen; + DrawCross; + filldraw OuterPath; + filldraw HeartPath .. cycle; + cullit; + OuterShape:= currentpicture; +enddef; + +DefinePointsAndBows; +DefineKingPaths; + +MakeWhiteKing; +MakeBlackKing; +MakeNeutral(WhiteMan, BlackMan); +MakeOuterShape; + + +%ScreenGrid(0,qs,x6r)(0,qs,y6r); + +%=========================================================== + +beginchar(King+White+OnWhite, qs#, qs#, 0); + "White king on white field"; + currentpicture:= WhiteMan; + %labels(z0,z1l,z1,z1r,z2l,z2,z2r); + %labels(z3l,z3,z3l,z4,z5,z6l,z6r); + %labels(z7l,z7,z7r,z8); +endchar; + +beginchar(King+White+OnWhite+LeftTurned, qs#, qs#, 0); + "White king turned to the left on white field"; + currentpicture:= TurnLeft(WhiteMan); +endchar; + +beginchar(King+White+OnWhite+RightTurned, qs#, qs#, 0); + "White king turned to the right on white field"; + currentpicture:= TurnRight(WhiteMan); +endchar; + +beginchar(King+White+OnWhite+UpSideDown, qs#, qs#, 0); + "White king turned upsidedown on white field"; + currentpicture:= TurnUpSideDown(WhiteMan); +endchar; + +%=========================================================== + +beginchar(King+White+OnBlack, qs#, qs#, 0); + "White king on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + WhiteMan; +endchar; + +beginchar(King+White+OnBlack+LeftTurned, qs#, qs#, 0); + "White king turned to the left on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(WhiteMan); +endchar; + +beginchar(King+White+OnBlack+RightTurned, qs#, qs#, 0); + "White king turned to the right on black field"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(WhiteMan); +endchar; + +beginchar(King+White+OnBlack+UpSideDown, qs#, qs#, 0); + "White king turned upsidedown on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(WhiteMan); +endchar; + +%=========================================================== + +beginchar(King+Neutral+OnWhite, qs#, qs#, 0); + "Neutral king on white field"; + currentpicture:= NeutralMan; +endchar; + +beginchar(King+Neutral+OnWhite+LeftTurned, qs#, qs#, 0); + "Neutral king turned to the left on white field"; + currentpicture:= TurnLeft(NeutralMan); +endchar; + +beginchar(King+Neutral+OnWhite+RightTurned, qs#, qs#, 0); + "Neutral king turned to the right on white field"; + currentpicture:= TurnRight(NeutralMan); +endchar; + +beginchar(King+Neutral+OnWhite+UpSideDown, qs#, qs#, 0); + "Neutral king turned upsidedown on white field"; + currentpicture:= TurnUpSideDown(NeutralMan); +endchar; + +%=========================================================== + +beginchar(King+Neutral+OnBlack, qs#, qs#, 0); + "Neutral king on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + NeutralMan; +endchar; + +beginchar(King+Neutral+OnBlack+LeftTurned, qs#, qs#, 0); + "Neutral king turned to the left on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(NeutralMan); +endchar; + +beginchar(King+Neutral+OnBlack+RightTurned, qs#, qs#, 0); + "Neutral king turned to the right on black field"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(NeutralMan); +endchar; + +beginchar(King+Neutral+OnBlack+UpSideDown, qs#, qs#, 0); + "Neutral king turned upsidedown on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(NeutralMan); +endchar; + +%=========================================================== + +beginchar(King+Black+OnWhite, qs#, qs#, 0); + "Black king on white field"; + currentpicture:= BlackMan; +endchar; + +beginchar(King+Black+OnWhite+LeftTurned, qs#, qs#, 0); + "Black king turned to the left on white field"; + currentpicture:= TurnLeft(BlackMan); +endchar; + +beginchar(King+Black+OnWhite+RightTurned, qs#, qs#, 0); + "Black king turned to the right on white field"; + currentpicture:= TurnRight(BlackMan); +endchar; + +beginchar(King+Black+OnWhite+UpSideDown, qs#, qs#, 0); + "Black king turned upsidedown on white field"; + currentpicture:= TurnUpSideDown(BlackMan); +endchar; + +%=========================================================== + +beginchar(King+Black+OnBlack, qs#, qs#, 0); + "Black king on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + BlackMan; +endchar; + +beginchar(King+Black+OnBlack+LeftTurned, qs#, qs#, 0); + "Black king turned to the left on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(BlackMan); +endchar; + +beginchar(King+Black+OnBlack+RightTurned, qs#, qs#, 0); + "Black king turned to the right on black field"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(BlackMan); +endchar; + +beginchar(King+Black+OnBlack+UpSideDown, qs#, qs#, 0); + "Black king turned upsidedown on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(BlackMan); +endchar; + + diff --git a/fonts/bartel-chess-fonts/pkknight.mf b/fonts/bartel-chess-fonts/pkknight.mf new file mode 100644 index 0000000000..de072befeb --- /dev/null +++ b/fonts/bartel-chess-fonts/pkknight.mf @@ -0,0 +1,416 @@ +% This is +% pkknight.mf +% +% Copyright (C) 1989-92 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +% +def sympoint (expr p,d,a) = + % Come to point p in direction d + angel a, and leave symmetrical + % to d - a This gives us a peak in p pointing in direction d. + % sharpnes is specified by a. a= 0 no peak, a=90 real peak; + + {dir (angle(d)+a)} p {dir(angle(d)+180-a)} +enddef; + +def Ear(expr p,pd,q,qd,a,r,rd) = + p{pd} .. sympoint(q,qd,a) .. {rd}r +enddef; + +def DefineKnightPath = + % we construct the path from right to left. + % Ie we begin with the nack and come then to the ears, + % the nose etc + z0 = (.35qs,BottomSpace); % The leftmost bottompoint + z1 = (qs-SideSpace,BottomSpace); % The right bottom edge + path Foot; + Foot = z0 -- z1; + % z2 will be later defined, it + % is the connection to the right + % ear + z4 = (.5qs,qs-TopSpace); % The peak of the right ear + z3 = z4 + (.07qs,-0.15qs); % The right lower point of the + % right ear + z5 = z3 - (.08qs,.01qs ); % The left lower point of the + % right ear + + % Now comes the definition of the right ear + % There are two paths: + % RightEar: The complete path for the ear + % sRightEar: The subpath for the whole shape + path RightEar, sRightEar; + RightEar = Ear(z3,(1,5),z4,(0,1),10,z5,(1,-5)); + sRightEar = subpath (.25,1.75) of RightEar; + z2 = point 0 of sRightEar; % The right + z6 = point 2 of sRightEar; % The left connection point of + % the right ear + + % Now we can also define the nack + path Nack; + Nack = z1{up} .. tension 1 and 1 .. {left}z2; + + z7 = z6 + (-.1qs,-0.07qs); % This is the point under the + % left ear + + % Now the two pathes from the right to the left ear. + % EarUnderEar, goes from the right ear under the left ear + % EarToEar connects only the two ears + + path EarUnderEar,EarToEar; + EarUnderEar= z6{left} .. {-5,-3}z7; + EarToEar = subpath (0,.5) of EarUnderEar; + + z8 = point 1 of EarToEar; % The connection point and the + % start of the left ear + + % to get easier definition of the following points + % we define a line bx from z7 (point under left ear) down to z13 + % (leftmost point of shape) ie the begining of nose and mount + + z13 = (SideSpace,0.35qs); % The leftmost point of the + % shape + pair bx,by; + bx = z13 - z7; + by = z13 rotatedabout (z7,-90); + + z9 = z7 + .23bx + .24by; % the peak of the left ear + z10= z7 + .11bx + .10by; % the left point of the left ear + + % Now the path for the leaft ear + path LeftEar; + LeftEar= Ear(z8,(-1,5),z9,(-1,1),8,z10,(2,-5)); + + z11 = z7 + .4bx + .09by; + z12 = z7 + .5bx + .05by; + + path Bless; + Bless = z10{dir(angle(bx)-10)} .. z11 .. z12 .. {down} z13; + + % the points from z14 to z17 are defined via a line nx + % from z13 to z18 + pair nx,ny; + + z19 = (.25qs,.25qs); + nx = z19 - z13; + ny = nx rotatedabout ((0,0),90); + + z14 = z13 + .30nx - .13ny; % the point between mouth + % and nose + z15 = z13 + .63nx - .02ny; % the upper point of mouth + z16 = z13 + .72nx + .15ny; % the inner point of mouth + z17 = z13 + .77nx - .02ny; % + z18 = z13 + .87nx - .08ny; % + z25 = z13 + .22nx + .28ny; % the location of the nose + + path MouthNose; + MouthNose = z13 .. z14{nx} .. z15 ... sympoint(z16,(z16-z17),0) + ... z17 .. z18 .. z19; + + % the points from z20 to z23 are defined via a line nx + % from z19 to z23 + pair ux,uy; + + z23 = (.55qs,.61qs); + ux = z23 - z19; + uy = z23 rotatedabout (z19,90); + + z20 = z19 + .15ux + .01uy; + z21 = z19 + .45ux - .05uy; + z22 = z19 + .88ux - .15uy; + path UnderMouth, sUnderMouth; + UnderMouth = z19 ..z20..z21..z22..{up}z23; + sUnderMouth = subpath (0,3) of UnderMouth; + + z24 = z22 + .06qs*down; + path ToFoot; + ToFoot = z22{down} .. z24 .. {down}z0; + + + path KnightShape; + KnightShape = Foot & Nack & sRightEar & EarToEar + & LeftEar & Bless & MouthNose + & sUnderMouth & ToFoot & cycle; + +enddef; + +def DefineNosePath(expr p,s) = + begingroup + if proofing >0: + show p,s; + fi; + save z; pair z[]; + + z0 + (0,s) = p; + pair px,py; + py= p - z0; + px= py rotated -90; + z1= z0 + 0.10px + 0.50py; + z2= z0 + 0.70px + 1.00py; + z3= z0 + 0.70px + 1.60py; + z4= z0 + 0.10px + 2.10py; + z5= z0 - 0.20px + 1.90py; + z6= z0 - 0.60px + 0.50py; + z7= z0 - 0.60px + 0.10py; + z8= z0 - 0.50px + 0.00py; + forsuffixes i=0,1,2,3,4,5,6,7,8: + z[i].. + endfor cycle + endgroup +enddef; + +def EyePath (expr p,s) = + begingroup + save z; pair z[]; + + z0 + (0,s) = p; + pair px,py; + py= p - z0; + px= py rotated -90; + + z1= z0 + 1.00px + 1.00py; + + z0{0,1} .. {1,0} z1 & z1 {0,-1} .. {-1,0}z0 & cycle + endgroup +enddef; + +def MakeWhiteKnight = + clearit; + pickup chess_pen; + draw Foot; + draw RightEar; + draw EarUnderEar; + draw LeftEar & Bless & MouthNose & UnderMouth; + draw ToFoot; + draw EyePath(z7-(.04qs,.05qs),.03qs); + filldraw DefineNosePath(z25,.015qs); + pickup chess_pen xscaled 2 rotated -10; + draw ShortenEnd(Nack,thin); + WhiteMan:= currentpicture; +enddef; + +def MakeBlackKnight = + clearit; + pickup chess_pen; + + filldraw KnightShape; + cullit; + unfilldraw DefineNosePath(z25,.015qs); + undraw EyePath(z7-(.04qs,.05qs),.03qs); + pickup chess_pen scaled .7 rotated -70; + undraw ShortenPath(ParallelPath(Nack,1.3thin),thin); + pickup chess_pen scaled .5; + undraw subpath (3,3.5) of UnderMouth; + BlackMan:= currentpicture; +enddef; + +def MakeKnightSpace = + clearit; + pickup frame_pen; + filldraw KnightShape; + cullit; + OuterShape:= currentpicture; +enddef; + +DefineKnightPath; +%DefineNosePath(z25,.2qs); + +MakeWhiteKnight; +MakeBlackKnight; +MakeNeutral(WhiteMan,BlackMan); +MakeKnightSpace; + +%=========================================================== + +beginchar(Knight+White+OnWhite, qs#, qs#, 0); + "White knight on white field"; + currentpicture:= WhiteMan; + labels(z0,z1l,z1,z1r,z2l,z2,z2r); + labels(z3l,z3,z3l,z4,z5,z6l,z6r); + labels(z7l,z7,z7r,z8); +endchar; +if proofing = 0: + +beginchar(Knight+White+OnWhite+LeftTurned, qs#, qs#, 0); + "White knight turned to the left on white field"; + currentpicture:= TurnLeft(WhiteMan); +endchar; + +beginchar(Knight+White+OnWhite+RightTurned, qs#, qs#, 0); + "White knight turned to the right on white field"; + currentpicture:= TurnRight(WhiteMan); +endchar; + +beginchar(Knight+White+OnWhite+UpSideDown, qs#, qs#, 0); + "White knight turned upsidedown on white field"; + currentpicture:= TurnUpSideDown(WhiteMan); +endchar; + +%=========================================================== + +beginchar(Knight+White+OnBlack, qs#, qs#, 0); + "White knight on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + WhiteMan; +endchar; + +beginchar(Knight+White+OnBlack+LeftTurned, qs#, qs#, 0); + "White knight turned to the left on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(WhiteMan); +endchar; + +beginchar(Knight+White+OnBlack+RightTurned, qs#, qs#, 0); + "White knight turned to the right on black field"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(WhiteMan); +endchar; + +beginchar(Knight+White+OnBlack+UpSideDown, qs#, qs#, 0); + "White knight turned upsidedown on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(WhiteMan); +endchar; + +%=========================================================== + +beginchar(Knight+Neutral+OnWhite, qs#, qs#, 0); + "Neutral knight on white field"; + currentpicture:= NeutralMan; +endchar; + +beginchar(Knight+Neutral+OnWhite+LeftTurned, qs#, qs#, 0); + "Neutral knight turned to the left on white field"; + currentpicture:= TurnLeft(NeutralMan); +endchar; + +beginchar(Knight+Neutral+OnWhite+RightTurned, qs#, qs#, 0); + "Neutral knight turned to the right on white field"; + currentpicture:= TurnRight(NeutralMan); +endchar; + +beginchar(Knight+Neutral+OnWhite+UpSideDown, qs#, qs#, 0); + "Neutral knight turned upsidedown on white field"; + currentpicture:= TurnUpSideDown(NeutralMan); +endchar; + +%=========================================================== + +beginchar(Knight+Neutral+OnBlack, qs#, qs#, 0); + "Neutral knight on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + NeutralMan; +endchar; + +beginchar(Knight+Neutral+OnBlack+LeftTurned, qs#, qs#, 0); + "Neutral knight turned to the left on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(NeutralMan); +endchar; + +beginchar(Knight+Neutral+OnBlack+RightTurned, qs#, qs#, 0); + "Neutral knight turned to the right on black field"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(NeutralMan); +endchar; + +beginchar(Knight+Neutral+OnBlack+UpSideDown, qs#, qs#, 0); + "Neutral knight turned upsidedown on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(NeutralMan); +endchar; + +%=========================================================== + +beginchar(Knight+Black+OnWhite, qs#, qs#, 0); + "Black knight on white field"; + currentpicture:= BlackMan; +endchar; + +beginchar(Knight+Black+OnWhite+LeftTurned, qs#, qs#, 0); + "Black knight turned to the left on white field"; + currentpicture:= TurnLeft(BlackMan); +endchar; + +beginchar(Knight+Black+OnWhite+RightTurned, qs#, qs#, 0); + "Black knight turned to the right on white field"; + currentpicture:= TurnRight(BlackMan); +endchar; + +beginchar(Knight+Black+OnWhite+UpSideDown, qs#, qs#, 0); + "Black knight turned upsidedown on white field"; + currentpicture:= TurnUpSideDown(BlackMan); +endchar; + +%=========================================================== + +beginchar(Knight+Black+OnBlack, qs#, qs#, 0); + "Black knight on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + BlackMan; +endchar; + +beginchar(Knight+Black+OnBlack+LeftTurned, qs#, qs#, 0); + "Black knight turned to the left on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(BlackMan); +endchar; + +beginchar(Knight+Black+OnBlack+RightTurned, qs#, qs#, 0); + "Black knight turned to the right on black field"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(BlackMan); +endchar; + +beginchar(Knight+Black+OnBlack+UpSideDown, qs#, qs#, 0); + "Black knight turned upsidedown on black field"; + MakeBlackField; + cullit; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(BlackMan); +endchar; +fi; + +% diff --git a/fonts/bartel-chess-fonts/pkpawn.mf b/fonts/bartel-chess-fonts/pkpawn.mf new file mode 100644 index 0000000000..6446135548 --- /dev/null +++ b/fonts/bartel-chess-fonts/pkpawn.mf @@ -0,0 +1,346 @@ +% This is +% pkpawn.mf +% +% Copyright (C) 1989-92 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +% This is the oldest part of all my the MF-sources. +% I started Metafonting with this figure. +% ElB. + +%----------------------------------------------------------- +% This macro depends on some global sizes: +% thin, BottomSpace, BottomWidth, sidewith +% The values are defined as basic sizes of the Chess Characters + +def PawnShape(expr wbf,hbf,wmf,hmf,wtf,htf,ibm,imt) = + %begingroup + %save wb,wm,wt,hb,hm,ht,interbm,intermt; + numeric wb,wm,wt,hb,hm,ht,interbm,intermt; + wb = BottomWidth*wbf; % width of bottom ellipse + hb = hbf*wb; % hight of bottom ellipse + wm = wmf*wb; hm = hmf*wm; % width and hight of middle ellipse + wt = wtf*wb; ht = htf*wt; % width and hight of top ellipse + interbm = ibm*thin; % amount of intersection of bottom + % and middle + intermt = imt*thin; % amount of intersection of middle + %and top + %save superb,superm,supert; + numeric superb,superm,supert; + superb=.75; + superm=.75; + supert=.75; + + %save topb,topm,topt; + numeric topb,topm,topt; + topb=BottomSpace+hb; + topm=topb+hm-interbm; + topt=topm+ht-intermt; + + %screenrule((0,BottomSpace),(qs,BottomSpace)); + %screenrule(((qs-wb)/2,0),((qs-wb)/2,qs)); + %screenrule(((qs+wb)/2,0),((qs+wb)/2,qs)); + + %screenrule((0,topb),(qs,topb)); + %screenrule((0,topm),(qs,topm)); + %screenrule((0,topt),(qs,topt)); + + %save bp,mp,tp; + numeric bp,mp,tp; + path bp,mp,tp,PawnPath; + + %save x,y,z; + %pair z[]b,x[]b,y[]b; + %pair z[]m,x[]m,y[]m; + %pair z[]t,x[]t,y[]t; + + bot rt z1b = ((qs+wb)/2, BottomSpace); + bot lft z3b = ((qs-wb)/2, BottomSpace); + bot y4b + hb = top y2b - hb = BottomSpace; + x2b = x4b = qs/2; + bp=superellipse(z1b,z2b,z3b,z4b,superb); + bp:= subpath(0,4) of bp; + + rt x1m - wm/2 = lft x3m + wm/2 = qs/2; + top y2m = bot y4m + hm = topm; + y1m = y3m = (y2m+y4m)/2; + x2m = x4m = qs/2; + mp=superellipse(z1m,z2m,z3m,z4m,superm); + + rt x1t - wt/2 = lft x3t + wt/2 = qs/2; + top y2t = bot y4t + ht = topt; + y1t = y3t = (y2t+y4t)/2; + x2t = x4t = qs/2; + tp=superellipse(z1t,z2t,z3t,z4t,supert); + + % compute the intersectiontimes on the right side of the pawn + % The pathtimes of superellipses range from 0 to 8 + + %save scbr,scmbr,scmtr,sctr; + numeric scbr,scmbr,scmtr,sctr; + scbr = xpart (bp intersectiontimes (subpath(6,8)of mp)); + scmbr = xpart (mp intersectiontimes (subpath(0,2)of bp)); + scmtr = xpart (mp intersectiontimes (subpath(6,8)of tp)); + sctr = xpart (tp intersectiontimes (subpath(0,2)of mp)); + + % here is a macro to mirror pathtimes of superellipses on y-axis + def mr(expr v) = + if v > 4: 12-v; + else: 4-v; + fi + enddef; + + % Now the left intersectionpoints + %save scbl,scmbl,scmtl,sctl; + numeric scbl,scmbl,scmtl,sctl; + scbl = mr(scbr); + scmbl = mr(scmbr); + scmtl = mr(scmtr); + sctl = mr(sctr); + + PawnPath:=subpath(0,scbr)of bp .. + subpath(scmbr,(8+scmtr)) of mp .. + subpath(sctr,8+sctl) of tp .. + subpath(scmtl,scmbl) of mp .. + subpath(scbl,4) of bp; + %endgroup + +enddef; +%----------------------------------------------------------- +def MakePawnPath = + pickup chess_pen; + if unknown PawnPath: + % wb = qs - 2*sidespace; % width of bottom ellipse + % hb = hbf*wb; % hight of bottom ellipse + % wm = wmf*wb; hm = hmf*wm; % width and hight of middle + % ellipse + % wt = wtf*wb; ht = htf*wt; % width and hight of top + % ellipse + % + % wbf, hbf, ,wmf, hmf, wtf, htf, ibm, imt + %PawnShape( .80, .50, .55, .85, .3, 1.0, 2.0, 1.2); + %PawnShape( .85, .55, .60, .90, .4, 1.0, 2.0, 1.2); + PawnShape( .83, .50, .57, .85, .3, 1.0, 2.0, 1.2); + fi +enddef; +%------------------------------------------------------------ +def CorrectPawnEdges = + pickup sqr; + drawdot(z1b); + drawdot(z3b); +enddef; +%----------------------------------------------------------- + +%we have to define six essential characters: +% WoW NoW BoW WoB NoB BoB +%Pawn 0 6 12 18 24 30 +%Knight 1 7 13 19 25 31 +%Bishop 2 8 14 20 26 32 +%Rook 3 9 15 21 27 33 +%Queen 4 10 16 22 28 34 +%King 5 11 17 23 29 35 + +% All these cases are repeated three more times: +% Left turned, Right turned and upside down +%------------------------------------------ + + +def MakeWhitePawn = + pickup chess_pen; + clearit; + MakePawnPath; + draw PawnPath -- cycle; + cullit; + WhiteMan:= currentpicture; +enddef; + +def MakeBlackPawn = + pickup chess_pen; + clearit; + MakePawnPath; + filldraw PawnPath -- cycle; + cullit; + BlackMan:= currentpicture; +enddef; + +def MakeOuterShape = + pickup frame_pen; + clearit; + filldraw PawnPath -- cycle; + cullit; + OuterShape:= currentpicture; +enddef; + +MakeWhitePawn; +MakeBlackPawn; +MakeNeutral(WhiteMan, BlackMan); +MakeOuterShape; + +beginchar(Pawn+White+OnWhite, qs#, qs#, 0); + "White pawn on white field"; + currentpicture:= WhiteMan; +endchar; + +beginchar(Pawn+White+OnWhite+LeftTurned, qs#, qs#, 0); + "White pawn on white field rotated to the left"; + currentpicture:= TurnLeft(WhiteMan); +endchar; + +beginchar(Pawn+White+OnWhite+RightTurned, qs#, qs#, 0); + "White pawn on white field rotated to the right"; + currentpicture:= TurnRight(WhiteMan); +endchar; + +beginchar(Pawn+White+OnWhite+UpSideDown, qs#, qs#, 0); + "White pawn on white field upside down"; + currentpicture:= TurnUpSideDown(WhiteMan); +endchar; + +beginchar(Pawn+Black+OnWhite, qs#, qs#, 0); + "Black pawn on white field"; + currentpicture:= BlackMan; +endchar; + +beginchar(Pawn+Black+OnWhite+LeftTurned, qs#, qs#, 0); + "Black pawn on white field rotated to the left"; + currentpicture:= TurnLeft(BlackMan); +endchar; + +beginchar(Pawn+Black+OnWhite+RightTurned, qs#, qs#, 0); + "Black pawn on white field rotated to the right"; + currentpicture:= TurnRight(BlackMan); +endchar; + +beginchar(Pawn+Black+OnWhite+UpSideDown, qs#, qs#, 0); + "Black pawn on white field upside down"; + currentpicture:= TurnUpSideDown(BlackMan); +endchar; + +beginchar(Pawn+Neutral+OnWhite, qs#, qs#, 0); + "Neutral pawn on white field"; + currentpicture:= NeutralMan; +endchar; + +beginchar(Pawn+Neutral+OnWhite+LeftTurned, qs#, qs#, 0); + "Neutral pawn on white field rotated to the left"; + currentpicture:= TurnLeft(NeutralMan); +endchar; + +beginchar(Pawn+Neutral+OnWhite+RightTurned, qs#, qs#, 0); + "Neutral pawn on white field rotated to the right"; + currentpicture:= TurnRight(NeutralMan); +endchar; + +beginchar(Pawn+Neutral+OnWhite+UpSideDown, qs#, qs#, 0); + "Neutral pawn on white field upside down"; + currentpicture:= TurnUpSideDown(NeutralMan); +endchar; + +beginchar(Pawn+White+OnBlack, qs#, qs#, 0); + "White pawn on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + WhiteMan; +endchar; + +beginchar(Pawn+White+OnBlack+LeftTurned, qs#, qs#, 0); + "White pawn on black field turned to the left"; + MakeBlackField; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(WhiteMan); +endchar; + +beginchar(Pawn+White+OnBlack+RightTurned, qs#, qs#, 0); + "White pawn on black field turned to the right"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(WhiteMan); +endchar; + +beginchar(Pawn+White+OnBlack+UpSideDown, qs#, qs#, 0); + "White pawn on black field upsidedown"; + MakeBlackField; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(WhiteMan); +endchar; + +beginchar(Pawn+Neutral+OnBlack, qs#, qs#, 0); + "Neutral pawn on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + NeutralMan; +endchar; + +beginchar(Pawn+Neutral+OnBlack+LeftTurned, qs#, qs#, 0); + "Neutral pawn on black field turned to the left"; + MakeBlackField; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(NeutralMan); +endchar; + +beginchar(Pawn+Neutral+OnBlack+RightTurned, qs#, qs#, 0); + "Neutral pawn on black field turned to the right"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(NeutralMan); +endchar; + +beginchar(Pawn+Neutral+OnBlack+UpSideDown, qs#, qs#, 0); + "Neutral pawn on black field upsidedown"; + MakeBlackField; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(NeutralMan); +endchar; + +beginchar(Pawn+Black+OnBlack, qs#, qs#, 0); + "Black pawn on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + BlackMan; +endchar; + +beginchar(Pawn+Black+OnBlack+LeftTurned, qs#, qs#, 0); + "Black pawn on black field turned to the left"; + MakeBlackField; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(BlackMan); +endchar; + +beginchar(Pawn+Black+OnBlack+RightTurned, qs#, qs#, 0); + "Black pawn on black field turned to the right"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(BlackMan); +endchar; + +beginchar(Pawn+Black+OnBlack+UpSideDown, qs#, qs#, 0); + "Black pawn on black field upsidedown"; + MakeBlackField; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(BlackMan); +endchar; diff --git a/fonts/bartel-chess-fonts/pkqueen.mf b/fonts/bartel-chess-fonts/pkqueen.mf new file mode 100644 index 0000000000..5393e3a14f --- /dev/null +++ b/fonts/bartel-chess-fonts/pkqueen.mf @@ -0,0 +1,300 @@ +% This is +% pkqueen.mf +% +% Copyright (C) 1989-92 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +% + +%we have to define six essential characters: +% WoW NoW BoW WoB NoB BoB +%Pawn 0 6 12 18 24 30 +%Knight 1 7 13 19 25 31 +%Bishop 2 8 14 20 26 32 +%Rook 3 9 15 21 27 33 +%Queen 4 10 16 22 28 34 +%King 5 11 17 23 29 35 + +def Kegel(expr p,q) = + begingroup + path KPath; + numeric Width[],x[].a,y[].a,x[].b,y[].b; + numeric Base,MiddlePos,BowIns,Height,LowerHeight,TopHeight; + + + Width0 = Base = length(q-p); + Width1 = 1.30Base; + Width2 = 0.35Base; + Width3 = 1.30Base; % Diameter of circle + Height = 5.75Base; + MiddlePos = 0.25; + + BowIns = Width3/2+-+Width2/2; + LowerHeight + TopHeight = Height - Width3 + BowIns; + LowerHeight = MiddlePos*(LowerHeight+TopHeight); + + z0a = p; + z0b = z0a + (Width0,0); + forsuffixes $=1,2: + x$a + x$b = x0a + x0b; x$b - x$a = Width$; + endfor; + y1a = y1b = y0a + LowerHeight; + y2a = y2b = y1a + TopHeight; + x3a = .5(x2b+x2a); + y3a = y2a + BowIns; + %labels(0a,0b,1a,1b,2a,2b,3a); + + path LeftP,RightP,KgCircle; + LeftP= z2a -- z1a -- z0a; + RightP= z0b -- z1b -- z2b; + KgCircle= halfcircle rotated 180 scaled Width3 shifted z3a; + + KPath:= RightP .. + subpath ((ypart((z1b -- 1.5[z1b,z2b]) + intersectiontimes KgCircle)),4) of KgCircle .. + halfcircle scaled Width3 shifted z3a .. + subpath (0,ypart((z1a -- 1.5[z1a,z2a]) + intersectiontimes KgCircle)) of KgCircle .. + LeftP; + reverse (KPath rotatedaround(p, angle (q-p))) + endgroup; +enddef; + +def DefineQueenPath = + %SetParam; + DefineFootBows( 0, % No Space to Bottom + .50qs, % BowOneWidth + .28qs, % FootHeight + .40, % BowTwoLoc + .13, % WidthToHeight + .90, % BowTwoLen + 1.00); % BowThreeLen + + path KPath,LeftPath,RightPath,QueenShape; + numeric b,s; + % b and s define the ratio of 5 peak bases and 4 spaces. + % if you want more or other spacing change the values + b = 1.1s; + 5b + 4s = length(Bow3); + + pair at,bt; + at= point 0 of Bow3; + bt= point b of Bow3; + KPath:= Kegel(at, bt); + for t=b+s step b+s until length(Bow3): + KPath:= KPath .. subpath(t-s,t) of Bow3; + KPath:= KPath .. Kegel(point t of Bow3, + point(t+b)of Bow3); + endfor; + LeftPath:= z1l .. z2l .. z3l; + RightPath:= z3r .. z2r .. z1r; + QueenShape:= Bow0 & + LeftPath & + KPath .. + RightPath & + cycle; +enddef; + +pickup chess_pen; + +def MakeWhiteQueen = + clearit; + pickup chess_pen; + draw QueenShape; + forsuffixes $=1,2,3: draw Bow$; endfor; + WhiteMan:= currentpicture; +enddef; + +def MakeBlackQueen = + clearit; + pickup chess_pen; + filldraw QueenShape; + cullit; + undraw ShortenPath(Bow1,thin); + undraw ShortenPath(Bow2,thin); + undraw ShortenPath(ParallelPath(Bow3,-thin),thin); + BlackMan:= currentpicture; +enddef; + +def MakeOuterShape = + clearit; + pickup frame_pen; + filldraw QueenShape; + cullit; + OuterShape:= currentpicture; +enddef; + +DefineQueenPath; +MakeWhiteQueen; +MakeBlackQueen; +MakeNeutral(WhiteMan,BlackMan); +MakeOuterShape; + +%----------------------------------------------------------------------- +beginchar(Queen+White+OnWhite, qs#, qs#, 0); + "White queen on white field"; + currentpicture:= WhiteMan; +endchar; + +beginchar(Queen+White+OnWhite+LeftTurned, qs#, qs#, 0); + "White queen on white field rotated to the left"; + currentpicture:= TurnLeft(WhiteMan); +endchar; + +beginchar(Queen+White+OnWhite+RightTurned, qs#, qs#, 0); + "White queen on white field rotated to the right"; + currentpicture:= TurnRight(WhiteMan); +endchar; + +beginchar(Queen+White+OnWhite+UpSideDown, qs#, qs#, 0); + "White queen on white field upside down"; + currentpicture:= TurnUpSideDown(WhiteMan); +endchar; + +beginchar(Queen+Black+OnWhite, qs#, qs#, 0); + "Black queen on white field"; + currentpicture:= BlackMan; +endchar; + +beginchar(Queen+Black+OnWhite+LeftTurned, qs#, qs#, 0); + "Black queen on white field rotated to the left"; + currentpicture:= TurnLeft(BlackMan); +endchar; + +beginchar(Queen+Black+OnWhite+RightTurned, qs#, qs#, 0); + "Black queen on white field rotated to the right"; + currentpicture:= TurnRight(BlackMan); +endchar; + +beginchar(Queen+Black+OnWhite+UpSideDown, qs#, qs#, 0); + "Black queen on white field upside down"; + currentpicture:= TurnUpSideDown(BlackMan); +endchar; + +beginchar(Queen+Neutral+OnWhite, qs#, qs#, 0); + "Neutral queen on white field"; + currentpicture:= NeutralMan; +endchar; + +beginchar(Queen+Neutral+OnWhite+LeftTurned, qs#, qs#, 0); + "Neutral queen on white field rotated to the left"; + currentpicture:= TurnLeft(NeutralMan); +endchar; + +beginchar(Queen+Neutral+OnWhite+RightTurned, qs#, qs#, 0); + "Neutral queen on white field rotated to the right"; + currentpicture:= TurnRight(NeutralMan); +endchar; + +beginchar(Queen+Neutral+OnWhite+UpSideDown, qs#, qs#, 0); + "Neutral queen on white field upside down"; + currentpicture:= TurnUpSideDown(NeutralMan); +endchar; + +beginchar(Queen+White+OnBlack, qs#, qs#, 0); + "White queen on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + WhiteMan; +endchar; + +beginchar(Queen+White+OnBlack+LeftTurned, qs#, qs#, 0); + "White queen on black field turned to the left"; + MakeBlackField; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(WhiteMan); +endchar; + +beginchar(Queen+White+OnBlack+RightTurned, qs#, qs#, 0); + "White queen on black field turned to the right"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(WhiteMan); +endchar; + +beginchar(Queen+White+OnBlack+UpSideDown, qs#, qs#, 0); + "White queen on black field upsidedown"; + MakeBlackField; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(WhiteMan); +endchar; + +beginchar(Queen+Neutral+OnBlack, qs#, qs#, 0); + "Neutral queen on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + NeutralMan; +endchar; + +beginchar(Queen+Neutral+OnBlack+LeftTurned, qs#, qs#, 0); + "Neutral queen on black field turned to the left"; + MakeBlackField; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(NeutralMan); +endchar; + +beginchar(Queen+Neutral+OnBlack+RightTurned, qs#, qs#, 0); + "Neutral queen on black field turned to the right"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(NeutralMan); +endchar; + +beginchar(Queen+Neutral+OnBlack+UpSideDown, qs#, qs#, 0); + "Neutral queen on black field upsidedown"; + MakeBlackField; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(NeutralMan); +endchar; + +beginchar(Queen+Black+OnBlack, qs#, qs#, 0); + "Black queen on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + BlackMan; +endchar; + +beginchar(Queen+Black+OnBlack+LeftTurned, qs#, qs#, 0); + "Black queen on black field turned to the left"; + MakeBlackField; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(BlackMan); +endchar; + +beginchar(Queen+Black+OnBlack+RightTurned, qs#, qs#, 0); + "Black queen on black field turned to the right"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(BlackMan); +endchar; + +beginchar(Queen+Black+OnBlack+UpSideDown, qs#, qs#, 0); + "Black queen on black field upsidedown"; + MakeBlackField; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(BlackMan); +endchar; diff --git a/fonts/bartel-chess-fonts/pkrook.mf b/fonts/bartel-chess-fonts/pkrook.mf new file mode 100644 index 0000000000..a90437b0eb --- /dev/null +++ b/fonts/bartel-chess-fonts/pkrook.mf @@ -0,0 +1,308 @@ +% This is +% pkrook.mf +% +% Copyright (C) 1989-92 by Elmar Bartel. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 1, or (at your option) +% any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +% + + +def MakeRookPath = + + numeric wdbotta,wdbottb,wdstem,wdtop; % The widths + numeric htbotta,htbottb,htbottc,httopa,httopb; + numeric x[]; numeric y[]; + + wdbotta:= .90 BottomWidth; + wdbottb:= .80 BottomWidth; + wdstem := .55 BottomWidth; + wdtop := .80 BottomWidth; + + htbotta:= .11BottomWidth; + htbottb:= .11BottomWidth; + htbottc:= .15BottomWidth; + httopa := .15BottomWidth; + httopb := .18BottomWidth; + + rt x1 = rt x3 = .5(qs+wdbotta); + lft x2 = lft x4 = .5(qs-wdbotta); + bot y1 = bot y2 = BottomSpace; + top y3 = top y4 = BottomSpace+htbotta; + + y5 = y6 = y4; + top y8 - bot y6 = top y7 - bot y5 = htbottb; + rt x5 = rt x7 = .5(qs+wdbottb); + lft x6 = lft x8 = .5(qs-wdbottb); + + top y9 - bot y7 = top y10 - bot y8 = htbottc; + rt x9 = rt x11 = .5(qs+wdstem); + lft x10 = lft x12 = .5(qs-wdstem); + top y13 - bot y11 = top y14 - bot y12 = httopa; + top y15 - bot y13 = top y16 - bot y14 = httopb; + top y15 = top y16 = qs - TopSpace; + rt x13 = rt x15 = .5(qs+wdtop); + lft x14 = lft x16 = .5(qs-wdtop); + + path LeftP,RightP,RookPath,SmP[]; + LeftP= z16--z14--z12--z10--z8--z6--z4--z2; + RightP= z1--z3--z5--z7--z9--z11--z13--z15; + + def RookTopPath(expr nn) = + numeric wdt; wdt = abs xpart(z15-z16)/(2nn+2); + numeric sdt; sdt = .5wdt; + pair pt,pb; + path TopP; TopP=z15; + pt = z15-(sdt,0); + bot pb = z15-(sdt,.5httopb); + for i=1 upto nn+1: + TopP:= TopP--pt--pb; + pb:= pb-(wdt,0); + pt:= pt-(wdt,0); + TopP:= TopP--pb--pt; + pb:= pb-(wdt,0); + pt:= pt-(wdt,0); + endfor; + TopP:= TopP--z16; + enddef; + + RookTopPath(2); + RookPath=RightP & TopP & LeftP -- cycle; + + SmP1= z5--z6; + SmP2= z7--z8; + SmP3= z9--z10; + SmP4= z11--z12; + SmP5= z13--z14; + + if proofing > 0: + labels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); + def PixelGrid(expr PixPerInch, w) = + if proofing > 0: + begingroup + numeric d; + d = pixels_per_inch/PixPerInch; + makegrid(0, + for i=d step d until w: ,i endfor) + (0,for i=d step d until w: ,i endfor) + endgroup; + fi; + enddef; + PixelGrid(400,qs); + fi + +enddef; +%------------------------------------------------------------ +def DrawInner = + %pickup inner_pen; + pickup chess_pen; + forsuffixes $=1,2,3,4,5: + draw SmP$; + endfor; +enddef; +%------------------------------------------------------------ +def UnDrawInner = + pickup chess_pen; + forsuffixes $=1,2,3,4,5: + undraw ShortenPath(SmP$,thin); + endfor; +enddef; +%------------------------------------------------------------ + +def MakeWhiteRook = + clearit; + draw RookPath; + DrawInner; + cullit; + WhiteMan:= currentpicture; +enddef; + +def MakeBlackRook = + clearit; + filldraw RookPath; + UnDrawInner; + cullit; + BlackMan:= currentpicture; +enddef; + +def MakeOuterShape = + clearit; + pickup frame_pen; + filldraw RookPath; + cullit; + OuterShape:= currentpicture; +enddef; + +MakeRookPath; +MakeWhiteRook; +MakeBlackRook; +MakeNeutral(WhiteMan, BlackMan); +MakeOuterShape; + +%----------------------------------------------------------------------- +beginchar(Rook+White+OnWhite, qs#, qs#, 0); + "White rook on white field"; + currentpicture:= WhiteMan; +endchar; + +beginchar(Rook+White+OnWhite+LeftTurned, qs#, qs#, 0); + "White rook on white field rotated to the left"; + currentpicture:= TurnLeft(WhiteMan); +endchar; + +beginchar(Rook+White+OnWhite+RightTurned, qs#, qs#, 0); + "White rook on white field rotated to the right"; + currentpicture:= TurnRight(WhiteMan); +endchar; + +beginchar(Rook+White+OnWhite+UpSideDown, qs#, qs#, 0); + "White rook on white field upside down"; + currentpicture:= TurnUpSideDown(WhiteMan); +endchar; + +beginchar(Rook+Black+OnWhite, qs#, qs#, 0); + "Black rook on white field"; + currentpicture:= BlackMan; +endchar; + +beginchar(Rook+Black+OnWhite+LeftTurned, qs#, qs#, 0); + "Black rook on white field rotated to the left"; + currentpicture:= TurnLeft(BlackMan); +endchar; + +beginchar(Rook+Black+OnWhite+RightTurned, qs#, qs#, 0); + "Black rook on white field rotated to the right"; + currentpicture:= TurnRight(BlackMan); +endchar; + +beginchar(Rook+Black+OnWhite+UpSideDown, qs#, qs#, 0); + "Black rook on white field upside down"; + currentpicture:= TurnUpSideDown(BlackMan); +endchar; + +beginchar(Rook+Neutral+OnWhite, qs#, qs#, 0); + "Neutral rook on white field"; + currentpicture:= NeutralMan; +endchar; + +beginchar(Rook+Neutral+OnWhite+LeftTurned, qs#, qs#, 0); + "Neutral rook on white field rotated to the left"; + currentpicture:= TurnLeft(NeutralMan); +endchar; + +beginchar(Rook+Neutral+OnWhite+RightTurned, qs#, qs#, 0); + "Neutral rook on white field rotated to the right"; + currentpicture:= TurnRight(NeutralMan); +endchar; + +beginchar(Rook+Neutral+OnWhite+UpSideDown, qs#, qs#, 0); + "Neutral rook on white field upside down"; + currentpicture:= TurnUpSideDown(NeutralMan); +endchar; + +beginchar(Rook+White+OnBlack, qs#, qs#, 0); + "White rook on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + WhiteMan; +endchar; + +beginchar(Rook+White+OnBlack+LeftTurned, qs#, qs#, 0); + "White rook on black field turned to the left"; + MakeBlackField; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(WhiteMan); +endchar; + +beginchar(Rook+White+OnBlack+RightTurned, qs#, qs#, 0); + "White rook on black field turned to the right"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(WhiteMan); +endchar; + +beginchar(Rook+White+OnBlack+UpSideDown, qs#, qs#, 0); + "White rook on black field upsidedown"; + MakeBlackField; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(WhiteMan); +endchar; + +beginchar(Rook+Neutral+OnBlack, qs#, qs#, 0); + "Neutral rook on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + NeutralMan; +endchar; + +beginchar(Rook+Neutral+OnBlack+LeftTurned, qs#, qs#, 0); + "Neutral rook on black field turned to the left"; + MakeBlackField; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(NeutralMan); +endchar; + +beginchar(Rook+Neutral+OnBlack+RightTurned, qs#, qs#, 0); + "Neutral rook on black field turned to the right"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(NeutralMan); +endchar; + +beginchar(Rook+Neutral+OnBlack+UpSideDown, qs#, qs#, 0); + "Neutral rook on black field upsidedown"; + MakeBlackField; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(NeutralMan); +endchar; + +beginchar(Rook+Black+OnBlack, qs#, qs#, 0); + "Black rook on black field"; + MakeBlackField; + currentpicture:= currentpicture - OuterShape; + cullit; + currentpicture:= currentpicture + BlackMan; +endchar; + +beginchar(Rook+Black+OnBlack+LeftTurned, qs#, qs#, 0); + "Black rook on black field turned to the left"; + MakeBlackField; + currentpicture:= currentpicture - TurnLeft(OuterShape); + cullit; + currentpicture:= currentpicture + TurnLeft(BlackMan); +endchar; + +beginchar(Rook+Black+OnBlack+RightTurned, qs#, qs#, 0); + "Black rook on black field turned to the right"; + MakeBlackField; + currentpicture:= currentpicture - TurnRight(OuterShape); + cullit; + currentpicture:= currentpicture + TurnRight(BlackMan); +endchar; + +beginchar(Rook+Black+OnBlack+UpSideDown, qs#, qs#, 0); + "Black rook on black field upsidedown"; + MakeBlackField; + currentpicture:= currentpicture - TurnUpSideDown(OuterShape); + cullit; + currentpicture:= currentpicture + TurnUpSideDown(BlackMan); +endchar; |