]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/score-engraver.cc (initialize): abort if ecrm10.pfa not
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 30 Jul 2004 09:19:35 +0000 (09:19 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 30 Jul 2004 09:19:35 +0000 (09:19 +0000)
found.

* Documentation/user/changing-defaults.itely (Text encoding): node
on encoding.

12 files changed:
ChangeLog
Documentation/user/changing-defaults.itely
input/les-nereides.ly
lily/context-def.cc
lily/include/lily-guile.hh
lily/include/rest.hh
lily/kpath.cc
lily/multi-measure-rest.cc
lily/parser.yy
lily/rest-collision.cc
lily/rest.cc
lily/score-engraver.cc

index f5f79ce292d5ee3ac8110624fc765349e2744336..5d32cb8c8062f1f697c0511c76936e7dc3338627 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2004-07-30  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * lily/score-engraver.cc (initialize): abort if ecrm10.pfa not
+       found.
+
        * lily/text-item.cc (interpret_string): insert encoding setting
        here
 
index 4668b12057766cd065d6ce4991460ede33e540bc..ac3c24f569052b4481e344e347056fff661618d9 100644 (file)
@@ -1695,11 +1695,11 @@ from the @code{\paper} block (or @code{\bookpaper}, if @code{\paper}
 does not specify encoding). The variable @code{inputencoding} may be
 set to a string or symbol specifying  the encoding, eg.
 
-@example
+@verbatim
   \paper {
     inputencoding = "latin1"
   } 
-@end example
+@end verbatim
 
 There is a special encoding, called @code{TeX}. This encoding does not
 reencode text for the font used. Rather, it tries to guess the width
@@ -1716,7 +1716,7 @@ are passed to the output back-end verbatim.
 
 @node  Overview of text markup commands
 @subsection Overview of text markup commands
-}
+
 @include markup-commands.tely
 
 
index d8ee23019ea9748ae83a6b87554b6c5207aee9a6..c6c0806058d35b0971913251318fab6e47488406 100644 (file)
@@ -1,5 +1,5 @@
 #(ly:set-option 'old-relative)
