| 1 |
% This is `chessf10.mf' version 1.2 as of 6/91 |
| 2 |
% METAfounded by Piet Tutelaers (internet: [email protected]) |
| 3 |
|
| 4 |
% generates a font consisting of chess figurines |
| 5 |
|
| 6 |
mode_setup; |
| 7 |
input chessbase; |
| 8 |
|
| 9 |
def figurine(expr code) = |
| 10 |
beginchar(code, d#, .8d#, .2d#); |
| 11 |
pickup pencircle scaled thin; |
| 12 |
thin_pen:=savepen ; % for drawing pieces |
| 13 |
pickup pencircle scaled thick; |
| 14 |
thick_pen:=savepen; % for drawing inside pieces |
| 15 |
define_whole_pixels(d); |
| 16 |
scantokens code(d, 0, -.2); |
| 17 |
endchar; |
| 18 |
enddef; |
| 19 |
|
| 20 |
M=1; % number of squares |
| 21 |
d#:=10pt#/M; % size per square |
| 22 |
thin#:=1/3pt#; thick#:=5/6pt#; define_blacker_pixels(thin, thick); |
| 23 |
light=0; dark=1; white=0; black=1; |
| 24 |
background:=light; color:=white; |
| 25 |
|
| 26 |
figurine("K"); |
| 27 |
figurine("Q"); |
| 28 |
figurine("R"); |
| 29 |
figurine("B"); |
| 30 |
figurine("N"); |
| 31 |
figurine("p"); |
| 32 |
|
| 33 |
end; |