Debian Codegraph @

texmf-dist/fonts/source/public/genealogy/drgen.mf

raw
1 % drgen.mf
2 % D. Roegel, 20 april 1996
3 % Adapted from rsym.mf and gen.mf
4
5 cmchar "female";
6 beginchar(hex"19",x_height#+2u#,1.7x_height#-desc_depth#,desc_depth#);
7 italcorr 1/2x_height#*slant;
8 adjust_fit(if monospace: u#,u# else: 0,0 fi);
9 pickup rule.nib; autorounded;
10 lft x6=hround u; x8=good.x (.5x_height + u);
11 y6 = good.y (h-.5x_height); y8-y4=x2-x6;
12 circle_points;
13 x9 := x8;
14 numeric a; a = round .5(h+d-x_height) + eps;
15 x10=x8-a;
16 x11=x8+a;
17 y10 = y11; y11 = -d+a;
18 y9 = -desc_depth;
19 draw_circle;
20 draw z10--z11; draw z4--z9;
21 math_fit(0,ic#);
22 labels(1,2,3,4,5,6,7,8,9,10,11); endchar;
23
24 cmchar "male";
25 numeric this_size#;
26 this_size# = x_height#*(1+0.9/sqrt2);
27 beginchar(hex"1A",this_size#+1.7u#,this_size#,0);
28 italcorr this_size#*slant;
29 adjust_fit(if monospace: u#,u# else: 0,0 fi);
30 pickup rule.nib; autorounded;
31 lft x6=hround u; x2=x_height+2u-x6; y2=.5x_height; bot y4=0;
32 circle_points;
33 z9 = 1.9[z5,z1];
34 draw_circle;
35 x9 := good.x x9;
36 y9 := good.y y9;
37 x10 = x9; y11 = y9;
38 y10 = y9-3.5u; x11 = x9-3.5u;
39 draw z1--z9;
40 draw z10--z9--z11;
41 labels(1,2,3,4,5,6,7,8,9); endchar;
42
43 cmchar "Cross (death symbol)";
44 beginchar("d",9u#,.65[x_height#,asc_height#],.1(asc_height#-x_height#));
45 adjust_fit(0,0); pickup tiny.nib; light_stem=Vround .5[vair,stem];
46 pos1(stem,0); pos2(.4[hair,stem],0); pos3(stem,0);
47 %pos4(stem,90); pos5(.5[vair,stem],90); pos6(stem,90);
48 pos4(light_stem,90); pos5(.5[vair,light_stem],90); pos6(light_stem,90);
49 x1=x2=x3=.5w; top y1=h; bot y3=-d; y2=y4r;
50 y4=y5=y6; y4l=good.y .6[-d,h]; x4=good.x u; x6=r-x4; x5=x2;
51 filldraw z1l...z2l{down}...z3l--z3r...z2r{up}...z1r--cycle; % vertical stroke
52 filldraw z4l...z5l...z6l--z6r...z5r...z4r--cycle; % horizontal stroke
53 penlabels(1,2,3,4,5,6); endchar;
54
55 cmchar "Rings (marriage symbol)";
56 beginchar("m",9u#,v_center(x_height#));
57 adjust_fit(0,0); pickup tiny.nib;
58 numeric light_stem; light_stem=Vround .5[vair,stem];
59 pos1(light_stem,90); pos3(light_stem,-90);
60 pos2(light_stem,180); pos4(.3[hair,light_stem],0);
61 x1=x3=.5[x2,x4]; lft x2r=hround(-u-.5light_stem); rt x4r=hround(.6w+.5stem);
62 %top y1r=vround(h+.5light_stem); y2=y4=.5[y1,y3];
63 %bot y3r=vround(-d-.5light_stem);
64 top y1r=h; y2=y4=.5[y1,y3];
65 bot y3r=-d;
66 pos5(light_stem,90); pos7(light_stem,-90);
67 pos6(.3[hair,light_stem],180); pos8(light_stem,0);
68 x5-x1=x6-x2=x7-x3=x8-x4; rt x8r=hround(w+u+.5light_stem);
69 y5-y1=y6-y2=y7-y3=y8-y4=0;
70 filldraw stroke pulled_arc.e(1,2)&pulled_arc.e(2,3)&pulled_arc.e(3,4)
71 &pulled_arc.e(4,1); % left ring
72 filldraw stroke pulled_arc.e(5,6)&pulled_arc.e(6,7)&pulled_arc.e(7,8)
73 &pulled_arc.e(8,5); % right ring
74 penlabels(1,2,3,4,5,6,7,8); endchar;
75
76 cmchar "Five-pointed star (birth symbol)";
77 beginchar("b",9u#,v_center(x_height#));
78 adjust_fit(0,0); pickup tiny.nib;
79 numeric theta; theta=360/5; % degrees between points
80 pos0(curve,0); pos1(rule_thickness,90); x0=x1=good.x .5w;
81 top y1r=vround(math_axis+.5x_height+.5rule_thickness);
82 ypart(.5[z1,z0+(z1-z2) rotated 2theta])=math_axis;
83 pos2(curve,theta); pos3(rule_thickness,90+theta);
84 z2=z0; z3-z0=(z1-z0) rotated theta;
85 z4=whatever[z0l,z1r]=whatever[z2r,z3r];
86 filldraw for n=0 upto 4:
87 z0+(z1r-z0)rotated(n*theta)--z0+(z4-z0)rotated(n*theta)--endfor
88 cycle; % star
89 penlabels(0,1,2,3,4); endchar;
90
91 cmchar "Divided rings (divorce symbol)";
92 beginchar("1",9u#,v_center(x_height#));
93 adjust_fit(0,0); pickup tiny.nib;
94 numeric light_stem; light_stem=Vround .5[vair,stem];
95 pos11(stem,0); pos12(.4[hair,stem],0); pos13(stem,0);
96 x11=x12=x13=.5w; top y11=round 1.3h; bot y13=round(-d-.3h); y12=.6[y13,y11];
97 filldraw z11l...z12l{down}...z13l
98 --z13r...z12r{up}...z11r--cycle; % vertical stroke
99 pos1(light_stem,90); pos3(light_stem,-90);
100 pos2(light_stem,180); pos4(.3[hair,light_stem],0);
101 x1=x3=.5[x2,x4]; lft x2r=hround(-3u-.5light_stem); rt x4r=hround(.25w+.5stem);
102 top y1r=h; y2=y4=.5[y1,y3];
103 bot y3r=-d;
104 pos5(light_stem,90); pos7(light_stem,-90);
105 pos6(.3[hair,light_stem],180); pos8(light_stem,0);
106 x5-x1=x6-x2=x7-x3=x8-x4; rt x8r=hround(w+3u+.5light_stem);
107 y5-y1=y6-y2=y7-y3=y8-y4=0;
108 filldraw stroke pulled_arc.e(1,2)&pulled_arc.e(2,3)&pulled_arc.e(3,4)
109 &pulled_arc.e(4,1); % left ring
110 filldraw stroke pulled_arc.e(5,6)&pulled_arc.e(6,7)&pulled_arc.e(7,8)
111 &pulled_arc.e(8,5); % right ring
112 penlabels(1,2,3,4,5,6,7,8,11,12,13); endchar;
113
114 cmchar "Leaf";
115 beginchar("l",18u#,asc_height#,0);
116 adjust_fit(0,0); pickup pencircle scaled .6rule_thickness;
117 z1=(0,0); z2=(w,h);
118 z3=.5[z1,z2]+.25((z2-z1)rotated 90);
119 z4=.5[z1,z2]+.25((z2-z1)rotated-90);
120 path p[]; p3=z1...z3{z2-z1}...z2; p4=z1...z4{z2-z1}...z2;
121 draw p3; % upper edge
122 draw p4; % lower edge
123 draw z1 -- z2; % stem
124 z5=1/4[z1,z2]; z6=.55[z1,z2];
125 z35=p3 intersectionpoint (z5--(x5,2h));
126 z36=p3 intersectionpoint (z6--(x6,2h));
127 z45=p4 intersectionpoint (z5--(2w,y5));
128 z46=p4 intersectionpoint (z6--(2w,y6));
129 draw z35--z5--z45; % vein
130 draw z36--z6--z46; % vein
131 labels(1,2,3,4,5,6,35,36,45,46); endchar;