17jlC/dimer_font/dimer.mf
2017-09-15 16:34:06 +00:00

66 lines
921 B
Plaintext

%% half-dimer pointing up
% name, width, height, depth
beginchar("a",1.5pt#,7pt#,0);
pickup pencircle scaled 4;
x1=y1=x2=x3=0;
y2=h;
x4=-x5=-y4=-y5=w;
y3=2y4;
draw z1..z2;
draw z1..z4..z3..z5..cycle;
endchar;
%% half-dimer pointing down
beginchar("b",1.5pt#,7pt#,0);
pickup pencircle scaled 4;
x1=x2=x3=0;
y1=h-2w;
y2=-2w;
x4=-x5=w;
y4=y5=h-w;
y3=h;
draw z1..z2;
draw z1..z4..z3..z5..cycle;
endchar;
%% radius for horizontal dimers
r=1.5pt;
%% half-dimer pointing right
beginchar("c",10pt#,4.5pt#,0);
pickup pencircle scaled 4;
y1=y2=y3=h-r;
x3=0;
y4=h;
y5=h-2r;
x4=x5=r;
x1=2r;
x2=w;
draw z1..z2;
draw z1..z4..z3..z5..cycle;
endchar;
%% half-dimer pointing left
beginchar("d",10pt#,4.5pt#,0);
pickup pencircle scaled 4;
y1=y2=y3=h-r;
x3=w;
y4=h;
y5=h-2r;
x4=x5=w-r;
x1=w-2r;
x2=0;
draw z1..z2;
draw z1..z4..z3..z5..cycle;
endchar;
end