]> git.donarmstrong.com Git - lilypond.git/commitdiff
* mf/feta-pendaal.mf (draw_pedal_P): Break shape into smaller pieces
authorWerner Lemberg <wl@gnu.org>
Wed, 26 Jan 2005 21:11:46 +0000 (21:11 +0000)
committerWerner Lemberg <wl@gnu.org>
Wed, 26 Jan 2005 21:11:46 +0000 (21:11 +0000)
to avoid an uneven number of self-intersections; this confuses
fontforge.
Fix a slight bug in the shape at left bottom (which is visible only
at high magnifications).
`Center' the stem horizontally to avoid overlapping.

ChangeLog
mf/feta-pendaal.mf

index 06722a8658c06b715683e16b27e609dd3d7733fd..de28a88c54a1000dd3c6a9e109ab78ecad3aa323 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
        inflections.
        (draw_cross): Fix shape to have uniform thickness in corners.
 
+       * mf/feta-pendaal.mf (draw_pedal_P): Break shape into smaller pieces
+       to avoid an uneven number of self-intersections; this confuses
+       fontforge.
+       Fix a slight bug in the shape at left bottom (which is visible only
+       at high magnifications).
+       `Center' the stem horizontally to avoid overlapping.
+
 2005-01-24  Werner Lemberg  <wl@gnu.org>
 
        * mf/feta-autometric.mf (fet_beginfont): Set font_coding_scheme
index dfd87fa8cbfaa92ef9cacf63f03bb0ed84e11bd8..c4e4865dfd51e51a1342773fdeaff34b1e4ae7cd 100644 (file)
@@ -140,7 +140,7 @@ begingroup;
        penpos4 (1.2 penh, -pedalpha);
        penpos5 (penh, -pedalpha);
        penpos6 (penh, 180 - pedalpha);
-       penpos7 (penh, 180 - pedalpha);
+       penpos7 (penh, 180 - pedalpha);
        penpos8 (penh, 90);
        penpos9 (4/3 penw, 50);
        penpos10 (1.4 penw, 50);
@@ -155,7 +155,7 @@ begingroup;
        x5 = 1/4 w;
        y5r = 0;
        z6 = z5;
-       z7 = z6r + 1/3 (z8r - z6r);
+       z7l = z6r + 1/3 (z8r - z6r);
        z8r = z5r + 3/5 (z3r - z5r);
        x9l = x10l - penh;
        y9l = 1/4 penh;
@@ -164,25 +164,14 @@ begingroup;
        x11l = w;
        y11 = 1/5 h;
 
+       % don't stick out at the top
        z1' = round (0.9 [z2, z1]) + (xpart feta_offset, 0);
        penpos1' (penh, 0);
 
-       if show_labels = 1:
-               penlabels (range 1 thru 11);
-               penlabels (1');
-       fi;
-
-       soft_penstroke z1'e
-                      ..tension 2.5.. z2e
-                      ..tension 1.5.. z3e
-                      ..tension 2.5.. z4e
-                      ..tension 1.5.. z5e
-                      .. z6e
-                      ..tension 1.5.. z7e
-                      ..tension 1.5.. z8e{right}
-                      ..tension 1.5.. z9e{dir - pedalpha}
-                      .. z10e
-                      ..tension 2.5.. z11e;
+       % shift start point of pen stroke to avoid overlapping contours
+       z8'l = z8l;
+       y8'r = y8r;
+       z8'r = z8l + whatever * (z3r - z8l);
 
        penpos12 (hround penh, 0);
        penpos13 (penw, -90 - pedbeta);
@@ -197,15 +186,43 @@ begingroup;
        x16 = 1/4 [x1, w];
        y16r = y2r;
 
-       if show_labels = 1:
-               penlabels (range 12 thru 16);
-       fi;
+       % We now do a correction to `center' the stem horizontally.  While
+       % this is not the most elegant solution, it is definitely the
+       % easiest...
+
+       save horz_corr;
+       horz_corr = 1/5 [x12, x16] - x2l;
+       x2 := x2 + horz_corr;
+       x2l := x2l + horz_corr;
+       x2r := x2r + horz_corr; 
+
+       penstroke z1'e
+                 ..tension 2.5.. z2e
+                 ..tension 1.5.. z3e
+                 ..tension 2.5.. {dir (225)}z4e;
+
+       soft_penstroke z8'e{right}
+                      ..tension 1.5.. z9e{dir (-pedalpha)}
+                      .. z10e
+                      ..tension 2.5.. z11e;
+
+       fill z4r{dir (225)}
+            ..tension 1.5.. z5r{left}
+            .. z6r
+            ..tension 1.5.. z7r
+            ..tension 1.5.. z8r{right}
+            -- cycle;
 
        soft_penstroke z12e{down}
                       ..tension 1.1.. z13e{dir (180 - pedbeta)}
                       ..tension 1.1.. z14e{right}
                       ..tension 1.1.. z15e{dir (180 + pedbeta)}
                       ..tension 1.1.. z16e{dir (90 + pedbeta)};
+
+       if show_labels = 1:
+               penlabels (range 1 thru 16);
+               penlabels (1', 8');
+       fi;
 endgroup;
 enddef;