]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.1.5
authorfred <fred>
Tue, 26 Mar 2002 21:29:25 +0000 (21:29 +0000)
committerfred <fred>
Tue, 26 Mar 2002 21:29:25 +0000 (21:29 +0000)
NEWS
VERSION
lily/lookup.cc
lily/script-engraver.cc
mutopia/J.S.Bach/Petites-Preludes/preludes-1.ly
mutopia/J.S.Bach/Petites-Preludes/preludes-2.ly
mutopia/J.S.Bach/Petites-Preludes/preludes-3.lym4
mutopia/J.S.Bach/Petites-Preludes/preludes-4.ly
mutopia/J.S.Bach/Petites-Preludes/preludes-5.ly
mutopia/J.S.Bach/Petites-Preludes/preludes-6.ly

diff --git a/NEWS b/NEWS
index 78c854e1cd22b8aabd0250cd57676c2c44607d59..7c1e93e25395120e63ee4fec015e6eee6a780bbf 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,42 @@
+pl4.jcn4
+       - fixes; preludes, finger
+
+pl4.jcn3
+       - bf: text staff vertical align; see input/test/vertical-text.ly
+       - urg, scaled cmr8 by factor 4/5
+       - apart from end/begin of measure spacing urgs, stars-and-stripes.ly 
+         is rather cool
+
+pl4.jcn2
+       - read (cmrxx)afm for text char widths
+       - tfmtoafm.sh (quite urg)
+       - alphabet.ly
+pl 4.uu1
+       - read .scm files. No need for GUILE_LOAD_PATH
+       - .ps hack.  No need for lily.ps on the printer
+       
+       (&$^@M&@^$@^&$@ Damn TeX)
+
+
+       - bf: mudela-book -> \default_paper is obsolete.
+
+pl 3.ms1
+         - thumb-upgrade
+pl4.jcn1
+       - bf: dotted slur
+       - bf: text ssb
+       - bf: empty/unknown in ps
+
+pl 4.tca1
+       - 40% speedup executing mudela-book on mudela-book-doc.doc
+       - change of lilypond's output filenames. Given multiple input
+         files, eg. 'm.ly y.ly', output names will now be 'm.tex y.tex'
+         not 'm.tex y-1.tex', but if m.ly containts two paper definitions
+         output will be 'm.tex m-1.tex y.tex' 
+
+*******
 1.1.4
 
 pl 3.tca1
diff --git a/VERSION b/VERSION
index 66f4cf93b6434729ba938ee098b520290fddff70..b7f6e05badfa8bed77fc0dfcb3faf26e6b3bcdd7 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,7 +1,7 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=1
-PATCH_LEVEL=4
+PATCH_LEVEL=5
 MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
index 300439b3dd0bec0cd7e4cc13e351ba51ad9c61ac..35d9774c14eb38a363c3121057d29069db3e126a 100644 (file)
@@ -12,6 +12,7 @@
       Glissando
 */
 
+#include <ctype.h>
 #include "lookup.hh"
 #include "debug.hh"
 #include "dimensions.hh"
@@ -19,6 +20,7 @@
 #include "scalar.hh"
 #include "paper-def.hh"
 #include "string-convert.hh"
+#include "file-path.hh"
 #include "main.hh"
 #include "lily-guile.hh"
 
@@ -180,10 +182,10 @@ Lookup::dashed_slur (Array<Offset> controls, Real thick, Real dash) const
   // (lambda (o) (dashed-slur o thick dash '(stuff))
   a.lambda_ = 
     ly_append (ly_lambda_o (),
-    ly_list1 (ly_append (ly_func_o ("dashed-slur"),
+    gh_list (ly_append (ly_func_o ("dashed-slur"),
     gh_cons (gh_double2scm (thick), 
     gh_cons (gh_double2scm (dash),
-    ly_list1 (ly_quote_scm (gh_list (sc[0], sc[1], sc[2], sc[3], SCM_UNDEFINED))))))));
+    gh_list (ly_quote_scm (gh_list (sc[1], sc[2], sc[3], sc[0], SCM_UNDEFINED)), SCM_UNDEFINED)))), SCM_UNDEFINED));
 
   a.str_ = "dashed_slur";
   return a;
