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
61 pickup pencircle xscaled accreg_linethickness yscaled lt;
73 pickup penrazor scaled lt rotated 90;
75 top z5 = pat intersectionpoint ((0, lh + lt) -- (w, lh + lt));
77 bot z7 = pat intersectionpoint ((0, 2 lh) -- (w, 2 lh));
89 fet_beginchar ("accDot", "accDot")
90 set_char_box (accreg_dot_size# / 2, accreg_dot_size# / 2,
91 accreg_dot_size# / 2, accreg_dot_size# / 2);
93 pickup pencircle scaled accreg_dot_size;
95 rt x0 = hround (accreg_dot_size / 2);
96 top y0 = vround (accreg_dot_size / 2);
102 fet_beginchar ("accFreebase", "accFreebase")
108 set_char_box (r# + accreg_linethickness# / 2,
109 r# + accreg_linethickness# / 2,
110 0, 2 r# + 0.7 accreg_linethickness#);
113 lt = vround (0.7 accreg_linethickness);
116 b := w := (2 lh + hround accreg_linethickness) / 2;
118 penpos1 (hround accreg_linethickness, 0);
120 penpos3 (accreg_linethickness, 180);
128 penlabels (1, 2, 3, 4);
130 % mf doesn't handle pixel dropouts in outline objects, so we use
131 % `draw' if not called by mpost
144 pickup pencircle xscaled accreg_linethickness yscaled lt;
152 pickup penrazor scaled lt rotated 90;
159 fet_beginchar ("accStdbase", "accStdbase")
166 set_char_box (r# + accreg_linethickness# / 2,
167 r# + accreg_linethickness# / 2,
168 0, 2 r# + 0.7 accreg_linethickness#);
171 lt = vround (0.7 accreg_linethickness);
174 b := w := (4 lh + hround accreg_linethickness) / 2;
176 penpos1 (hround accreg_linethickness, 0);
178 penpos3 (hround accreg_linethickness, 180);
186 penlabels (1, 2, 3, 4);
188 % mf doesn't handle pixel dropouts in outline objects, so we use
189 % `draw' if not called by mpost
202 pickup pencircle xscaled accreg_linethickness yscaled lt;
214 pickup penrazor scaled lt rotated 90;
216 top z5 = pat intersectionpoint ((0, lh + lt) -- (w, lh + lt));
218 bot z7 = pat intersectionpoint ((0, 3 lh) -- (w, 3 lh));
232 fet_beginchar ("accBayanbase", "accBayanbase")
235 lh = vround accreg_lh;
236 lt = vround accreg_linethickness;
238 set_char_box (accreg_lh# + accreg_linethickness# / 2,
239 accreg_lh# + accreg_linethickness# / 2,
240 0, 3 accreg_lh# + accreg_linethickness#);
244 draw_rounded_block ((-w, 0), (-w + lt, h), lt);
245 draw_rounded_block ((w - lt, 0), (w, h), lt);
247 pickup penrazor scaled lt rotated 90;
249 bot z1 = (-w + lt / 2, 0);
250 bot z2 = (-w + lt / 2, lh);
251 bot z3 = (-w + lt / 2, 2 lh);
252 bot z4 = (-w + lt / 2, 3 lh);
254 bot z5 = (w - lt / 2, 0);
255 bot z6 = (w - lt / 2, lh);
256 bot z7 = (w - lt / 2, 2 lh);
257 bot z8 = (w - lt / 2, 3 lh);
270 def def_B (expr w, h) =
271 pickup pencircle scaled 0.15 linethickness;
273 penpos10 (thin, -90);
274 penpos11 (thin, -90);
279 penpos15 (thick, 180);
280 penpos16 (thin, -90);
281 penpos17 (thin, -90);
287 z12 = (w, .5 mb * h);
288 z13 = (cTwo * w, mb * h);
289 z14 = (2 thick, mb * h);
290 z15 = (.94 w, h - .5 mt * h);
291 z16 = z13 + (0, mt * h);
293 z18 = (1.5 thick, 0);
294 z19 = (1.5 thick, h);
298 def def_S (expr w, h) =
299 pickup pencircle scaled 0.03 linethickness;
304 penpos4 (.5 thick, 90);
313 z3 = (w - .5 thick, .5 mb * h);
314 z4 = (w / 2, mb * h);
315 z5 = (.5 thick, h - .5 mt * h);
326 t := xpart (bue intersectiontimes (z8l -- z7l));
328 bueoverst := z6{right}
334 save hs, mb, mt, thin, thick, height, width, cOne, cTwo;
337 width = .8 (4 staff_space);
338 height = 2.4 staff_space;
339 % URG. smaller sizes should be wider and fatter
340 % thin = 0.05 staff_space;
341 % thick = 0.2 staff_space;
345 fatten := designsize * hx + bx * 1.2;
346 thick := 0.2 staff_space * fatten;
348 % urg: mustn't ever go thinner than blot!
349 thin# := blot_diameter#;
350 define_pixels (thin);
352 hs = 0.4 staff_space;
360 fet_beginchar ("accOldEE", "accOldEE")
361 save r, pp, ir, lh, lt, stroke_width;
366 lr = .4 staff_space - linethickness;
368 stroke_width = .05 staff_space + .5 linethickness;
370 set_char_box (r# + accreg_linethickness# / 2,
371 r# + accreg_linethickness# / 2,
372 0, 2 r# + 0.7 accreg_linethickness#);
378 penpos1 (blot_diameter, 0);
379 penpos2 (stroke_width + blot_diameter, 0);
380 penpos3 (stroke_width + blot_diameter, 0);
382 pickup pencircle scaled (lr + blot_diameter);
384 for pp := 0 step 45 until 135:
385 drawdot z2 rotated pp;
386 drawdot z3 rotated pp;
393 pickup pencircle scaled lr;
397 currentpicture := currentpicture shifted (0, h / 2);
400 lt = vround (0.7 accreg_linethickness);
403 b := w := (lh + hround accreg_linethickness) / 2;
405 penpos10 (hround accreg_linethickness, 0);
407 penpos12 (hround accreg_linethickness, 180);
415 % penlabels (1, 2, 10, 11, 12, 13);
417 % mf doesn't handle pixel dropouts in outline objects, so we use
418 % `draw' if not called by mpost
431 pickup pencircle xscaled accreg_linethickness yscaled lt;
441 fet_endgroup ("accordion");