lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

changing shape of the G clef (issue4664070)


From: lemniskata . bernoullego
Subject: changing shape of the G clef (issue4664070)
Date: Fri, 08 Jul 2011 23:58:34 +0000

Reviewers: Reinhold, james.lowe_datacore.com, x.scheuer_gmail.com,

Message:
A tip to speed up work if you try to modify clef shape: use this script
to generate a dvi preview of glyphs (no need to run make, and it also
shows metafont control points):
#!/bin/bash
mf '\mode:=proof; input feta20'
 gftodvi feta20.2602gf \
 && mv feta20.dvi feta20new.proof.dvi

Description:
changing shape of the G clef

makes upper loop smaller,
bottom crook sticks less,
vertical line is more evenly curved.
Also the upper loop is slightly bigger
in reduced version of the clef than
in the regular version, to fit stafflines well.

Please review this at http://codereview.appspot.com/4664070/

Affected files:
  M mf/feta-clefs.mf


Index: mf/feta-clefs.mf
diff --git a/mf/feta-clefs.mf b/mf/feta-clefs.mf
index 4522395cf6e08f20072b30aec272a10802ef90a7..8976fa1aabcd4dd2674a5062cd04414c82c283ae 100644
--- a/mf/feta-clefs.mf
+++ b/mf/feta-clefs.mf
@@ -317,6 +317,11 @@ def draw_gclef (expr reduction) =
        reduced_ss# = staff_space# * reduction;
        define_pixels (reduced_ss);

+       % G clef has now a smaller upper loop than it used to have.
+       % Too small loop in reduced clef (G_change) interacts badly
+       % with stafflines, so we make reduced clef's loop a bit bigger.
+       reduced_loop_correction := min (max (0.925, (0.55 + 0.5 * reduction)), 
1);
+
        thinness = 0.095 staff_space + 0.75 linethickness;
        downstroke_dir = unitvector (14, -75);
        downstroke_angle = angle downstroke_dir;
@@ -333,7 +338,7 @@ def draw_gclef (expr reduction) =
        thinnib = thinness;

        set_char_box (0, 1.71 * breapth_factor * reduced_ss#,
-                     2.6 * reduced_ss#, 5 * reduced_ss#);
+                     2.435 * reduced_ss#, 4.6 * reduced_ss# / 
reduced_loop_correction);

        center := (breapth_factor * reduced_ss, 0);

@@ -356,32 +361,32 @@ def draw_gclef (expr reduction) =
        y5r = .37 reduced_ss + ypart center;
        penpos5 (thickness, upward_swoosh_angle);

-       z6 = center + whatever * downstroke_dir;
-       y6 = ypart center + 2 reduced_ss;
+       z6 = center + whatever * downstroke_dir - (0.033, 0) * reduced_ss;
+       y6 = ypart center + 1.9 reduced_ss / reduced_loop_correction;
        % penpos6 is computed later

-       z7l - z6 = whatever * (z5 - z6) ;
-       y7l = 3.5 reduced_ss;
+       z7l - z6 = whatever * (z5 - z6);
+       y7l = 3.25 reduced_ss / reduced_loop_correction;
        penpos7 (thickness, upward_swoosh_angle);

-       x9 = .7 [x10, x7r];
-       top y9l = 5 reduced_ss;
-       penpos9 (1.45 thickness, -70);
+       x9 = .8 [x10, x7r];
+       top y9l = 4.6 reduced_ss / reduced_loop_correction;
+       penpos9 (1.45 thickness, -75);

-       x11 - x13r = 1.5 reduced_ss + 0.5 thinnib;
-       y11 = ypart center - 47/28 reduced_ss;
-       y12 = ypart center - 71/28 reduced_ss;
+       x11 - x13r = 1.42 * reduced_ss + 0.5 thinnib;
+       y11 = ypart center - 43/28 reduced_ss;
+       y12 = ypart center - 66/28 reduced_ss;
        y13 = .48 [y12, y4r];
        x12r = xpart (.45 [z13r, z11] + .75 reduced_ss * downstroke_dir);

 %      z10 = center + whatever * dir (downstroke_angle - 1.5);
-       x10 = x6 - 2 thinnib;
-       y10 = ypart center + 3.5 reduced_ss;
+       x10 = x6 - 1.65 thinnib * reduction;
+       y10 = ypart center + 3.15 reduced_ss / reduced_loop_correction;
        y10l - y10r = 1.0 thickness;
        z10r - z10l = .7 thinnib * dir (downstroke_angle + 90)
                      + whatever * downstroke_dir;
        z10 = .5 [z10l, z10r];
-       z11 = center + whatever * downstroke_dir + (-0.05 reduced_ss, 0);
+       z11 = center + whatever * downstroke_dir + (0.02 reduced_ss, 0);

        penpos11 (thinnib, start_angle + 90);
        penpos12 (thinnib, bot_angle + 90);
@@ -403,7 +408,7 @@ def draw_gclef (expr reduction) =
        z10' = point 0.3 of pat;
        penpos10' (1.3 thinnib, angle (direction 0.3 of pat) + 50);

-       z11' = point 1.5 of pat;
+       z11' = point 1.5 of pat - (-0.033, 0.5) * reduced_ss;
        penpos11' (thinnib, angle (direction 1.5 of pat) + 90);

        z21l = z20l;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]