From: Han-Wen Nienhuys Date: Fri, 30 Jul 2004 09:19:35 +0000 (+0000) Subject: * lily/score-engraver.cc (initialize): abort if ecrm10.pfa not X-Git-Tag: release/2.3.10~33 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=5694526fef4174d293071c15729ac6b7dd6387f1;p=lilypond.git * lily/score-engraver.cc (initialize): abort if ecrm10.pfa not found. * Documentation/user/changing-defaults.itely (Text encoding): node on encoding. --- diff --git a/ChangeLog b/ChangeLog index f5f79ce292..5d32cb8c80 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2004-07-30 Han-Wen Nienhuys + * lily/score-engraver.cc (initialize): abort if ecrm10.pfa not + found. + * lily/text-item.cc (interpret_string): insert encoding setting here diff --git a/Documentation/user/changing-defaults.itely b/Documentation/user/changing-defaults.itely index 4668b12057..ac3c24f569 100644 --- a/Documentation/user/changing-defaults.itely +++ b/Documentation/user/changing-defaults.itely @@ -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 diff --git a/input/les-nereides.ly b/input/les-nereides.ly index d8ee23019e..c6c0806058 100644 --- a/input/les-nereides.ly +++ b/input/les-nereides.ly @@ -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 { diff --git a/lily/context-def.cc b/lily/context-def.cc index ba9f5fec17..797eb172b7 100644 --- a/lily/context-def.cc +++ b/lily/context-def.cc @@ -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 { diff --git a/lily/include/lily-guile.hh b/lily/include/lily-guile.hh index ad09be7a3c..7e5d5d8e06 100644 --- a/lily/include/lily-guile.hh +++ b/lily/include/lily-guile.hh @@ -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. diff --git a/lily/include/rest.hh b/lily/include/rest.hh index b6f256af86..0c8ae0d36b 100644 --- a/lily/include/rest.hh +++ b/lily/include/rest.hh @@ -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 )); diff --git a/lily/kpath.cc b/lily/kpath.cc index 2db7be8ee1..4eae83af49 100644 --- a/lily/kpath.cc +++ b/lily/kpath.cc @@ -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"); diff --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc index 49b6c7b631..9ccd2cb1fe 100644 --- a/lily/multi-measure-rest.cc +++ b/lily/multi-measure-rest.cc @@ -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. diff --git a/lily/parser.yy b/lily/parser.yy index 1aff966467..7fe839ccf0 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -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 (); diff --git a/lily/rest-collision.cc b/lily/rest-collision.cc index 992b12b0e5..5b18c43359 100644 --- a/lily/rest-collision.cc +++ b/lily/rest-collision.cc @@ -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 diff --git a/lily/rest.cc b/lily/rest.cc index c5939d2a29..99bbae0faf 100644 --- a/lily/rest.cc +++ b/lily/rest.cc @@ -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)); } diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index 9321423219..8462163deb 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -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;