From: hanwen <hanwen>
Date: Thu, 10 Mar 2005 13:30:34 +0000 (+0000)
Subject: * lily/dynamic-text-spanner.cc (print): add bound padding for edge
X-Git-Tag: release/2.5.23~380
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=02e5b3214a70e30df2fb028eb9b03464c61ac81c;p=lilypond.git

* lily/dynamic-text-spanner.cc (print): add bound padding for edge
texts as well.

* mf/feta-klef.mf: revise.

* mf/feta-schrift.mf: make thinning of accent less pronounced.

* mf/feta-klef.mf: add rounded curve at top.
make thinnib a little heavier.
---

diff --git a/ChangeLog b/ChangeLog
index 547d99eb1d..93d2c8e85f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2005-03-10  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+	* lily/dynamic-text-spanner.cc (print): add bound padding for edge
+	texts as well.
+
+	* mf/feta-klef.mf: revise. 
+
+	* mf/feta-schrift.mf: make thinning of accent less pronounced.
+
+	* mf/feta-klef.mf: add rounded curve at top. 
+	make thinnib a little heavier.
+
 2005-03-10  Jan Nieuwenhuizen  <janneke@gnu.org>
 
 	* buildscripts/fixcc.py: New file.
diff --git a/lily/dynamic-text-spanner.cc b/lily/dynamic-text-spanner.cc
index 70d2bf4466..11de092ab3 100644
--- a/lily/dynamic-text-spanner.cc
+++ b/lily/dynamic-text-spanner.cc
@@ -121,11 +121,12 @@ Dynamic_text_spanner::print (SCM smob)
   do
     {
       Interval ext = edge[d].extent (X_AXIS);
+      Real pad = robust_scm2double (me->get_property ("bound-padding"), 0.0);      
       if (!ext.is_empty ())
 	{
 	  edge[d].translate_axis (span_points[d], X_AXIS);
 	  m.add_stencil (edge[d]);
-	  span_points[d] += -d *  ext[-d];
+	  span_points[d] += -d *  (ext[-d] + pad);
 	}
     }
   while (flip (&d) != LEFT);
diff --git a/mf/feta-klef.mf b/mf/feta-klef.mf
index e02986ea7c..83bc53bc9f 100644
--- a/mf/feta-klef.mf
+++ b/mf/feta-klef.mf
@@ -41,7 +41,7 @@ def draw_c_clef (expr reduction) =
 	% stem
 	draw_block ((0, -d + feta_shift),
 		    (3/4 norm + 1/2 hair, h));
