]> git.donarmstrong.com Git - lilypond.git/blobdiff - mf/feta-nummer-code.mf
Run `make grand-replace'.
[lilypond.git] / mf / feta-nummer-code.mf
index 1c1fa6d2ff08b969f631ebbf3a6267537235fc94..f562c4cad9953a9e7dce86e348d008f75b3feacd 100644 (file)
@@ -1,10 +1,10 @@
-% feta-nummer.mf -- implement bold Orator numerals
+% feta-nummer-code.mf -- implement bold Orator numerals
 %
 % part of LilyPond's pretty-but-neat music font
 %
 % source file of the Feta (not the Font-En-Tja) music font
 %
-% (c) 1997--2005 Jan Nieuwenhuizen <janneke@gnu.org>
+% (c) 1997--2008 Jan Nieuwenhuizen <janneke@gnu.org>
 
 
 height# := number_design_size;
@@ -21,13 +21,13 @@ font_normal_space space#;
 %
 
 save b, h;
-4h + b = 1.15;
-10h + b = 1;
+4 h + b = 1.15;
+10 h + b = 1;
 fatten := number_design_size * h + b;
 
 save b, h;
-4h + b = 1.05;
-10h + b = 1;
+4 h + b = 1.05;
+10 h + b = 1;
 widen := number_design_size * h + b;
 
 tense = 0.85;
@@ -75,7 +75,7 @@ define_pixels (kuulleke);
 %
 %
 % move_away_to = amount left (for 2)
-% turn_to  = amount down (for  2 )
+% turn_to = amount down (for 2)
 %
 
 def number_flare_path (expr pos, alpha, beta, line, flare,
@@ -98,8 +98,8 @@ begingroup;
        z3r = 0.5 [z2l, z2r] + 0.5 * flare * dir (alpha + beta);
 
        penpos1 (line, 180 + beta + alpha);
-       penpos2 (flare, alpha );
-       penpos3 (flare, alpha +  beta);
+       penpos2 (flare, alpha);
+       penpos3 (flare, alpha + beta);
 
        penlabels (1, 2, 3, 4, 5);
 
@@ -146,7 +146,7 @@ enddef;
 
 % should make generic macro?
 %
-def draw_foot(expr xpos) =
+def draw_foot (expr xpos) =
 begingroup;
        clearxy;
 
@@ -242,10 +242,33 @@ dot_diam# = 7/8 flare#;
 define_pixels (dot_diam);
 
 
-code := 31;    % , 32
+code := 42;    % , 43
 
-fet_beginchar ("Space", "space");
-       set_char_box (0, space#, 0, height#);
+fet_beginchar ("Plus", "plus");
+       set_char_box (0, .5 height#, -0.25 height#, 0.75 height#);
+
+       save hthick, vthick, size, outer_hsize, outer_vsize;
+
+       hthick# = vthick# = 2 linethickness#;
+       size# = 1.1 staff_space#;
+       define_whole_blacker_pixels (vthick);
+       define_whole_vertical_blacker_pixels (hthick);
+
+       outer_hsize = hround ((b + w - vthick) / 2);
+       outer_vsize = vround ((h + d - hthick) / 2);
+
+       centerx := hround (w / 2);
+       centery := vround ((h - d) / 2);
+
+       z1 = (centerx - hthick / 2, -d); 
+       z2 = (centerx + hthick / 2, h); 
+
+       labels (1, 2);
+
+       draw_rounded_block (z1, z2, hthick);
+       draw_rounded_block ((0, centery - vthick / 2),
+                           (w, (centery + vthick / 2)),
+                           vthick);
 fet_endchar;
 
 
@@ -279,7 +302,7 @@ fet_beginchar ("Numeral comma", "comma");
        fill subpath (0,3) of pat
             .. z0
             .. cycle;
-       filldraw z1l{dir(alpha)}
+       filldraw z1l{dir (alpha)}
                 .. {up}z2
                 -- z0{direction pos of pat}
                 ..tension 0.95.. {dir (180 + alpha)}z1r
@@ -311,7 +334,7 @@ fet_endchar;
 
 code := 47;    % 0 = 48
 
-fet_beginchar("Numeral 0", "zero");
+fet_beginchar ("Numeral 0", "zero");
        set_char_box (0, 11/15 height# * widen, 0, height#);
 
        message "w:" & decimal w;
@@ -652,7 +675,6 @@ fet_beginchar ("Numeral 5", "five");
               .. {up}z7l
               -- z2l{up}
               .. cycle;
-       fill pat;
 
        beta = 45;
        delta = 180 + beta + 10;
@@ -660,6 +682,12 @@ fet_beginchar ("Numeral 5", "five");
        z8l = directionpoint dir (delta) of
                subpath (6, 7) of pat;
 
+       % include intersection point to improve overlap removal
+       fill subpath (0, 6) of pat
+            .. z8l
+            .. subpath (7, length (pat)) of pat
+            .. cycle;
+
        penpos9 (thin, 90);
        y9 = 10/16 [y5, y7];
        x9 = .36 [x8r, x10r];
@@ -699,16 +727,18 @@ fet_beginchar ("Numeral 7", "seven");
        save tolerance;
        save alpha, beta, gamma, delta;
        save bow;
+       save x_overshoot;
+
        path bow;
 
-       set_char_box (0, 11/15 height# * widen, 0, height#);
+       set_char_box (0, 11/15 height# * widen - thin#, 0, height#);
+       overshoot_x = .75 thin;
 
        message "w:" & decimal w;
        message "h:" & decimal h;
 
        alpha = -180;
 
-if true:
        penpos1 (3/2 thick, 180 + alpha);
        penpos2 (hair, 180 + alpha - 45);
        penpos3 (hair, 180 + alpha + 45);
@@ -716,16 +746,12 @@ if true:
        z2 = z1l + (1/4 sqrt (2) * hair) * dir (alpha - 135);
        z3 = z1r + (1/4 sqrt (2) * hair) * dir (alpha - 45);
        z4 = z1 + kuulleke * dir (alpha - 90);
-else:
-       % does not work
-       calc_kuulleke (3/2 thick, -alpha);
-fi;
 
        z1l = (thin, 0);
 
        beta = 55;
        penpos5 (thin, 90 + beta);
-       z5 = (w, h) + (1/2 sqrt (2) * thin) * dir (-135);
+       z5 = (w, h) + (1/2 sqrt (2) * thin) * dir (-135) + (overshoot_x, 0);
 
        gamma = angle (length (z1r - z1), 2 kuulleke);
        delta = 12;