From c15e9e525372ba6985f72c432b00ef67d78c518f Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Wed, 26 Jan 2005 21:11:46 +0000 Subject: [PATCH] * 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. --- ChangeLog | 7 ++++++ mf/feta-pendaal.mf | 59 +++++++++++++++++++++++++++++----------------- 2 files changed, 45 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index 06722a8658..de28a88c54 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,13 @@ 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 * mf/feta-autometric.mf (fet_beginfont): Set font_coding_scheme diff --git a/mf/feta-pendaal.mf b/mf/feta-pendaal.mf index dfd87fa8cb..c4e4865dfd 100644 --- a/mf/feta-pendaal.mf +++ b/mf/feta-pendaal.mf @@ -140,7 +140,7 @@ begingroup; penpos4 (1.2 penh, -pedalpha); penpos5 (penh, -pedalpha); penpos6 (penh, 180 - pedalpha); - penpos7 (2 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; -- 2.39.5