-\version "2.3.4"
+\version "2.3.8"
 \encoding "latin1"
 \header {
     composer = "ARTHUR GRAY"
@@ -298,7 +298,7 @@ theScore = \score{
 
            \consists "Skip_event_swallow_translator"
 
-           \consistsend "Axis_group_engraver"
+           \consists "Axis_group_engraver"
        }
 
        \context {
index ba9f5fec1756f34c3ff018b3e113e9915232311b..797eb172b7548040954643b605e0dd97dbf660ac 100644 (file)
@@ -291,9 +291,10 @@ Context_def::instantiate (SCM ops)
          if (tr->must_be_last ())
            {
              SCM cons = scm_cons (str, SCM_EOL);
-             trans_list = ly_c_pair_p (trans_list)
-               ? scm_set_cdr_x (scm_last_pair (trans_list), cons)
-               : cons;
+             if (ly_c_pair_p (trans_list))
+               scm_set_cdr_x (scm_last_pair (trans_list), cons);
+             else
+               trans_list= cons;
            }
          else
            {
index ad09be7a3cbf70fcf55bd8052dc8d34fa1c9a8be..7e5d5d8e0669dc5b55cbcef64adf9f719070f59e 100644 (file)
@@ -198,6 +198,7 @@ SCM ly_unique (SCM lst);
 SCM ly_list_qsort_uniq_x (SCM lst);
 
 SCM ly_output_formats();
+SCM ly_kpathsea_expand_path (SCM);
 
 /*
   snarfing.
index b6f256af8654dc212c55d9444e87c44f8c5c7dc2..0c8ae0d36b06af572bdfd66dd8975af74b2b106a 100644 (file)
@@ -17,8 +17,8 @@ class  Rest
 public:
   DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM ));
   static bool has_interface (Grob*);
-  static String glyph_name (Grob*, int, String); 
-  static SCM brew_internal_stencil (SCM);
+  static String glyph_name (Grob*, int, String, bool); 
+  static SCM brew_internal_stencil (SCM, bool);
   DECLARE_SCHEME_CALLBACK (extent_callback, (SCM,SCM));
   DECLARE_SCHEME_CALLBACK (polyphonic_offset_callback, (SCM,SCM));
   DECLARE_SCHEME_CALLBACK (print, (SCM ));
index 2db7be8ee137901798a368380845424c4625130b..4eae83af4991b7bacc38361033fe9c8e77afa58d 100644 (file)
@@ -151,7 +151,7 @@ kpathsea_gulp_file_to_string (String name)
 
 LY_DEFINE (ly_kpathsea_expand_path, "ly:kpathsea-expand-path",
           1, 0, 0, (SCM name),
-          "Read the file @var{name}, and return its expanded path, or "
+          "Return the expanded path of @var{name}, or"
           "@code{#f} if not found.")
 {
   SCM_ASSERT_TYPE (ly_c_string_p (name), name, SCM_ARG1, __FUNCTION__, "string");
index 49b6c7b63179b15ab7b78413b71881c467bbe5f4..9ccd2cb1fef9af257634a87ccedb3d7e8e13286d 100644 (file)
@@ -146,7 +146,7 @@ Multi_measure_rest::symbol_stencil (Grob *me, Real space)
     {
       if (to_boolean (sml))
        {
-         Stencil s = musfont->find_by_name (Rest::glyph_name (me, -1, ""));
+         Stencil s = musfont->find_by_name (Rest::glyph_name (me, -1, "", false));
 
          s.translate_axis ((space - s.extent (X_AXIS).length ())/2, X_AXIS);
       
@@ -154,7 +154,7 @@ Multi_measure_rest::symbol_stencil (Grob *me, Real space)
        }
       else
        {
-         Stencil s = musfont->find_by_name (Rest::glyph_name (me, 0, ""));
+         Stencil s = musfont->find_by_name (Rest::glyph_name (me, 0, "", true));
 
          /*
            ugh.
index 1aff96646764f3bf57949bd4e2c1b04e42262215..7fe839ccf00d3570e9875135510d174931c959c5 100644 (file)
@@ -1109,19 +1109,13 @@ Prefix_composite_music:
                SCM nn = THIS->lexer_->lookup_identifier ("drumPitchNames");
                THIS->lexer_->push_note_state (alist_to_hashq (nn));
        }
-       /* FIXME: This used to be: */
-       Music
-/*     Grouped_music_list */
+       Music 
                { $$ = $3;
                  THIS->lexer_->pop_state ();
                }
        | FIGURES
                { THIS->lexer_->push_figuredbass_state (); }
-       /* FIXME: This used to be:
        Music
-       but that breaks web build
-       */
-       Grouped_music_list
                {
                  Music *chm = MY_MAKE_MUSIC ("UntransposableMusic");
                  chm->set_property ("element", $3->self_scm ());
@@ -1137,10 +1131,7 @@ Prefix_composite_music:
                THIS->lexer_->push_chord_state (alist_to_hashq (nn));
 
        }
-       /* FIXME:
        Music
-*/
-       Grouped_music_list
        {
                  Music *chm = MY_MAKE_MUSIC ("UnrelativableMusic");
                  chm->set_property ("element", $3->self_scm ());
@@ -1151,10 +1142,7 @@ Prefix_composite_music:
        }
        | LYRICS
                { THIS->lexer_->push_lyric_state (); }
-       /* FIXME:
        Music
-*/
-       Grouped_music_list
                {
                  $$ = $3;
                  THIS->lexer_->pop_state ();
index 992b12b0e56dd4c59863099206cc5055dd6c1c59..5b18c43359929a94b3d59a6db9fb872e05682ff8 100644 (file)
@@ -60,20 +60,6 @@ Rest_collision::add_column (Grob*me,Grob *p)
 }
 
 
-/*
-  Combination of dot-count and duration-log.
- */
-static SCM
-head_characteristic (Grob * col)
-{
-  Grob * s = unsmob_grob (col->get_property ("rest"));
-
-  if (!s)
-    return SCM_BOOL_F;
-  else
-    return scm_cons (s->get_property ("duration-log"),
-                   scm_int2num (Rhythmic_head::dot_count (s)));
-}
 
 /*
   TODO: look at horizontal-shift to determine ordering between rests
index c5939d2a290f48cbd8348e798fbf4ff4d5657cd9..99bbae0faf2541f4d5664088313fcf4f3564123f 100644 (file)
@@ -54,11 +54,10 @@ Rest::after_line_breaking (SCM smob)
   make this function easily usable in C++
  */
 String
-Rest::glyph_name (Grob *me, int balltype, String style)
+Rest::glyph_name (Grob *me, int balltype, String style, bool try_ledgers)
 {
   bool ledgered_b = false;
-
-  if (balltype == 0 || balltype == 1)
+  if (try_ledgers && (balltype == 0 || balltype == 1))
     {
       Real rad = Staff_symbol_referencer::staff_radius (me) * 2.0;
       Real pos = Staff_symbol_referencer::get_position (me);
@@ -115,7 +114,7 @@ Rest::glyph_name (Grob *me, int balltype, String style)
 MAKE_SCHEME_CALLBACK (Rest,print,1);
 
 SCM
-Rest::brew_internal_stencil (SCM smob)
+Rest::brew_internal_stencil (SCM smob, bool ledgered)
 {
   Grob* me = unsmob_grob (smob);
 
@@ -131,7 +130,7 @@ Rest::brew_internal_stencil (SCM smob)
     style = ly_scm2string (scm_symbol_to_string (style_scm));
 
   Font_metric *fm = Font_interface::get_default_font (me);
-  String font_char = glyph_name (me, balltype, style);
+  String font_char = glyph_name (me, balltype, style, ledgered);
   Stencil out = fm->find_by_name (font_char);
   if (out.is_empty ())
     me->warning (_f ("rest `%s' not found", font_char.to_str0 ()));
@@ -142,7 +141,7 @@ Rest::brew_internal_stencil (SCM smob)
 SCM 
 Rest::print (SCM smob) 
 {
-  return brew_internal_stencil (smob);
+  return brew_internal_stencil (smob, true);
 }
 MAKE_SCHEME_CALLBACK (Rest,extent_callback,2);
 /*
@@ -152,7 +151,16 @@ SCM
 Rest::extent_callback (SCM smob, SCM ax)
 {
   Axis a = (Axis) ly_scm2int (ax);
-  SCM m = brew_internal_stencil (smob);
+
+  /*
+    Don't want ledgers: ledgers depend on Y position, which depends on
+    rest collision, which depends on stem size which depends on beam
+    slop of opposite note column.
+
+    consequence: we get too small extents and potential collisions
+    with ledgered rests.
+   */
+  SCM m = brew_internal_stencil (smob, a != X_AXIS);
   return ly_interval2scm (unsmob_stencil (m)->extent (a));
 }
 
index 9321423219f981385853e2d338b1f9db502e6b3a..8462163debd641e45b41051eb6f799a2a0335898 100644 (file)
@@ -101,7 +101,13 @@ 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 (!ly_c_string_p (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;