@@ -311,6 +313,9 @@ Lookup::streepje (int type) const
   return  afm_find ("balls" + String ("-") +to_str (type) + "l");
 }
 
+Dictionary<String> cmr_dict;
+Dictionary<Adobe_font_metric*> afm_p_dict;
+
 Atom
 Lookup::text (String style, String text) const
 {
@@ -319,10 +324,65 @@ Lookup::text (String style, String text) const
   arr.push (text);
   Atom a =  (*symtables_p_) ("style")->lookup (style);
   a.lambda_ = lambda_scm (a.str_, arr);
+  Real font_w = a.dim_.x ().length ();
+  Real font_h = a.dim_.y ().length ();
+
+// urg
+//  if (!cmr_dict.length_i ())
+  if (!cmr_dict.elem_b ("roman"))
+    {
+      //brrrr
+      cmr_dict.elem ("bold") = "cmbx";
+      cmr_dict.elem ("dynamic") = "feta-din";
+      cmr_dict.elem ("finger") = "feta-nummer";
+      cmr_dict.elem ("italic") = "cmti";
+      cmr_dict.elem ("roman") = "cmr";
+    }
+
+  if (!afm_p_dict.elem_b (style))
+    {
+      Adobe_font_metric* afm_p = 0;
+      String cmr_str = cmr_dict.elem (style) + to_str ((int) font_h) + ".afm";
+      String font_path = global_path.find (cmr_str);
+      if (!font_path.length_i ())
+        {
+         warning (_f("can't open file: `%s'", cmr_str.ch_C ()));
+         warning (_f("guessing dimensions for font style: `%s'", style.ch_C ()));
+       }
+      else
+        {
+         *mlog << "[" << font_path;
+         afm_p = new Adobe_font_metric (read_afm (font_path));
+         DOUT << afm_p->str ();
+         *mlog << "]" << flush ;
+       }
+      afm_p_dict.elem (style) = afm_p;
+    }
+  Real w = 0;
+  Adobe_font_metric* afm_p = afm_p_dict.elem (style);
+  DOUT << "\nChars: ";
+  for (int i = 0; i < text.length_i (); i++) 
+    {
+      if (text[i]=='\\')
+       for (i++; (i < text.length_i ()) && isalpha(text[i]); i++)
+         ;
+      else
+       {
+         if (afm_p)
+           {
+             Adobe_font_char_metric m = afm_p->char_metrics_[(int)text[i]];
+             w += m.B_.x ().length ();
+             DOUT << to_str (m.B_.x ().length ()) << " ";
+           }
+         else
+             w += font_w;
+       }
+    }
+  DOUT << "\n" << to_str (w) << "\n";
+  a.dim_.x () = Interval (0, w);
   a.str_ = "text";
   a.font_ = font_;
   return a;
-   
 }
   
 
