]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/score-engraver.cc
* lily/include/lily-guile.hh: compatibility glue for 1.6
[lilypond.git] / lily / score-engraver.cc
index b8e1e9370d241a1e36fc8dcf7ffa88b8f7b962dc..881ff8958f68593f96a823e9d3264428418dfd47 100644 (file)
@@ -15,7 +15,7 @@
 #include "score-engraver.hh"
 #include "paper-score.hh"
 #include "paper-column.hh"
-#include "paper-def.hh"
+#include "output-def.hh"
 #include "axis-group-interface.hh"
 #include "context-def.hh"
 #include "staff-spacing.hh"
@@ -101,11 +101,17 @@ Score_engraver::initialize ()
   Font_metric *fm = all_fonts_global->find_afm ("feta20");
   if (!fm)
     error (_f ("can't find `%s'", "feta20.afm")
-          + "\n" +_ ("Fonts have not been installed properly.  Aborting"));
+          + "\n" +_ ("Music font has not been installed properly.  Aborting"));
+
+  SCM pfa_path = ly_kpathsea_expand_path (scm_makfrom0str ("ecrm10.pfa"));
+  if (!scm_is_string (pfa_path))
+    error (_f ("can't find `%s'", "ecrm10.pfa")
+          + "\n" +_f ("Install the ec-mftraced package from %s. Aborting",
+                      "http://lilypond.org/download/fonts/"));
    
 
   pscore_ = new Paper_score;
-  pscore_->paper_ = dynamic_cast<Paper_def*> (get_output_def ());
+  pscore_->paper_ = dynamic_cast<Output_def*> (get_output_def ());
 
   SCM props = updated_grob_properties (context (), ly_symbol2scm ("System"));
 
@@ -140,7 +146,7 @@ Score_engraver::one_time_step ()
   if (!to_boolean (get_property ("skipTypesetting")))
     {
       recurse_over_translators (context (), &Engraver::process_music, UP);
-      recurse_over_translators (context (), &Engraver::do_announces, UP);
+      Engraver_group_engraver::do_announces();
     }
   
   recurse_over_translators (context (), &Translator::stop_translation_timestep, UP);
@@ -151,15 +157,9 @@ Score_engraver::announce_grob (Grob_info info)
 {
   announce_infos_.push (info);
   pscore_->system_->typeset_grob (info.grob_);
-    elems_.push (info.grob_);
+  elems_.push (info.grob_);
 }
 
-void
-Score_engraver::typeset_grob (Grob *elem)
-{
-  (void) elem;
-  //  elems_.push (elem);
-}
 
 void
 Score_engraver::typeset_all ()
@@ -168,35 +168,8 @@ Score_engraver::typeset_all ()
     {
       Grob * elem = elems_[i];
 
-#if 0
-      if (Spanner *s = dynamic_cast <Spanner *> (elem))
-       {
-         /*
-           do something sensible if spanner not 
-           spanned on 2 items.
-         */
-         Direction d = LEFT;
-         do {
-           if (!s->get_bound (d))
-             {
-               Grob * cc
-                 = unsmob_grob (get_property ("currentCommandColumn"));
-               s->set_bound (d, cc);
-               /* don't warn for empty/suicided spanners,
-                  it makes real warningsinvisible.
-                  maybe should be junked earlier? */
-               if (elem->live ())
-                 elem->warning (_f ("unbound spanner `%s'", s->name ().to_str0 ()));
-             }
-         }
-         while (flip (&d) != LEFT);
-
-         if (dynamic_cast<Item*> (s->get_parent (Y_AXIS)))
-           programming_error ("Spanner Y-parent is an item.");
-       }
-#endif
       
-       if (dynamic_cast<Item*> (elem)) 
+      if (dynamic_cast<Item*> (elem)) 
        {
          if (!elem->get_parent (X_AXIS)
              && elem != command_column_