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 = p intersectionpoint ((0, lh + lt) -- (w, lh + lt));
72 bot z7 = p 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")
104 set_char_box (r# + accreg_linethickness# / 2,
105 r# + accreg_linethickness# / 2,
106 0, 2 r# + 0.7 accreg_linethickness#);
109 lt = vround (0.7 accreg_linethickness);
112 b := w := (2 lh + hround accreg_linethickness) / 2;
114 penpos1 (hround accreg_linethickness, 0);
116 penpos3 (accreg_linethickness, 180);
124 penlabels (1, 2, 3, 4);
126 % mf doesn't handle pixel dropouts in outline objects, so we use
127 % `draw' if not called by mpost
135 pickup pencircle xscaled accreg_linethickness yscaled lt;
143 pickup penrazor scaled lt rotated 90;
150 fet_beginchar ("accStdbase", "accStdbase")
157 set_char_box (r# + accreg_linethickness# / 2,
158 r# + accreg_linethickness# / 2,
159 0, 2 r# + 0.7 accreg_linethickness#);
162 lt = vround (0.7 accreg_linethickness);
165 b := w := (4 lh + hround accreg_linethickness) / 2;
167 penpos1 (hround accreg_linethickness, 0);
169 penpos3 (hround accreg_linethickness, 180);
177 penlabels (1, 2, 3, 4);
179 % mf doesn't handle pixel dropouts in outline objects, so we use
180 % `draw' if not called by mpost
188 pickup pencircle xscaled accreg_linethickness yscaled lt;
200 pickup penrazor scaled lt rotated 90;
202 top z5 = p intersectionpoint ((0, lh + lt) -- (w, lh + lt));
204 bot z7 = p intersectionpoint ((0, 3 lh) -- (w, 3 lh));
218 fet_beginchar ("accBayanbase", "accBayanbase")
221 lh = vround accreg_lh;
222 lt = vround accreg_linethickness;
224 set_char_box (accreg_lh# + accreg_linethickness# / 2,
225 accreg_lh# + accreg_linethickness# / 2,
226 0, 3 accreg_lh# + accreg_linethickness#);
230 draw_rounded_block ((-w, 0), (-w + lt, h), lt);
231 draw_rounded_block ((w - lt, 0), (w, h), lt);
233 pickup penrazor scaled lt rotated 90;
235 bot z1 = (-w + lt / 2, 0);
236 bot z2 = (-w + lt / 2, lh);
237 bot z3 = (-w + lt / 2, 2 lh);
238 bot z4 = (-w + lt / 2, 3 lh);
240 bot z5 = (w - lt / 2, 0);
241 bot z6 = (w - lt / 2, lh);
242 bot z7 = (w - lt / 2, 2 lh);
243 bot z8 = (w - lt / 2, 3 lh);
256 def def_B (expr w, h) =
257 pickup pencircle scaled 0.15 linethickness;
259 penpos10 (thin, -90);
260 penpos11 (thin, -90);
265 penpos15 (thick, 180);
266 penpos16 (thin, -90);
267 penpos17 (thin, -90);
273 z12 = (w, .5 mb * h);
274 z13 = (cTwo * w, mb * h);
275 z14 = (2 thick, mb * h);
276 z15 = (.94 w, h - .5 mt * h);
277 z16 = z13 + (0, mt * h);
279 z18 = (1.5 thick, 0);
280 z19 = (1.5 thick, h);
284 def def_S (expr w, h) =
285 pickup pencircle scaled 0.03 linethickness;
290 penpos4 (.5 thick, 90);
299 z3 = (w - .5 thick, .5 mb * h);
300 z4 = (w / 2, mb * h);
301 z5 = (.5 thick, h - .5 mt * h);
312 t := xpart (bue intersectiontimes (z8l -- z7l));
314 bueoverst := z6{right}
320 save hs, mb, mt, thin, thick, height, width, cOne, cTwo;
323 width = .8 (4 staff_space);
324 height = 2.4 staff_space;
325 % URG. smaller sizes should be wider and fatter
326 % thin = 0.05 staff_space;
327 % thick = 0.2 staff_space;
331 fatten := designsize * hx + bx * 1.2;
332 thick := 0.2 staff_space * fatten;
334 % urg: mustn't ever go thinner than blot!
335 thin# := blot_diameter#;
336 define_pixels (thin);
338 hs = 0.4 staff_space;
346 fet_beginchar ("accOldEE", "accOldEE")
347 save r, pp, ir, lh, lt, stroke_width;
352 lr = .4 staff_space - linethickness;
354 stroke_width = .05 staff_space + .5 linethickness;
356 set_char_box (r# + accreg_linethickness# / 2,
357 r# + accreg_linethickness# / 2,
358 0, 2 r# + 0.7 accreg_linethickness#);
363 penpos1 (blot_diameter, 0);
364 penpos2 (stroke_width + blot_diameter, 0);
366 pickup pencircle scaled (lr + blot_diameter);
368 for pp := 0 step 45 until 360:
369 drawdot (0, 0) shifted (ir * (dir pp));
375 pickup pencircle scaled lr;
379 currentpicture := currentpicture shifted (0, h / 2);
382 lt = vround (0.7 accreg_linethickness);
385 b := w := (lh + hround accreg_linethickness) / 2;
387 penpos3 (hround accreg_linethickness, 0);
389 penpos5 (hround accreg_linethickness, 180);
397 % penlabels (1, 2, 3, 4, 5, 6);
399 % mf doesn't handle pixel dropouts in outline objects, so we use
400 % `draw' if not called by mpost
408 pickup pencircle xscaled accreg_linethickness yscaled lt;
419 fet_endgroup ("accordion");