]> git.donarmstrong.com Git - lilypond.git/blob - mf/parmesan-scripts.mf
First fixes to make mf2pt1 run successfully.
[lilypond.git] / mf / parmesan-scripts.mf
1 % -*-Fundamental-*-
2 % parmesan-scripts.mf -- implement ancient script symbols
3
4 % source file of LilyPond's pretty-but-neat music font
5
6 % (c) 2002--2006 Juergen Reuter <reuter@ipd.uka.de>
7
8
9 fet_begingroup ("scripts")
10
11 fet_beginchar("ictus", "ictus")
12         save ht, wd;
13         ht# = .35 staff_space#;
14         wd# = linethickness#;
15         define_pixels(wd, ht);
16         pickup pencircle
17                 xscaled wd
18                 yscaled blot_diameter;
19         set_char_box(wd#/2, wd#/2, ht#/2, ht#/2);
20         x1 = 0; top y1 = ht/2;
21         x2 = 0; bot y2 = -ht/2;
22         draw z1 -- z2;
23 fet_endchar;
24
25
26 def draw_accentus =
27         save thick, thin, ht, wd;
28         thin# = 1 linethickness#;
29         thick# = 1.2 linethickness#;
30         ht# = .35 staff_space#;
31         wd# = .25 staff_space#;
32         define_pixels(wd, ht, thin, thick);
33         z1 = z2 = (-wd/2 + thin/2, -ht/2 + thin/2);
34         z3 = z4 = (wd/2 - thick/2, ht/2 - thick/2);
35         penpos1(thin, angle(z1-z3));
36         penpos2(thin, angle(z1-z3)+90);
37         penpos3(thick, angle(z3-z1)+90);
38         penpos4(thick, angle(z3-z1));
39         fill z1r .. z2r -- z3l .. z4r .. z3r -- z2l .. cycle;
40         set_char_box(wd#/2, wd#/2, ht#/2, ht#/2);
41 enddef;
42
43 fet_beginchar("accentus up", "uaccentus")
44         draw_accentus;
45 fet_endchar;
46
47 fet_beginchar("accentus down", "daccentus")
48         draw_accentus;
49         y_mirror_char;
50 fet_endchar;
51
52
53 def draw_half_ellipse(expr ellips_width, ellips_height) =
54         save width, height, thin, thick;
55         width# = ellips_width;
56         height# = ellips_height;
57         define_pixels(width, height);
58
59         thin = thick = 0.6 linethickness;
60         penpos1(thick, 0);
61         penpos2(thin, -90);
62         z1r = (width/2, 0);
63         z2r = (0, -height/2);
64         penlabels(1,2);
65         penstroke z1e{down} .. {left}z2e;
66         addto currentpicture also currentpicture xscaled -1;
67 enddef;
68
69 fet_beginchar("half circle", "usemicirculus")
70         draw_half_ellipse(5/16 staff_space#, 5/16 staff_space#);
71         currentpicture := currentpicture yscaled -1;
72         set_char_box(width#/2, width#/2, 0, height#/2);
73 fet_endchar;
74
75
76 fet_beginchar("half circle", "dsemicirculus")
77         draw_half_ellipse(5/16 staff_space#, 5/16 staff_space#);
78         set_char_box(width#/2, width#/2, height#/2, 0);
79 fet_endchar;
80
81
82 fet_beginchar("circle", "circulus")
83         draw_half_ellipse(5/16 staff_space#, 5/16 staff_space#);
84         set_char_box(width#/2, width#/2, height#/2, height#/2);
85         addto currentpicture also currentpicture yscaled -1;
86 fet_endchar;
87
88
89 fet_beginchar("augmentum", "augmentum")
90         save diameter;
91         diameter# = 0.25 staff_space#;
92         define_pixels(diameter);
93         pickup pencircle scaled diameter;
94         drawdot (0,0);
95         set_char_box(diameter#/2, diameter#/2, diameter#/2, diameter#/2);
96 fet_endchar;
97
98
99 def draw_signum_congruentiae =
100         save za, zb, zc, zd, ze, zf, zg, zh;
101         pair za, zb, zc, zd, ze, zf, zg, zh;
102
103         set_char_box(0.50 staff_space# + 1.5 linethickness#,
104                      0.50 staff_space# + 1.5 linethickness#,
105                      2.5 linethickness#,
106                      2.00 staff_space# + 3.5 linethickness#);
107
108         pickup pencircle
109                 xscaled 1.0 linethickness
110                 yscaled 5.0 linethickness
111                 rotated -35;
112         za = (+0.50staff_space, +2.00staff_space);
113         zb = (+0.00staff_space, +2.00staff_space);
114         zc = (-0.50staff_space, +1.50staff_space);
115         zd = (-0.25staff_space, +1.00staff_space);
116         ze = (+0.10staff_space, +0.80staff_space);
117         zf = (+0.00staff_space, +0.00staff_space);
118         draw za{-1,+1} .. zb .. zc .. zd .. ze .. zf;
119
120         pickup pencircle scaled 3.0 linethickness;
121         zg = (-0.5staff_space, +0.0staff_space);
122         zh = (+0.5staff_space, +0.0staff_space);
123         drawdot zg;
124         drawdot zh;
125 enddef;
126
127 fet_beginchar("signum congruentiae up", "usignumcongruentiae")
128         draw_signum_congruentiae;
129 fet_endchar;
130
131 fet_beginchar("signum congruentiae down", "dsignumcongruentiae")
132         draw_signum_congruentiae;
133         xy_mirror_char;
134 fet_endchar;
135
136 fet_endgroup ("scripts")