summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/fonts/source/public/skak/skakf10.mf
blob: d3adce449bbebda2d278489b93c2ab49ce24854b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
% This is `skakf10.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, d#, 0.9d#, .1d#);
      pickup pencircle scaled hairline; %gg
      hairline_pen:=savepen; %gg
	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);
   endchar;
enddef;

def narrow_figurine(expr code) =
   beginchar(code, 0.8d#, 0.9d#, .1d#);
      pickup pencircle scaled hairline; %gg
      hairline_pen:=savepen; %gg
	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);
   endchar;
enddef;

M=1; % number of squares
d#:=10pt#/M;   %10pt#/M;   % size per square
lift=0.08;
hairline#:=.30pt#; %gg
thin#:=1/3pt#; 
middle#:=1/2pt#; 
thick#:=5/6pt#; 
define_blacker_pixels(hairline, thin, middle, thick); %gg added hairline???
light=0; dark=1; white=0; black=1;
background:=light; color:=white;

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

input skakinf;

end;