index c68a165d11eaaa64e775fa4ad3fe5fb8559de99f..17cc5dd70d32c9b7c505159cd546becd58d0db2a 100644 (file)
@@ -64,11 +64,13 @@ Script_engraver::do_pre_move_processing()
       if (dynamic_cast<Text_def *> (script_p->specs_p_)) // UGH
        {
          Text_def * td_l = (Text_def*)script_p->specs_p_;
-         Scalar style = get_property ("textstyle");
-         if (style.to_bool ())
+         if (!td_l->style_str_.length_i ())
            {
-             td_l->style_str_= style;
+             Scalar style = get_property ("textstyle");
+             if (style.to_bool ())
+               td_l->style_str_= style;
            }
+         // urg, what if this is already set? in-band signaling...
          Scalar alignment = get_property ("textalignment");
          if (alignment.isnum_b())
            {
index 63bc884eb9a6a4a6d87ce37d61d07afaea1612dc..116a6b1a2bebed0ccfd8a051713f2d2d6ed41528 100644 (file)
@@ -1,10 +1,8 @@
 \header{
 filename =      "preludes-1.ly";
-% mmm
-% title =       "DOUZE PETITES PR\\'ELUDES";
-opus = "BWV 924";
-% piece = "\\numfont 1";
-piece = "1";
+% urg?
+%opus = "BWV 924";
+% piece = "1";
 % blz 1
 % Clavierb"uchlein f"ur W. Fr. Bach
 % Clav. W. Fr. Bach: 2-Praeambulum I
@@ -116,4 +114,8 @@ grand_staff = \type GrandStaff <
        \grand_staff
        \include "preludes-paper.ly";
        \midi{ \tempo 4 = 80; }
+       \header {
+               opus = "BWV 924";
+               piece = "1";
+       }
 }
index 65f98fe3ba6c3bae6bd7f777116ed3d68e929e75..75cd4a6db3cdaf00a536c12e34a684562a9ab196 100644 (file)
@@ -1,9 +1,5 @@
 \header{
 filename =      "preludes-2.ly";
-title =         "2";
-opus = "BWV 939";
-% urg?? piece = "\\numfont 2";
-piece = "2";
 % blz 10
 % 
 % Six Petits Pr eludes
@@ -126,5 +122,9 @@ a4 = \paper{
        \grandStaff
        \paper{ \a4 }
        \midi{ \tempo 4 = 100; }
+       \header {
+               opus = "BWV 939";
+               piece = "2";
+       }
 }
 
index 011f3da24a25a26e195bbc0298412d3561dc2175..6361ccd1f239685ed3491b436dca427d0ce74cfb 100644 (file)
@@ -7,10 +7,6 @@ define(t, r16 [$1$4 $2 $3] [$2 $1 $2 $6$1] r $1$7 r $5$1 |)
 
 \header{
 filename =      "preludes-3.ly";
-title =         "3";
-opus =         "BWV 999";
-% piece = "\\numfont 3";
-piece = "3";
 % Pr"aludum in C Moll f"ur Laute
 % blz 16
 % Six Petits Preludes`
@@ -179,4 +175,8 @@ a4 = \paper{
        \grand_staff
        \paper{ \a4 }
        \midi{ \tempo 4 = 100; }
+       \header{
+               opus =  "BWV 999";
+               piece = "3";
+       }
 }
index daf563f99ab9632ad263e09918dd2a507f1c6747..35ee6bbeefa386d0800b60854bded13731e4d214 100644 (file)
@@ -1,9 +1,5 @@
 \header{
 filename =      "preludes-4.ly";
-title =         "4";
-opus = "BWV 925";
-% piece = "\\numfont 4";
-piece = "4";
 % blz 8
 % Clavierb"uchlein f"ur W. Fr. Bach
 % Clav. W. Fr. Bach: 27-Praeludium ex d neutral
@@ -204,4 +200,8 @@ grand_staff = \type GrandStaff <
        \grand_staff    
        \include "preludes-paper.ly";
        \midi{ \tempo 4 = 70; }
+       \header{
+               opus = "BWV 925";
+               piece = "4";
+       }
 }
index 57aff962f3e92282dbf0b42945003a626e4a6a6b..9cca66e1eb8f6166d4977d3a3137fbe356436335 100644 (file)
@@ -1,9 +1,5 @@
 \header{
 filename =      "preludes-5.ly";
-title =         "5";
-% piece = "\\numfont 5";
-piece = "5";
-opus = "BWV 926";
 % blz 2
 % Clavierb"uchlein f"ur W. Fr. Bach
 % Clav. W. Fr. Bach: 4-Praeludium 2
@@ -221,5 +217,9 @@ widea4 = \paper {
        \grand_staff
        \paper{ \widea4 }
        \midi{ \tempo 4 = 90; }
+       \header{
+               piece = "5";
+               opus = "BWV 926";
+       }
 }
 
index 030c149d63393d83f5a1bb84e77a573079699138..ff3f18044624bcd8d51da52efecccc617c1b4ecf 100644 (file)
@@ -1,9 +1,5 @@
 \header{
 filename =      "preludes-6.ly";
-title =         "6";
-% piece = "\\numfont 6";
-piece = "6";
-opus = "BWV 940";
 % blz 11
 % Six Petits Preludes
 % Collection Johann Peter Kellner
@@ -129,5 +125,9 @@ a4 = \paper{
        \grand_staff
        \paper{ \a4 }
        \midi{ \tempo 4 = 40; }
+       \header{
+               piece = "6";
+               opus = "BWV 940";
+       }
 }