3 fet_begingroup ("accordion");
7 % These dimensions are the same for all register symbols.
8 % The different symbols should calculate their other dimensions from them.
11 accreg_dot_size# := .5 staff_space#;
12 accreg_linethickness# := 1.3 stafflinethickness#;
13 accreg_lh# := 1.0 staff_space#;
15 define_pixels (accreg_dot_size, accreg_linethickness, accreg_lh);
18 fet_beginchar ("accDiscant", "accDiscant")
25 set_char_box (r# + accreg_linethickness# / 2,
26 r# + accreg_linethickness# / 2,
27 0, 2 r# + 0.7 accreg_linethickness#);
30 lt = vround (0.7 accreg_linethickness);
33 b := w := (3 lh + hround accreg_linethickness) / 2;
35 penpos1 (hround accreg_linethickness, 0);
37 penpos3 (hround accreg_linethickness, 180);
45 penlabels (1, 2, 3, 4);
47 % mf doesn't handle pixel dropouts in outline objects, so we use
48 % `draw' if not called by mpost
56 pickup pencircle xscaled accreg_linethickness yscaled lt;
68 pickup penrazor scaled lt rotated 90;
70 top z5 = pat intersectionpoint ((0, lh + lt) -- (w, lh + lt));
72 bot z7 = pat intersectionpoint ((0, 2 lh) -- (w, 2 lh));
84 fet_beginchar ("accDot", "accDot")
85 set_char_box (accreg_dot_size# / 2, accreg_dot_size# / 2,
86 accreg_dot_size# / 2, accreg_dot_size# / 2);
88 pickup pencircle scaled accreg_dot_size;
90 rt x0 = hround (accreg_dot_size / 2);
91 top y0 = vround (accreg_dot_size / 2);
97 fet_beginchar ("accFreebase", "accFreebase")
103 set_char_box (r# + accreg_linethickness# / 2,
104 r# + accreg_linethickness# / 2,
105 0, 2 r# + 0.7 accreg_linethickness#);
108 lt = vround (0.7 accreg_linethickness);
111 b := w := (2 lh + hround accreg_linethickness) / 2;
113 penpos1 (hround accreg_linethickness, 0);
115 penpos3 (accreg_linethickness, 180);
123 penlabels (1, 2, 3, 4);
125 % mf doesn't handle pixel dropouts in outline objects, so we use
126 % `draw' if not called by mpost
134 pickup pencircle xscaled accreg_linethickness yscaled lt;
142 pickup penrazor scaled lt rotated 90;
149 fet_beginchar ("accStdbase", "accStdbase")
156 set_char_box (r# + accreg_linethickness# / 2,
157 r# + accreg_linethickness# / 2,
158 0, 2 r# + 0.7 accreg_linethickness#);
161 lt = vround (0.7 accreg_linethickness);
164 b := w := (4 lh + hround accreg_linethickness) / 2;
166 penpos1 (hround accreg_linethickness, 0);
168 penpos3 (hround accreg_linethickness, 180);
176 penlabels (1, 2, 3, 4);
178 % mf doesn't handle pixel dropouts in outline objects, so we use
179 % `draw' if not called by mpost
187 pickup pencircle xscaled accreg_linethickness yscaled lt;
199 pickup penrazor scaled lt rotated 90;
201 top z5 = pat intersectionpoint ((0, lh + lt) -- (w, lh + lt));
203 bot z7 = pat intersectionpoint ((0, 3 lh) -- (w, 3 lh));
217 fet_beginchar ("accBayanbase", "accBayanbase")
220 lh = vround accreg_lh;
221 lt = vround accreg_linethickness;
223 set_char_box (accreg_lh# + accreg_linethickness# / 2,
224 accreg_lh# + accreg_linethickness# / 2,
225 0, 3 accreg_lh# + accreg_linethickness#);
229 draw_rounded_block ((-w, 0), (-w + lt, h), lt);
230 draw_rounded_block ((w - lt, 0), (w, h), lt);
232 pickup penrazor scaled lt rotated 90;
234 bot z1 = (-w + lt / 2, 0);
235 bot z2 = (-w + lt / 2, lh);
236 bot z3 = (-w + lt / 2, 2 lh);
237 bot z4 = (-w + lt / 2, 3 lh);
239 bot z5 = (w - lt / 2, 0);
240 bot z6 = (w - lt / 2, lh);
241 bot z7 = (w - lt / 2, 2 lh);
242 bot z8 = (w - lt / 2, 3 lh);
255 def def_B (expr w, h) =
256 pickup pencircle scaled 0.15 linethickness;
258 penpos10 (thin, -90);
259 penpos11 (thin, -90);
264 penpos15 (thick, 180);
265 penpos16 (thin, -90);
266 penpos17 (thin, -90);
272 z12 = (w, .5 mb * h);
273 z13 = (cTwo * w, mb * h);
274 z14 = (2 thick, mb * h);
275 z15 = (.94 w, h - .5 mt * h);
276 z16 = z13 + (0, mt * h);
278 z18 = (1.5 thick, 0);
279 z19 = (1.5 thick, h);
283 def def_S (expr w, h) =
284 pickup pencircle scaled 0.03 linethickness;
289 penpos4 (.5 thick, 90);
298 z3 = (w - .5 thick, .5 mb * h);
299 z4 = (w / 2, mb * h);
300 z5 = (.5 thick, h - .5 mt * h);
311 t := xpart (bue intersectiontimes (z8l -- z7l));
313 bueoverst := z6{right}
319 save hs, mb, mt, thin, thick, height, width, cOne, cTwo;
322 width = .8 (4 staff_space);
323 height = 2.4 staff_space;
324 % URG. smaller sizes should be wider and fatter
325 % thin = 0.05 staff_space;
326 % thick = 0.2 staff_space;
330 fatten := designsize * hx + bx * 1.2;
331 thick := 0.2 staff_space * fatten;
333 % urg: mustn't ever go thinner than blot!
334 thin# := blot_diameter#;
335 define_pixels (thin);
337 hs = 0.4 staff_space;
345 fet_beginchar ("accOldEE", "accOldEE")
346 save r, pp, ir, lh, lt, stroke_width;
351 lr = .4 staff_space - linethickness;
353 stroke_width = .05 staff_space + .5 linethickness;
355 set_char_box (r# + accreg_linethickness# / 2,
356 r# + accreg_linethickness# / 2,
357 0, 2 r# + 0.7 accreg_linethickness#);
363 penpos1 (blot_diameter, 0);
364 penpos2 (stroke_width + blot_diameter, 0);
365 penpos3 (stroke_width + blot_diameter, 0);
367 pickup pencircle scaled (lr + blot_diameter);
369 for pp := 0 step 45 until 180:
370 drawdot z2 rotated pp;
371 drawdot z3 rotated pp;
378 pickup pencircle scaled lr;
382 currentpicture := currentpicture shifted (0, h / 2);
385 lt = vround (0.7 accreg_linethickness);
388 b := w := (lh + hround accreg_linethickness) / 2;
390 penpos10 (hround accreg_linethickness, 0);
392 penpos12 (hround accreg_linethickness, 180);
400 % penlabels (1, 2, 10, 11, 12, 13);
402 % mf doesn't handle pixel dropouts in outline objects, so we use
403 % `draw' if not called by mpost
411 pickup pencircle xscaled accreg_linethickness yscaled lt;
421 fet_endgroup ("accordion");