-	draw_block ((3/4 norm + 1/2 hair + hround (3/2 hair), -d + feta_shift),
+ 	draw_block ((3/4 norm + 1/2 hair + hround (3/2 hair), -d + feta_shift),
 		    (3/4 norm + 1/2 hair + 2 hround (3/2 hair), h));
 
 	% assure symmetry
@@ -135,32 +135,37 @@ begingroup;
 
 	center = outer_tangent_point
 		 + big_radius * dir (0)
-		 + (big_radius - bulb_radius) * dir (-turning_dir * 90);
+%		 + (big_radius - bulb_radius) * dir (-turning_dir * 90)
+ 		;
 
 	z1' = center + bulb_radius * dir (turning_dir * 180);
 	z2' = outer_tangent_point + flare * dir (0);
 	z3' = center + bulb_radius * dir (0);
 	z4' = center + bulb_radius * dir (turning_dir * 90);
+	z5' = center - 0.5 [big_radius, bulb_radius] * dir (turning_dir * 90);
 
-	labels (1', 2', 3', 4');
+	labels (1', 2', 3', 4', 5');
 
 	before := z3'{dir (turning_dir * 90)}
-		  .. z4'
-		  ..tension 1.1.. z1';
+		  .. z4'{-dir(0)}
+		  .. tension 1.1
+                  .. z1'{-dir (turning_dir* 90)};
 	after := z2'{dir (turning_dir * 90)}
+		 .. tension 1.05 
 		 .. end_point{dir (end_angle)};
 	(u, v) = before intersectiontimes after;
 
 	pat := start_point{dir (start_angle)}
 	       .. outer_tangent_point{dir (-turning_dir * 90)}
-	       ..tension 0.97.. subpath (0, u) of before
+	       .. tension 1.02
+	       .. z5'{dir(0)}
+               .. subpath (0, u) of before
 	       .. subpath (v, infinity) of after;
 
 	if direction = 0:
 		pat := reverse pat;
 	fi
-
-pat
+	pat
 endgroup
 enddef;
 
@@ -206,7 +211,7 @@ def draw_bass_clef (expr exact_center, reduction) =
 	define_whole_blacker_pixels (dot_diam, right_thickness);
 
 	right_offset = 0.05 staff_space;
-	bulb_y_offset := 0.15 staff_space;
+	bulb_y_offset := 0.075 staff_space;
 	bulb_flare := 2.5 linethickness;
 %	tip_protude := (-linethickness, -.2 staff_space);
 	tip_protude := (0, 0);
@@ -302,13 +307,13 @@ def draw_gclef (expr reduction) =
 	reduced_ss# = staff_space# * reduction;
 	define_pixels (reduced_ss);
 
-	thinness = 0.08 staff_space + 0.7 linethickness;
+	thinness = 0.10 staff_space + 0.65 linethickness;
 	downstroke_dir = unitvector (14, -75);
 	downstroke_angle = angle downstroke_dir;
 	bot_angle = -180;		% downstroke_angle - 87
 
 	upward_swoosh_angle = 132;
-	start_angle = -95;
+	start_angle = -99;
 
 	breapth_factor = 21.0 /14;
 	inner_thick_end = 45;
@@ -366,21 +371,30 @@ def draw_gclef (expr reduction) =
 	z10r - z10l = .7 thinnib * dir (downstroke_angle + 90)
 		      + whatever * downstroke_dir;
 	z10 = .5 [z10l, z10r];
-	z11 = center + whatever * downstroke_dir + (0 reduced_ss, 0);
 
+	z11 = center + whatever * downstroke_dir + (-0.05 reduced_ss, 0);
 	penpos11 (thinnib, start_angle + 90);
-	penpos12 (thinnib, bot_angle + 90);
+
+ 	penpos12 (thinnib, bot_angle + 90);
 	penpos13 (thinnib + 0.14 staff_space, 180);
 
 	% this auxiliary point ensures good contour overlapping
 	z8 = .5 [z9l, z9r] + .25 ((z9r - z9l) rotated -90);
 
-	fill z2l{right}
+
+	z20 = z9l - (0, .25 blot_diameter);
+	penpos20(blot_diameter, 0);
+	
+	fill
+             z2l{right}
 	     .. z3l
 	     .. z4l{left}
+             .. tension 1.07  % inside curve 
 	     .. z5l{up}
 	     .. z7l{up}
-	     ..tension 1.2.. z9l
+	     .. tension 1.2
+	     .. z20r
+	     & simple_serif (z20r,z20l, 60)
 	     -- z8
 	     -- z9r			% {dir (downstroke_angle + 0)}
 	     ..tension 0.8.. z7r{down}
@@ -395,6 +409,7 @@ def draw_gclef (expr reduction) =
 
 	pat := z10{down}
 	       .. z6
+	       .. tension 1.02
 	       .. z11{dir (start_angle)};
 
 	penpos6 (thinnib, angle (direction 1 of pat) + 90);
@@ -402,10 +417,14 @@ def draw_gclef (expr reduction) =
 	% two auxiliary points to simulate `draw' with `penstroke'
 	z10' = point 0.5 of pat;
 	penpos10' (thinnib, angle (direction 0.5 of pat) + 90);
+
 	z11' = point 1.5 of pat;
 	penpos11' (thinnib, angle (direction 1.5 of pat) + 90);
 
-	penstroke z9e
+	z21l = z20l;
+	z21r = z9r;
+ 
+	penstroke z21e
 		  .. z10e{down}
 		  .. z10'e
 		  .. z6e
@@ -415,10 +434,10 @@ def draw_gclef (expr reduction) =
 
 	fill new_bulb (z12r, bot_angle, z13r, z12l, bot_angle + 180,
 		       0.45 reduced_ss, 0.38 reduced_ss,
-		       thinnib + .15 staff_space, 1, -1)
+		       thinnib + .075 staff_space, 1, -1)
 	     -- cycle;
 
-	penlabels (range 1 thru 16);
+	penlabels (range 1 thru 20);
 	penlabels (10', 11');
 
 	draw_staff (-1, 3, 0);
diff --git a/mf/feta-macros.mf b/mf/feta-macros.mf
index fa236fd01a..ee12a7215e 100644
--- a/mf/feta-macros.mf
+++ b/mf/feta-macros.mf
@@ -199,7 +199,6 @@ enddef;
 % Make a round path segment going from P to Q.  2*A is the angle that the
 % path should take.
 %
-
 def simple_serif (expr p, q, a) =
 	p{dir (angle (q - p) - a)}
 	.. q{-dir (angle (p - q) + a)}
diff --git a/mf/feta-schrift.mf b/mf/feta-schrift.mf
index 629d5a5b8c..a09dec08ff 100644
--- a/mf/feta-schrift.mf
+++ b/mf/feta-schrift.mf
@@ -327,13 +327,13 @@ fet_beginchar ("Thumb", "thumb");
 fet_endchar;
 
 
-%
-% FIXME: rounded endings
 %
 % `\accent' is TeX reserved.
 %
 
 def draw_accent (expr bottom_left, top_right, thickness, diminish) =
+	save thinning_start;
+	thinning_start = 0.4;
 	pickup pencircle scaled thickness;
 
 	lft x1 = xpart bottom_left;
@@ -342,7 +342,7 @@ def draw_accent (expr bottom_left, top_right, thickness, diminish) =
 	bot y6 = ypart bottom_left;
 
 	rt z4 = (xpart top_right, (ypart top_right + ypart bottom_left) / 2);
-	x5 = x3 = (xpart top_right + xpart bottom_left) / 2
+	x5 = x3 = thinning_start [xpart top_right, xpart bottom_left]
 		  - linethickness + 0.1 staff_space;
 	z3 = whatever [z1, z4];
 	z5 = whatever [z6, z4];
@@ -379,7 +379,7 @@ fet_beginchar ("> accent", "sforzato");
 		      .5 staff_space#, .5 staff_space#);
 
 	draw_accent ((-w, -d), (w, h),
-		     0.05 staff_space + linethickness, 0.6);
+		     0.05 staff_space + linethickness, 0.7);
 	penlabels (1, 3, 4, 5, 6);
 	labels (7);
 fet_endchar;
diff --git a/mf/feta-test-generic.mf b/mf/feta-test-generic.mf
index 2124fd460f..30c951f38e 100644
--- a/mf/feta-test-generic.mf
+++ b/mf/feta-test-generic.mf
@@ -3,16 +3,16 @@
 % in a separate file to avoid tainting non-test font files for testing.
 %
 
-input feta-eindelijk;
-input feta-toevallig;
-input feta-puntje;
-input feta-bolletjes;	
-input feta-schrift;
-input feta-banier;
+%input feta-eindelijk;
+%input feta-toevallig;
+%input feta-puntje;
+%input feta-bolletjes;	
+%input feta-schrift;
+%input feta-banier;
 %	input feta-slag;
 input feta-klef;
 %	input feta-haak;
-input feta-timesig;
-input feta-pendaal;
-input feta-accordion;
+%input feta-timesig;
+%input feta-pendaal;
+%input feta-accordion;
 %	input feta-solfa;