% This is `chess10f.mf' version 1.2 as of 6/91 % METAfounded by Piet Tutelaers (internet: rcpt@urc.tue.nl) % Same font as `chessf10.mf' but knight looks to the right side % instead of left side according with the recommation of FIDE % Frank Hassel % generates a font consisting of chess figurines mode_setup; input chessbase; vardef N(expr D, col, row) = clearxy; path knight, ear, eye, nose, mouth, neck; def moved = scaled D shifted (col*D, row*D) enddef; pickup thin_pen; % the knight's contour z1=(1-.5,.82); z2=(1-.5,.075); z11=(1-.45,.93); z12=(1-.375,.85); z13=(1-.25,.925); z14=(1-.26,.8); z15=(1-.22,.75); z16=(1-.18,.7); z17=(1-.18,.66); z18=(1-.07,.42); z19=(1-.07,.36); z20=(1-.14,.3); z21=(1-.17,.3); z22=(1-.175,.275); z23=(1-.225,.28); z24=(1-.29,.38); z25=(1-.41,.46); z26=(1-.49,.51); z27=(1-.435,.295); z28=(1-.32,.165); z29=(1-.31,y2); z30=(1-.93,y2); z31=(1-.87,.5); z32=(1-.7,.78); knight = ((z1--z11--z12--z13--z14) & (z14..z15..z16..z17..z18..z19..z20..z21) & (z21..z22..z23..z24..z25..z26) & (z26..z27..z28..z29) & (z29--z30) & (z30..z31..z32..z1)& cycle); % draw contour of knight erase fill knight moved; draw knight moved; % draw inner parts z4=(1-.22,.62); z41=(1-.25,.67); z42=(1-.29,.705); z43=(1-.31,.7); z44=(1-.3,.68); eye = (z4..z41..z42..z43 & z43..z44..z4 & cycle); z5=(1-.1,.36); z51=(1-.1,.39); z52=(1-.135,.43); z53=(1-.15,.4); z54=(1-.13,.38); nose = (z5..z51..z52..z53..z54..z5 & cycle); z21'=(1-.2,.34); draw (z21'--z21) moved; %mouth z26'=(1-.54,.63); draw (z26'..z26{z24-z26}) moved; %neck draw (z12--z14) moved; % ear fill eye moved; fill nose moved; enddef; def figurine(expr code) = beginchar(code, d#, 1d#, 0d#); pickup pencircle scaled thin; thin_pen:=savepen ; % for drawing pieces pickup pencircle scaled thick; thick_pen:=savepen; % for drawing inside pieces define_whole_pixels(d); scantokens code(d, 0, -0.08); endchar; enddef; M=1; % number of squares d#:=10pt#/M; % size per square thin#:=1/3pt#; thick#:=5/6pt#; define_blacker_pixels(thin, thick); light=0; dark=1; white=0; black=1; background:=light; color:=white; figurine("K"); figurine("Q"); figurine("R"); figurine("B"); figurine("N"); figurine("p"); end;