lilypond-devel
[Top][All Lists]
Advanced

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

font: change breve vertical lines (issue4748044)


From: lemniskata . bernoullego
Subject: font: change breve vertical lines (issue4748044)
Date: Sun, 17 Jul 2011 10:22:13 +0000

Reviewers: ,

Message:
Hi,

breve glyphs in Feta font need modification.

What is bad now: breves lying between the stafflines form a
hard-to-recognize clump, partly because the corners (marked in orange
here:
http://lilypond.googlecode.com/issues/attachment?aid=17670000000&name=breve+dimensions.png&token=be66e1b143abc7ec3429340cd32103e3&inline=1)
are too small.  Smaller font sizes and ledger lines intensify this.
Breves lying on stafflines are also not good - too stumpy.
Try printing this for example:
http://lilypond.googlecode.com/issues/attachment?aid=17670000002&name=Miserere+current+Lily.pdf&token=63749404ea6a8c2d3447fb4080494627

Here is my homework :)
http://lilypond.googlecode.com/issues/attachment?aid=17670000001&name=breve+examples.png&token=3c9237933bb9a936015f36fed35e1936&inline=1

As we can see:
- there is some variation
- majority of breves have lines higher than notehead
- if line height is similar to notehead height, fudge value is negative
or at least 0

Therefore i suggest to:
- make vertical lines higher
- decrease the fudge, especially in small font designs
- increase the gap for smaller design sizes
- decrease the line width in double-lined breves (the glyph looks less
fat then)

Tracker issue: http://code.google.com/p/lilypond/issues/detail?id=1767
I attached a bunch of test files showing differencies to the tracker
issue.  If possible, try printing them instead of watching on-screen,
because this issue is quite specific to printed material.

How do you like it?

PS i'll have to cut down on issue descriptions and example researchig...
It takes much more time than writing a patch itself :(

Description:
font: change breve vertical lines

Put breve vertical lines farther apart
and make them longer to increase readability.

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

Affected files:
  M mf/feta-noteheads.mf


Index: mf/feta-noteheads.mf
diff --git a/mf/feta-noteheads.mf b/mf/feta-noteheads.mf
index c72522072195d2b9751158e12cd0014a333294c2..e574cc1cf52ff16e456031f634e40b4fab1d7cbd 100644
--- a/mf/feta-noteheads.mf
+++ b/mf/feta-noteheads.mf
@@ -157,24 +157,36 @@ if test > 0:
 fi;


-%
-% dimensions aren't entirely right.
-%
-def draw_brevis (expr linecount) =
+def draw_brevis (expr linecount, line_thickness_multiplier) =
        save stemthick, fudge;

-       stemthick# = 2 stafflinethickness#;
+       stemthick# = line_thickness_multiplier * 2 * stafflinethickness#;
        define_whole_blacker_pixels (stemthick);

-       fudge = hround (blot_diameter / 2);
+       % Breves of smaller design sizes should have their lines
+       % farther apart (the overlap should be smaller).
+       fudge = hround (blot_diameter *
+               min (max (-0.3, (0.8 - (20 / (design_size + 4)) + .1 
linecount)), 0.3));

        draw_outside_ellipse (1.80, 0, 0.707, 0);
        undraw_inside_ellipse (1.30, 125, 0.68, 2 stafflinethickness#);

        pickup pencircle scaled stemthick;

-       bot y1 = -d;
-       top y2 = h;
+       % Breves of smaller design sizes should have their lines longer.
+       line_length := min (max (0.7, (31/30 - (design_size / 60))), 0.82);
+
+       % Line lengths between 0.72 and 0.77 are not nice
+       % because they are neither separate nor connected
+       % when there is an interval of fourth.
+       if line_length < 0.75:
+               quanted_line_length := min (0.72, line_length);
+       else:
+               quanted_line_length := max (0.77, line_length);
+       fi;
+
+       bot y1 = -quanted_line_length * staff_space;
+       top y2 = quanted_line_length * staff_space;
        rt x1 - fudge = 0;
        x1 = x2;

@@ -183,17 +195,22 @@ def draw_brevis (expr linecount) =
        y4 = y2;
        y3 = y1;

+       % Breves of smaller design sizes should have their lines
+       % farther apart.
+       line_distance := (1.95 - 0.008 * design_size) * stemthick;
        for i := 0 step 1 until linecount - 1:
-               draw_gridline (z1 - (1.5 * i * stemthick, 0),
-                              z2 - (1.5 * i * stemthick, 0), stemthick);
-               draw_gridline (z3 + (1.5 * i * stemthick, 0),
-                              z4 + (1.5 * i * stemthick, 0), stemthick);
+               draw_gridline (z1 - (i * line_distance, 0),
+                              z2 - (i * line_distance, 0),
+                              stemthick);
+               draw_gridline (z3 + (i * line_distance, 0),
+                              z4 + (i * line_distance, 0),
+                              stemthick);
        endfor;
 enddef;


 fet_beginchar ("Brevis notehead", "sM1");
-       draw_brevis (1);
+       draw_brevis (1, 1);

        draw_staff (-2, 2, 0);
 fet_endchar;
@@ -201,7 +218,7 @@ fet_endchar;

 if test > 0:
        fet_beginchar ("Brevis notehead", "sM1");
-               draw_brevis(1);
+               draw_brevis(1, 1);

                draw_staff (-2, 2, 0.5);
        fet_endchar;
@@ -209,7 +226,7 @@ fi;


 fet_beginchar ("Double-lined brevis notehead", "sM1double");
-       draw_brevis (2);
+       draw_brevis (2, 0.8);

        draw_staff (-2, 2, 0);
 fet_endchar;
@@ -217,7 +234,7 @@ fet_endchar;

 if test > 0:
        fet_beginchar ("Double-lined brevis notehead", "sM1double");
-               draw_brevis (2);
+               draw_brevis (2, 0.8);

                draw_staff (-2, 2, 0.5);
        fet_endchar;





reply via email to

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