4 fet_begingroup("flags")
6 % Flags pointing down overlap with the notehead (in x-direction), so
7 % the down-flag can be bigger
8 upflag_width# = .750 black_notehead_width#;
9 downflag_width# = .833 black_notehead_width#;
12 % Flags pointing down cannot overlap with the notehead in y-direction,
13 % so they have less slant.
16 % Because of optical illusion, the utmost flag
17 % (bottom for down-pointing, top
18 % for up-pointing) should be smaller than the other flags
21 save hip_thickness, foot_thickness;
22 hip_thickness# = 1.3 stemthickness#;
23 foot_thickness# = hip_thickness#;
26 % Inspired by Adobe Sonata and [Wanske]
27 % for example, see POSTSCRIPT Language -- program design,
28 % page 119, and [Wanske], p 41,42
30 def draw_flag(expr center, flare,
31 hip_depth, hip_width, hip_thickness,
32 foot_depth, foot_width, foot_thickness, flagcut) =
36 penpos2(whatever, 40);
37 x2r - x2l = hip_thickness;
38 penpos3(foot_thickness, 0) ;
41 z2 = center + (hip_width, -flare - hip_depth);
42 z3orig = center + (foot_width, -flare - foot_depth);
43 z3 = (1-flagcut) [z2, z3orig];
46 save bot_dir, bot_path;
49 bot_path := z2{down} .. z3;
50 bot_dir := direction 1 of bot_path;
53 ..tension 1.1 .. z2l ..
54 z3l{bot_dir} .. z3r{-bot_dir} ..
55 z2r .. {up}z1r & z1r -- cycle;
60 % godbewaarme, wat een kutsymbolen
61 fet_beginchar("8th Flag (up)", "u3", "eighthflag")
64 foot_depth, foot_width;
66 flare# = 1.0 interline#;
67 hip_depth# = 8/15 foot_depth#;
68 hip_width# = upflag_width# - hip_thickness#/2;
70 foot_depth# + flare# = 3 interline#;
71 foot_width# = .8 hip_width#;
73 set_char_box(stemthickness# /2, hip_width# + hip_thickness#/2
75 flare# + foot_depth# + foot_thickness#/2, stemthickness#/2)
78 hip_depth, hip_width, hip_thickness,
79 foot_depth, foot_width, foot_thickness);
80 draw_flag((stemthickness/2,0), flare,
81 hip_depth, hip_width, hip_thickness,
82 foot_depth, foot_width, foot_thickness, 0)
85 pickup pencircle scaled stemthickness;
86 draw (0, 0) .. (0,-2 interline);
89 fet_beginchar("8th Flag (down)", "d3", "deighthflag")
92 foot_depth, foot_width;
94 flare# = 1.0 interline#;
96 hip_depth# = 8/15 foot_depth#;
97 hip_width# = downflag_width# - hip_thickness#/2;
99 % 2.9 -> don't intersect staffline at foot
100 foot_depth# + flare# = 2.85 interline#;
101 foot_width# = .82 hip_width#;
103 set_char_box(stemthickness# /2, hip_width# + hip_thickness#/2
105 flare# + foot_depth# + foot_thickness#/2, stemthickness#/2)
108 hip_depth, hip_width, hip_thickness,
109 foot_depth, foot_width, foot_thickness);
111 draw_flag((stemthickness/2,0),flare,
112 hip_depth, hip_width, hip_thickness,
113 foot_depth, foot_width, foot_thickness, 0);
114 pickup pencircle scaled stemthickness;
115 draw (0, 0) .. (0,-2 interline);
121 fet_beginchar("16th Flag (up)", "u4", "sixteenthflag")
122 save flare, flagspace,
123 hip_depth, hip_width,
124 foot_depth, foot_width;
126 flare# = 0.85 interline#;
127 flagspace# = .85 interline#;
128 hip_depth# = 8/15 foot_depth#;
130 flagspace# + flare# + foot_depth# = 3.5 interline#;
132 hip_width# = upflag_width# - hip_thickness#/2;
133 foot_width# = .8 hip_width#;
135 set_char_box(stemthickness# /2, hip_width# + hip_thickness#/2
137 3.5 interline#, stemthickness#/2)
139 define_pixels(flagspace);
141 hip_depth, hip_width, hip_thickness,
142 foot_depth, foot_width, foot_thickness);
144 draw_flag((stemthickness/2, 0),flare,
145 1.2 hip_depth, .97 hip_width, hip_thickness,
146 foot_depth, .9 foot_width, foot_thickness, 0.5);
147 draw_flag((stemthickness/2, -flagspace),flare,
148 hip_depth, hip_width, hip_thickness,
149 foot_depth, foot_width, foot_thickness, 0);
151 pickup pencircle scaled stemthickness;
152 draw (0, 0) .. (0,-2 interline);
157 fet_beginchar("16th Flag (down)", "d4", "dsixteenthflag")
158 save flare, flagspace,
159 hip_depth, hip_width,
160 foot_depth, foot_width;
162 flare# = 0.87 interline#;
163 flagspace# = .9 interline#;
164 hip_depth# = .7 foot_depth#;
166 flagspace# + flare# + foot_depth# = 3 interline#;
168 hip_width# = downflag_width# - hip_thickness#/2;
170 foot_width# = 1.00 hip_width#;
172 set_char_box(stemthickness# /2, hip_width# + hip_thickness#/2
174 3 interline#, stemthickness#/2)
176 define_pixels(flagspace);
178 hip_depth, hip_width, hip_thickness,
179 foot_depth, foot_width, foot_thickness);
181 draw_flag((stemthickness/2, 0),flare,
182 hip_depth, .97 hip_width, hip_thickness,
183 1.2 foot_depth, .95 foot_width, foot_thickness, 0.0);
185 draw_flag((stemthickness/2, -flagspace),flare,
186 hip_depth, hip_width, hip_thickness,
187 foot_depth, foot_width, foot_thickness, 0);
189 pickup pencircle scaled stemthickness;
190 draw (0, 0) .. (0,-2 interline);
195 fet_beginchar("32nd Flag (up)", "u5", "thirtysecondflag")
196 save flare, flagspace,
197 hip_depth, hip_width,
198 foot_depth, foot_width;
200 flare# = 0.85 interline#;
201 flagspace# = .87 interline#;
202 hip_depth# = 8/15 foot_depth#;
204 2 flagspace# + flare# + foot_depth# = 4.25 interline#;
206 hip_width# = upflag_width# - hip_thickness#/2;
207 foot_width# = .8 hip_width#;
209 set_char_box(stemthickness# /2, hip_width# + hip_thickness#/2
211 4.25 interline#, stemthickness#/2)
213 define_pixels(flagspace);
215 hip_depth, hip_width, hip_thickness,
216 foot_depth, foot_width, foot_thickness);
218 draw_flag((stemthickness/2, 0),flare,
219 1.25 hip_depth, .95 hip_width, hip_thickness,
220 .85 foot_depth, 1.1 foot_width, foot_thickness, 0.0);
221 draw_flag((stemthickness/2, -flagspace),flare,
222 1.2 hip_depth, .97 hip_width, hip_thickness,
223 foot_depth, .9 foot_width, foot_thickness, 0.37);
224 draw_flag((stemthickness/2, -2 flagspace),flare,
225 1.1 hip_depth, hip_width, hip_thickness,
226 foot_depth, 1.15 foot_width, foot_thickness, 0);
228 pickup pencircle scaled stemthickness;
229 draw (0, 0) .. (0,-3 interline);
235 fet_beginchar("32nd Flag (up)", "d5", "dthirtysecondflag")
236 save flare, flagspace,
237 hip_depth, hip_width,
238 foot_depth, foot_width;
240 flare# = 0.85 interline#;
241 flagspace# = .85 interline#;
242 hip_depth# = .57 foot_depth#;
243 foot_width# = 1.0 hip_width#;
245 2 flagspace# + flare# + foot_depth# = 3.85 interline#;
246 hip_width# = upflag_width# - hip_thickness#/2;
249 set_char_box(stemthickness# /2, hip_width# + hip_thickness#/2
251 3.85 interline#, stemthickness#/2)
253 define_pixels(flagspace);
255 hip_depth, hip_width, hip_thickness,
256 foot_depth, foot_width, foot_thickness);
258 draw_flag((stemthickness/2, 0),flare,
259 1.3 hip_depth, .93 hip_width, hip_thickness,
260 foot_depth, .9 foot_width, foot_thickness, 0.0);
261 draw_flag((stemthickness/2, -flagspace),flare,
262 1.15 hip_depth, .97 hip_width, hip_thickness,
263 foot_depth, .95 foot_width, foot_thickness, 0.0);
264 draw_flag((stemthickness/2, -2 flagspace),flare,
265 1.0 hip_depth, hip_width, .95 hip_thickness,
266 foot_depth, foot_width, .93 foot_thickness, 0);
268 pickup pencircle scaled stemthickness;
269 draw (0, 0) .. (0,-3 interline);
273 fet_beginchar("64th Flag (up)", "u6", "sixtyfourthflag")
274 save flare, flagspace,
275 hip_depth, hip_width,
276 foot_depth, foot_width;
278 flare# = 0.85 interline#;
279 flagspace# = .9 interline#;
280 hip_depth# = 8/15 foot_depth#;
282 3 flagspace# + flare# + foot_depth# = 5.25 interline#;
284 hip_width# = upflag_width# - hip_thickness#/2;
285 foot_width# = .8 hip_width#;
287 set_char_box(stemthickness# /2, hip_width# + hip_thickness#/2
289 5.25 interline#, stemthickness#/2)
291 define_pixels(flagspace);
293 hip_depth, hip_width, hip_thickness,
294 foot_depth, foot_width, foot_thickness);
296 draw_flag((stemthickness/2, 0),flare,
297 1.25 hip_depth, .95 hip_width, hip_thickness,
298 .85 foot_depth, 1.1 foot_width, foot_thickness, 0.0);
299 draw_flag((stemthickness/2, -flagspace),flare,
300 1.2 hip_depth, .97 hip_width, hip_thickness,
301 foot_depth, .9 foot_width, foot_thickness, 0.37);
302 draw_flag((stemthickness/2, -2flagspace),flare,
303 1.2 hip_depth, .97 hip_width, hip_thickness,
304 foot_depth, .9 foot_width, foot_thickness, 0.37);
305 draw_flag((stemthickness/2, -3 flagspace),flare,
306 1.1 hip_depth, hip_width, hip_thickness,
307 foot_depth, 1.15 foot_width, foot_thickness, 0);
309 pickup pencircle scaled stemthickness;
310 draw (0, 0) .. (0,-5 interline);
315 fet_beginchar("64th Flag (down)", "d6", "dsixtyfourthflag")
316 save flare, flagspace,
317 hip_depth, hip_width,
318 foot_depth, foot_width;
320 flare# = 0.85 interline#;
321 flagspace# = .9 interline#;
322 hip_depth# = .57 foot_depth#;
323 foot_width# = 1.0 hip_width#;
327 3 flagspace# + flare# + hip_depth# +
328 (foot_depth# - hip_depth#) * (1-lastcut) = 4.35 interline#;
329 hip_width# = upflag_width# - hip_thickness#/2;
332 set_char_box(stemthickness# /2, hip_width# + hip_thickness#/2
334 4.35 interline#, stemthickness#/2)
336 define_pixels(flagspace);
338 hip_depth, hip_width, hip_thickness,
339 foot_depth, foot_width, foot_thickness);
341 draw_flag((stemthickness/2, 0),flare,
342 1.33 hip_depth, .92 hip_width, hip_thickness,
343 1.15 foot_depth, .9 foot_width, foot_thickness, 0.0);
344 draw_flag((stemthickness/2, -flagspace),flare,
345 1.15 hip_depth, .97 hip_width, hip_thickness,
346 1.14 foot_depth, .92 foot_width, foot_thickness, 0.0);
347 draw_flag((stemthickness/2, -2 flagspace),flare,
348 1.15 hip_depth, .97 hip_width, hip_thickness,
349 1.12 foot_depth, .95 foot_width, foot_thickness, 0.0);
350 draw_flag((stemthickness/2, -3flagspace),flare,
351 1.0 hip_depth, hip_width, .95 hip_thickness,
352 foot_depth, foot_width, .93 foot_thickness, lastcut);
354 pickup pencircle scaled stemthickness;
355 draw (0, 0) .. (0,-5 interline);
360 fet_endgroup("flags");