% This is `skakf10b.mf' version 1.0 as of 6/99
% based on original work by Piet Tutelaers

% Informator symbols added
% by Dirk Baechle, dl9obn@darc.de <2002-11-06>

% generates a font consisting of chess figurines

mode_setup;
font_size 10pt#;

u#:=10pt#;

input skakbase;

def figurine(expr code) =
   beginchar(code, 1.0d#, .8d#, .2d#);
        pickup pencircle scaled fine;
	hairline_pen:=savepen;
	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);
        figshift:=0;
	scantokens code(d, 0, -.2);
	currentpicture:=currentpicture shifted (0,liftfig#);
   endchar;
enddef;

def narrow_figurine(expr code) =
   beginchar(code, 0.8d#, .8d#, .2d#);
        pickup pencircle scaled fine;
	hairline_pen:=savepen;
	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);
        figshift:=-0.1;
	scantokens code(d, 0, -.2);
	currentpicture:=currentpicture shifted (0,liftfig#);
   endchar;
enddef;

M=1; % number of squares
d#:=10pt#/M;   % size per square
lift=0.08;
thin#:=.47pt#;
middle#:=.7pt#;
fine#:=9/10thin#;
thick#:=5/6pt#;
define_blacker_pixels(fine, thin, middle, thick);
light=0; dark=1; white=0; black=1;
background:=light; color:=white;

liftfig#:=0d#;

narrow_figurine("K");
narrow_figurine("R");
narrow_figurine("B");
figurine("N");
figurine("p");
figurine("Q");

input skakinf;

end;

