From dd7ea50545626cf19aad4b720f87b1302bbad2fa Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 27 Mar 2002 00:01:51 +0000 Subject: [PATCH] lilypond-1.3.101 --- CHANGES | 21 +++-- DEDICATION | 10 +-- VERSION | 2 +- input/trip.ly | 2 +- lily/align-interface.cc | 2 +- lily/align-note-column-engraver.cc | 2 +- lily/beam.cc | 18 ++-- lily/break-align-item.cc | 2 - lily/chord-name.cc | 2 +- lily/collision.cc | 3 +- lily/crescendo.cc | 4 +- lily/cross-staff.cc | 2 +- lily/font-interface.cc | 23 ++++-- lily/hyphen-spanner.cc | 7 +- lily/include/font-interface.hh | 1 + lily/line-of-score.cc | 6 +- lily/lyric-engraver.cc | 2 +- lily/lyric-extender.cc | 4 +- lily/mark-engraver.cc | 13 --- lily/multi-measure-rest.cc | 11 +-- lily/rest-collision.cc | 2 +- lily/score-element.cc | 11 +-- lily/script.cc | 2 +- lily/slur.cc | 4 +- lily/spacing-spanner.cc | 4 +- lily/staff-symbol-referencer.cc | 7 +- lily/staff-symbol.cc | 2 +- lily/syllable-group.cc | 2 +- lily/system-start-delimiter-engraver.cc | 2 +- lily/system-start-delimiter.cc | 16 ++-- lily/text-spanner.cc | 5 +- lily/tie.cc | 2 +- lily/time-signature.cc | 6 +- lily/tuplet-spanner.cc | 16 ++-- lily/volta-spanner.cc | 9 +- scm/element-descriptions.scm | 105 +++++++++++------------- 36 files changed, 156 insertions(+), 176 deletions(-) diff --git a/CHANGES b/CHANGES index 4f26feaf91..0c45c08fa7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,19 @@ -1.3.99.hwn2 -=========== + +1.3.101 +======= + +* Custodes (patch by Juergen Reuter), mods by hwn. + +* Font initialisation and markup translation fixes. (99.jcn2) + +* Remove staffspace calls. Removed markScriptPadding. Fixes some +problems with tuplet, brace and volta spanners. + +* make Font_interface::font_alist_chain (), and use default font +settings. Fixes too large time sigs. + +1.3.100 +======= * Tweaks of .scm font-selection. @@ -14,9 +28,6 @@ outputscale. Prepare to deprecate staffspace internally. Rewrote * Made several font size and initialisation fixes. -1.3.98.jcn2 -=========== - * Renamed all occurrences of font-size to font-relative-size * Renamed all occurrences of font-point to font-point-size diff --git a/DEDICATION b/DEDICATION index f6647fe0f1..d889d1fa0c 100644 --- a/DEDICATION +++ b/DEDICATION @@ -5,9 +5,10 @@ met through music. - Those deserving special mentioning (in no particular order): Esther, -Marijke, Heike, Inge, Judith, Hannah, Auke, Ilse, Evelyn, Maartje, Suzanne, -Ilse (gee, again?), Irene and last (but certainly not least) Janneke! + Those deserving special mentioning (in no particular order): +Esther, Marijke, Heike, Inge, Judith, Hannah, Auke, Ilse, Evelyn, +Maartje, Suzanne, Ilse (gee, again?), Marieke, Irene and last (but +certainly not least) Janneke! HWN @@ -20,7 +21,6 @@ Eva, Roos, Judith, Tim, and, of course, Wendy! Of course, our other friends in the `Eindhovens Jongeren Ensemble' -cannot go unmentioned either. - +(http://www.dse.nl/eje/ ) cannot go unmentioned either. --- * --- diff --git a/VERSION b/VERSION index b7c53f15f6..f45f6ae029 100644 --- a/VERSION +++ b/VERSION @@ -1,7 +1,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 -PATCH_LEVEL=100 +PATCH_LEVEL=101 MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a diff --git a/input/trip.ly b/input/trip.ly index a8062f7e62..f5503fd7c9 100644 --- a/input/trip.ly +++ b/input/trip.ly @@ -178,7 +178,7 @@ fugaIIPedal = \notes \relative c { \property Score.midiInstrument = "church organ" \praeludiumRight - r1 \mark "B"; + \times 4/3 { c4 c4 c4 } \mark "B"; \fugaIIRight } \context Staff = bass { \property Staff.instrument = #"left" diff --git a/lily/align-interface.cc b/lily/align-interface.cc index c05787c168..7f31bb0314 100644 --- a/lily/align-interface.cc +++ b/lily/align-interface.cc @@ -88,7 +88,7 @@ Align_interface::do_side_processing (Score_element * me, Axis a) SCM thr = me->get_elt_property ("threshold"); if (gh_pair_p (thr)) { - Real ss = me->paper_l ()-> get_var ("staffspace"); + Real ss = 1.0; threshold[SMALLER] = ss *gh_scm2double (gh_car (thr)); threshold[BIGGER] = ss * gh_scm2double (gh_cdr (thr)); } diff --git a/lily/align-note-column-engraver.cc b/lily/align-note-column-engraver.cc index 431e013fad..426ec31c9b 100644 --- a/lily/align-note-column-engraver.cc +++ b/lily/align-note-column-engraver.cc @@ -104,7 +104,7 @@ Align_note_column_engraver::process_acknowledged () ugh. */ Real extra_space = gh_scm2double(grsp); - SCM e = gh_cons (gh_double2scm (-extra_space * paper_l ()->get_var ("staffspace")), + SCM e = gh_cons (gh_double2scm (-extra_space), gh_double2scm (0.0)); now_column_l_->set_elt_property ("extra-space", e); } diff --git a/lily/beam.cc b/lily/beam.cc index 9bbb4f794c..776ea32631 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -396,10 +396,9 @@ Beam::suspect_slope_b (Score_element*me, Real y, Real dy) /* steep slope running against lengthened stem is suspect */ - Real ss = me->paper_l ()->get_var ("staffspace"); Real first_ideal = Stem::calc_stem_info (first_visible_stem (me)).idealy_f_; Real last_ideal = Stem::calc_stem_info (last_visible_stem (me)).idealy_f_; - Real lengthened = gh_scm2double (me->get_elt_property ("outer-stem-length-limit")) * ss; + Real lengthened = gh_scm2double (me->get_elt_property ("outer-stem-length-limit")); Real steep = gh_scm2double (me->get_elt_property ("slope-limit")); // ugh -> use commonx @@ -443,13 +442,11 @@ Beam::calc_stem_y_f (Score_element*me,Item* s, Real y, Real dy) int beam_multiplicity = get_multiplicity (me); int stem_multiplicity = (Stem::flag_i (s) - 2) >? 0; - Real staffspace = me->paper_l ()->get_var ("staffspace"); - SCM space_proc = me->get_elt_property ("space-function"); SCM space = gh_call1 (space_proc, gh_int2scm (beam_multiplicity)); - Real thick = gh_scm2double (me->get_elt_property ("thickness")) *staffspace; - Real interbeam_f = gh_scm2double (space) * staffspace; + Real thick = gh_scm2double (me->get_elt_property ("thickness")) ; + Real interbeam_f = gh_scm2double (space) ; // ugh -> use commonx Real x0 = first_visible_stem (me)->relative_coordinate (0, X_AXIS); @@ -553,7 +550,7 @@ Beam::quantise_dy_f (Score_element*me,Real dy) SCM proc = me->get_elt_property ("height-quants"); SCM quants = gh_call2 (proc, me->self_scm (), gh_double2scm (me->paper_l ()->get_var ("stafflinethickness") - / me->paper_l ()->get_var ("staffspace"))); + / 1.0)); for (SCM s = quants; gh_pair_p (s); s = gh_cdr (s)) @@ -651,13 +648,12 @@ Beam::stem_beams (Score_element*me,Item *here, Item *next, Item *prev) Real staffline_f = me->paper_l ()->get_var ("stafflinethickness"); int multiplicity = get_multiplicity (me); - Real staffspace =me->paper_l ()->get_var ("staffspace"); SCM space_proc = me->get_elt_property ("space-function"); SCM space = gh_call1 (space_proc, gh_int2scm (multiplicity)); - Real thick = gh_scm2double (me->get_elt_property ("thickness")) *staffspace; - Real interbeam_f = gh_scm2double (space) * staffspace; + Real thick = gh_scm2double (me->get_elt_property ("thickness")) ; + Real interbeam_f = gh_scm2double (space) ; Real bdy = interbeam_f; Real stemdx = staffline_f; @@ -680,7 +676,7 @@ Beam::stem_beams (Score_element*me,Item *here, Item *next, Item *prev) SCM proc = me->get_elt_property ("flag-width-function"); SCM result = gh_call1 (proc, gh_int2scm (t)); - nw_f = gh_scm2double (result) * staffspace; + nw_f = gh_scm2double (result); } diff --git a/lily/break-align-item.cc b/lily/break-align-item.cc index 5eed84b17c..6a9e6eca09 100644 --- a/lily/break-align-item.cc +++ b/lily/break-align-item.cc @@ -79,7 +79,6 @@ Break_align_interface::do_alignment (Score_element *me) Item * item = dynamic_cast (me); Item *column = item->column_l (); - Real interline= me->paper_l ()->get_var ("staffspace"); Link_array elems; Link_array all_elems = Pointer_group_interface__extract_elements (me, (Score_element*)0, @@ -137,7 +136,6 @@ Break_align_interface::do_alignment (Score_element *me) SCM symbol = gh_car (extra_space); Real spc = gh_scm2double (gh_cadr(extra_space)); - spc *= interline; dists.push(spc); symbol_list = gh_cons (symbol, symbol_list); diff --git a/lily/chord-name.cc b/lily/chord-name.cc index 2b17c561b3..4e6f87cdc4 100644 --- a/lily/chord-name.cc +++ b/lily/chord-name.cc @@ -60,7 +60,7 @@ Chord_name::brew_molecule (SCM smob) SCM func = me->get_elt_property (ly_symbol2scm ("chord-name-function")); SCM text = gh_call3 (func, style, pitches, gh_cons (inversion, bass)); - SCM properties = gh_list (me->mutable_property_alist_, me->immutable_property_alist_, SCM_UNDEFINED); + SCM properties = Font_interface::font_alist_chain (me); Molecule mol = Text_item::text2molecule (me, text, properties); SCM space = me->get_elt_property ("word-space"); diff --git a/lily/collision.cc b/lily/collision.cc index 14c0e4fe82..5bfac10d1c 100644 --- a/lily/collision.cc +++ b/lily/collision.cc @@ -47,8 +47,7 @@ Collision::do_shifts(Score_element* me) Link_array done; Real wid - = gh_scm2double (me->get_elt_property ("note-width")) - * me->paper_l ()->get_var ("staffspace"); + = gh_scm2double (me->get_elt_property ("note-width")); for (; gh_pair_p (hand); hand =gh_cdr (hand)) { diff --git a/lily/crescendo.cc b/lily/crescendo.cc index be54a96e62..4ef0ef6ce5 100644 --- a/lily/crescendo.cc +++ b/lily/crescendo.cc @@ -22,7 +22,7 @@ Crescendo::brew_molecule (SCM smob) { Score_element *me= unsmob_element (smob); Spanner *span = dynamic_cast(me); - Real staff_space = me->paper_l ()->get_var ("staffspace"); + Real line = me->paper_l ()->get_var ("stafflinethickness"); Real broken_left = span->get_broken_left_end_align (); @@ -56,7 +56,7 @@ Crescendo::brew_molecule (SCM smob) while (flip (&d) != LEFT); bool continued = broken[Direction (-grow_dir)]; - Real height = staff_space * gh_scm2double (me->get_elt_property ("height")); + Real height = gh_scm2double (me->get_elt_property ("height")); Real thick = line * gh_scm2double (me->get_elt_property ("thickness")); const char* type = (grow_dir < 0) ? "decrescendo" : "crescendo"; diff --git a/lily/cross-staff.cc b/lily/cross-staff.cc index ccd424ce8e..d8a535af1b 100644 --- a/lily/cross-staff.cc +++ b/lily/cross-staff.cc @@ -23,7 +23,7 @@ calc_interstaff_dist (Item *item, Spanner *span) - interstaff = item->paper_l ()->get_var ("staffspace"); + interstaff = 1.0; if (gh_pair_p (threshold)) interstaff = gh_scm2double (gh_car (threshold)) * interstaff; diff --git a/lily/font-interface.cc b/lily/font-interface.cc index 3255c8bd8f..01d9c5e1b7 100644 --- a/lily/font-interface.cc +++ b/lily/font-interface.cc @@ -13,8 +13,23 @@ #include "score-element.hh" #include "paper-def.hh" + +SCM +Font_interface::font_alist_chain (Score_element *me) +{ + SCM defaults = gh_cdr (scm_assoc (ly_symbol2scm ("font-defaults"), + me->paper_l ()->style_sheet_ )); + + SCM ch = gh_list (me->mutable_property_alist_, + me->immutable_property_alist_, + defaults, + SCM_UNDEFINED); + + return ch; +} + /* - todO : split up this func, reuse in text_item? + todo: split up this func, reuse in text_item? */ Font_metric * Font_interface::get_default_font (Score_element*me) @@ -33,11 +48,7 @@ Font_interface::get_default_font (Score_element*me) ss)); assert (gh_procedure_p (proc)); - SCM font_name = gh_call2 (proc, fonts, - gh_list (me->mutable_property_alist_, - me->immutable_property_alist_, - defaults, - SCM_UNDEFINED)); + SCM font_name = gh_call2 (proc, fonts, font_alist_chain (me)); fm = me->paper_l ()->find_font (font_name, 1.0); me->set_elt_property ("font", fm->self_scm ()); diff --git a/lily/hyphen-spanner.cc b/lily/hyphen-spanner.cc index a45a246a88..7827102e91 100644 --- a/lily/hyphen-spanner.cc +++ b/lily/hyphen-spanner.cc @@ -41,16 +41,15 @@ Hyphen_spanner::brew_molecule (SCM smob) } while (flip (&d) != LEFT); - Real ss = sp->paper_l ()->get_var ("staffspace"); Real lt = sp->paper_l ()->get_var ("stafflinethickness"); Real th = gh_scm2double (sp->get_elt_property ("thickness")) * lt ; - Real h = gh_scm2double (sp->get_elt_property ("height")) * ss; - Real l = gh_scm2double (sp->get_elt_property ("minimum-length")) * ss; + Real h = gh_scm2double (sp->get_elt_property ("height")); + Real l = gh_scm2double (sp->get_elt_property ("minimum-length")); // The hyphen can exist in the word space of the left lyric ... SCM space = sp->get_bound (LEFT)->get_elt_property ("word-space"); if (gh_number_p (space)) { - bounds[LEFT] -= gh_scm2double (space)*ss; + bounds[LEFT] -= gh_scm2double (space); } Real w = bounds.length (); /* for length, use a geometric mean of the available space and some minimum diff --git a/lily/include/font-interface.hh b/lily/include/font-interface.hh index 0ce2620c87..34f72a6a6b 100644 --- a/lily/include/font-interface.hh +++ b/lily/include/font-interface.hh @@ -15,6 +15,7 @@ struct Font_interface { + static SCM font_alist_chain (Score_element*); static Font_metric * get_default_font (Score_element*); }; diff --git a/lily/line-of-score.cc b/lily/line-of-score.cc index df4ba207ea..14a37b1d23 100644 --- a/lily/line-of-score.cc +++ b/lily/line-of-score.cc @@ -322,8 +322,6 @@ Line_of_score::post_processing (bool last_line) gh_double2scm (height), SCM_UNDEFINED)); - Real il = paper_l ()->get_var ("staffspace"); - /* all elements. */ @@ -338,8 +336,8 @@ Line_of_score::post_processing (bool last_line) SCM e = sc->get_elt_property ("extra-offset"); if (gh_pair_p (e)) { - o[X_AXIS] += il * gh_scm2double (gh_car (e)); - o[Y_AXIS] += il * gh_scm2double (gh_cdr (e)); + o[X_AXIS] += gh_scm2double (gh_car (e)); + o[Y_AXIS] += gh_scm2double (gh_cdr (e)); } output_molecule (m.get_expr (), o); diff --git a/lily/lyric-engraver.cc b/lily/lyric-engraver.cc index 8ff83dafd8..09e9fc9ee9 100644 --- a/lily/lyric-engraver.cc +++ b/lily/lyric-engraver.cc @@ -52,7 +52,7 @@ Lyric_engraver::do_process_music() (UGH UGH, pulled amount of space out of thin air) */ - text_p_->translate_axis (paper_l()->get_var ("staffspace")*0.66, X_AXIS); + text_p_->translate_axis (0.66, X_AXIS); announce_element (text_p_, req_l_); } diff --git a/lily/lyric-extender.cc b/lily/lyric-extender.cc index 91a0d17f78..cd207ce9ca 100644 --- a/lily/lyric-extender.cc +++ b/lily/lyric-extender.cc @@ -25,9 +25,9 @@ Lyric_extender::brew_molecule (SCM smob) // ugh: refp Real leftext = sp->get_bound (LEFT)->extent (sp->get_bound (LEFT), X_AXIS).length (); - Real ss = sp->paper_l ()->get_var ("staffspace"); + Real ss = 1.0; Real sl = sp->paper_l ()->get_var ("stafflinethickness"); - Real righttrim = 0.5; // default to half a staffspace gap on the right + Real righttrim = 0.5; // default to half a space gap on the right SCM righttrim_scm = sp->get_elt_property("right-trim-amount"); if (gh_number_p (righttrim_scm)) { righttrim = gh_scm2double (righttrim_scm); diff --git a/lily/mark-engraver.cc b/lily/mark-engraver.cc index 629870d6c3..bab3d1d145 100644 --- a/lily/mark-engraver.cc +++ b/lily/mark-engraver.cc @@ -118,19 +118,6 @@ Mark_engraver::create_items (Request *rq) prop = gh_int2scm (UP); } text_p_->set_elt_property ("direction", prop); - - SCM padding = get_property ("markScriptPadding"); - if (gh_number_p(padding)) - { - text_p_->set_elt_property ("padding", padding); - } - else - { - text_p_ - ->set_elt_property ("padding", - gh_double2scm(paper_l ()->get_var ("staffspace"))); - } - announce_element (text_p_, rq); } diff --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc index ceb5657642..e3748f89f8 100644 --- a/lily/multi-measure-rest.cc +++ b/lily/multi-measure-rest.cc @@ -131,13 +131,10 @@ Multi_measure_rest::brew_molecule (SCM smob) if (measures > 1) { - SCM properties = gh_list (me->mutable_property_alist_, - me->immutable_property_alist_, - SCM_UNDEFINED); - Molecule s = - Text_item::text2molecule (me, - ly_str02scm (to_str (measures).ch_C ()), - properties); + SCM properties = Font_interface::font_alist_chain (me); + Molecule s = Text_item::text2molecule (me, + ly_str02scm (to_str (measures).ch_C ()), + properties); s.align_to (X_AXIS, CENTER); s.translate_axis (3.0 * staff_space, Y_AXIS); mol.add_molecule (s); diff --git a/lily/rest-collision.cc b/lily/rest-collision.cc index b09bf84258..efb217c73e 100644 --- a/lily/rest-collision.cc +++ b/lily/rest-collision.cc @@ -189,7 +189,7 @@ Rest_collision::do_shift (Score_element *me, SCM elts) return SCM_UNSPECIFIED; // staff ref'd? - Real staff_space = me->paper_l()->get_var ("staffspace"); + Real staff_space = 1.0; /* FIXME staff_space = rcol->rests[0]->staff_space (); diff --git a/lily/score-element.cc b/lily/score-element.cc index 453b166e04..fbd44eb4f4 100644 --- a/lily/score-element.cc +++ b/lily/score-element.cc @@ -202,8 +202,6 @@ Score_element::preset_extent (SCM element_smob, SCM scm_axis) { Real l = gh_scm2double (gh_car (ext)); Real r = gh_scm2double (gh_cdr (ext)); - l *= s->paper_l ()->get_var ("staffspace"); - r *= s->paper_l ()->get_var ("staffspace"); return ly_interval2scm (Interval (l, r)); } @@ -579,11 +577,10 @@ Score_element::extent (Score_element * refp, Axis a) const /* signs ? */ - Real s = paper_l ()->get_var ("staffspace"); if (gh_pair_p (extra)) { - ext[BIGGER] += s * gh_scm2double (gh_cdr (extra)); - ext[SMALLER] += s * gh_scm2double (gh_car (extra)); + ext[BIGGER] += gh_scm2double (gh_cdr (extra)); + ext[SMALLER] += gh_scm2double (gh_car (extra)); } extra = get_elt_property (a == X_AXIS @@ -591,8 +588,8 @@ Score_element::extent (Score_element * refp, Axis a) const : "minimum-extent-Y"); if (gh_pair_p (extra)) { - ext.unite (Interval (s * gh_scm2double (gh_car (extra)), - s * gh_scm2double (gh_cdr (extra)))); + ext.unite (Interval (gh_scm2double (gh_car (extra)), + gh_scm2double (gh_cdr (extra)))); } ext.translate (x); diff --git a/lily/script.cc b/lily/script.cc index c49e37cd0c..9670115c55 100644 --- a/lily/script.cc +++ b/lily/script.cc @@ -30,7 +30,7 @@ Script::get_molecule(Score_element * me, Direction d) } else if (key == ly_symbol2scm ("accordion")) { - return Lookup::accordion (gh_cdr (s), me->paper_l()->get_var("staffspace"), Font_interface::get_default_font (me)); + return Lookup::accordion (gh_cdr (s), 1.0, Font_interface::get_default_font (me)); } else assert (false); diff --git a/lily/slur.cc b/lily/slur.cc index 07c7fd6843..b7b0c68769 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -403,7 +403,7 @@ Slur::encompass_offset (Score_element*me, leave a gap: slur mustn't touch head/stem */ o[Y_AXIS] += dir * gh_scm2double (me->get_elt_property ("y-free")) * - me->paper_l ()->get_var ("staffspace"); + 1.0; return o; } @@ -490,7 +490,7 @@ Slur::set_spacing_rods (SCM smob) r.item_l_drul_[RIGHT] = sp->get_bound (RIGHT); r.distance_f_ = gh_scm2double (me->get_elt_property ("minimum-length")) - * me->paper_l ()->get_var ("staffspace"); + * 1.0; r.add_to_cols (); return SCM_UNSPECIFIED; diff --git a/lily/spacing-spanner.cc b/lily/spacing-spanner.cc index 71178a0004..c477bd17c2 100644 --- a/lily/spacing-spanner.cc +++ b/lily/spacing-spanner.cc @@ -233,7 +233,7 @@ Spacing_spanner::get_duration_space (Score_element*me, Moment d, Moment shortest Real k = gh_scm2double (me->get_elt_property ("arithmetic-basicspace")) - log; - return (log_2 (d) + k) * gh_scm2double (me->get_elt_property ("arithmetic-multiplier")) * me->paper_l ()->get_var ("staffspace"); + return (log_2 (d) + k) * gh_scm2double (me->get_elt_property ("arithmetic-multiplier")); } @@ -313,8 +313,6 @@ Spacing_spanner::stem_dir_correction (Score_element*me, Score_element*l, Score_e Real correction = 0.0; Real ssc = gh_scm2double (me->get_elt_property("stem-spacing-correction")); - ssc *= me->paper_l ()->get_var ("staffspace"); - if (d1 && d2 && d1 * d2 == -1) { correction = d1 * ssc; diff --git a/lily/staff-symbol-referencer.cc b/lily/staff-symbol-referencer.cc index 9fb2b2bc0d..327ff2141e 100644 --- a/lily/staff-symbol-referencer.cc +++ b/lily/staff-symbol-referencer.cc @@ -52,10 +52,9 @@ Staff_symbol_referencer::staff_space (Score_element*me) Score_element * st = staff_symbol_l (me); if (st) return Staff_symbol::staff_space (st); - else if (me->pscore_l_ && me->paper_l ()) - return me->paper_l ()->get_var ("staffspace"); - - return 0.0; + + + return 1.0; } diff --git a/lily/staff-symbol.cc b/lily/staff-symbol.cc index ff2bfe4a86..e7754b799b 100644 --- a/lily/staff-symbol.cc +++ b/lily/staff-symbol.cc @@ -70,7 +70,7 @@ Staff_symbol::line_count (Score_element*me) Real Staff_symbol::staff_space (Score_element*me ) { - Real ss = me->paper_l ()->get_var ("staffspace"); + Real ss = 1.0; SCM s = me->get_elt_property ("staff-space"); if (gh_number_p (s)) diff --git a/lily/syllable-group.cc b/lily/syllable-group.cc index 66dc8830c4..c03b26a4b6 100644 --- a/lily/syllable-group.cc +++ b/lily/syllable-group.cc @@ -88,7 +88,7 @@ Syllable_group::add_extender(Score_element * extender) // extender->set_elt_property("right-trim-amount", gh_double2scm(0.0)); // Right: - Real ss = extender->paper_l ()->get_var ("staffspace"); + Real ss = 1.0; extender->set_elt_property("right-trim-amount", gh_double2scm(-notehead_l_->extent(notehead_l_, X_AXIS).length()/ss)); } diff --git a/lily/system-start-delimiter-engraver.cc b/lily/system-start-delimiter-engraver.cc index e5abe9cdf4..628ad64fe7 100644 --- a/lily/system-start-delimiter-engraver.cc +++ b/lily/system-start-delimiter-engraver.cc @@ -52,7 +52,7 @@ System_start_delimiter_engraver::acknowledge_element (Score_element_info inf) */ if (gh_symbol_p (gl) && gl == ly_symbol2scm ("brace") && gh_symbol_p (my_gl) && my_gl == ly_symbol2scm ("bracket")) - inf.elem_l_->translate_axis ( -paper_l ()->get_var ("staffspace"), X_AXIS); // ugh + inf.elem_l_->translate_axis ( -1.0, X_AXIS); // ugh } } diff --git a/lily/system-start-delimiter.cc b/lily/system-start-delimiter.cc index 5c345fb3e9..1ad12f6d0c 100644 --- a/lily/system-start-delimiter.cc +++ b/lily/system-start-delimiter.cc @@ -21,22 +21,20 @@ Molecule System_start_delimiter::staff_bracket (Score_element*me,Real height) { Paper_def* p= me->paper_l (); - SCM scmss = p->get_scmvar ("staffspace"); - Real ss = gh_scm2double (scmss); - Real arc_height = gh_scm2double (me->get_elt_property("arch-height")) * ss ; + Real arc_height = gh_scm2double (me->get_elt_property("arch-height")) ; SCM at = gh_list (ly_symbol2scm ("bracket"), - scm_product (me->get_elt_property ("arch-angle"), scmss), - scm_product (me->get_elt_property ("arch-width"), scmss), + me->get_elt_property ("arch-angle"), + me->get_elt_property ("arch-width"), gh_double2scm (arc_height), - scm_product (me->get_elt_property ("bracket-width"),scmss), + me->get_elt_property ("bracket-width"), gh_double2scm (height), - scm_product (me->get_elt_property ("arch-thick"),scmss), - scm_product (me->get_elt_property ("bracket-thick"),scmss), + me->get_elt_property ("arch-thick"), + me->get_elt_property ("bracket-thick"), SCM_UNDEFINED); Real h = height + 2 * arc_height; - Box b (Interval (0, 1.5 * ss), Interval (-h/2, h/2)); + Box b (Interval (0, 1.5), Interval (-h/2, h/2)); Molecule mol (b, at); mol.align_to (X_AXIS, CENTER); return mol; diff --git a/lily/text-spanner.cc b/lily/text-spanner.cc index c74400fe79..dafd1b975e 100644 --- a/lily/text-spanner.cc +++ b/lily/text-spanner.cc @@ -55,9 +55,8 @@ Text_spanner::brew_molecule (SCM smob) text_style = ly_scm2string (s); #endif - SCM properties = gh_list (me->mutable_property_alist_, - me->immutable_property_alist_, - SCM_UNDEFINED); + SCM properties = Font_interface::font_alist_chain (me); + SCM edge_text = me->get_elt_property ("edge-text"); Drul_array edge; if (gh_pair_p (edge_text)) diff --git a/lily/tie.cc b/lily/tie.cc index c68d2ebe20..80363adcec 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -295,7 +295,7 @@ Tie::set_spacing_rods (SCM smob) r.distance_f_ = gh_scm2double (me->get_elt_property ("minimum-length")) - * me->paper_l ()->get_var ("staffspace"); + * 1.0; r.add_to_cols (); return SCM_UNSPECIFIED; } diff --git a/lily/time-signature.cc b/lily/time-signature.cc index 4e3f7e2057..77cc1ab699 100644 --- a/lily/time-signature.cc +++ b/lily/time-signature.cc @@ -52,6 +52,10 @@ Time_signature::special_time_signature (Score_element*me, String s, int n, int d { // First guess: s contains only the signature style String symbolname = "timesig-" + s + to_str (n) + "/" + to_str (d); + + /* + Randomly probing the font sucks? + */ Molecule m = Font_interface::get_default_font (me)->find_by_name (symbolname); if (!m.empty_b()) @@ -70,7 +74,7 @@ Time_signature::special_time_signature (Score_element*me, String s, int n, int d Molecule Time_signature::time_signature (Score_element*me,int num, int den) { - SCM chain = gh_list (me->mutable_property_alist_, me->immutable_property_alist_, SCM_UNDEFINED); + SCM chain = Font_interface::font_alist_chain (me); Molecule n = Text_item::text2molecule (me, ly_str02scm (to_str (num).ch_C ()), diff --git a/lily/tuplet-spanner.cc b/lily/tuplet-spanner.cc index 739a179bc2..312bb37b96 100644 --- a/lily/tuplet-spanner.cc +++ b/lily/tuplet-spanner.cc @@ -70,16 +70,13 @@ Tuplet_spanner::brew_molecule (SCM smob) Real ncw = column_arr.top ()->extent(column_arr.top (), X_AXIS).length (); Real w = dynamic_cast(me)->spanner_length () + ncw; - Real staff_space = me->paper_l ()->get_var ("staffspace"); + Real staff_space = 1.0; Direction dir = Directional_element_interface::get (me); Real dy = gh_scm2double (me->get_elt_property ("delta-y")); SCM number = me->get_elt_property ("text"); if (gh_string_p (number) && number_visibility) { - SCM properties = gh_list ( me->mutable_property_alist_, - me->immutable_property_alist_, - - SCM_UNDEFINED); + SCM properties = Font_interface::font_alist_chain (me); Molecule num = Text_item::text2molecule (me, number, properties); num.align_to (X_AXIS, CENTER); num.translate_axis (w/2, X_AXIS); @@ -93,18 +90,17 @@ Tuplet_spanner::brew_molecule (SCM smob) if (bracket_visibility) { - SCM ss = me->paper_l ()->get_scmvar ("staffspace"); - SCM lt = me->paper_l ()->get_scmvar ("stafflinethickness"); + Real lt = me->paper_l ()->get_var ("stafflinethickness"); SCM thick = me->get_elt_property ("thick"); SCM gap = me->get_elt_property ("number-gap"); SCM at =gh_list(ly_symbol2scm ("tuplet"), - ss, - scm_product (gap, ss), + gh_double2scm (1.0), + gap, gh_double2scm (w), gh_double2scm (dy), - scm_product (thick, lt), + gh_double2scm (gh_scm2double (thick)* lt), gh_int2scm (dir), SCM_UNDEFINED); diff --git a/lily/volta-spanner.cc b/lily/volta-spanner.cc index 7dde58677c..7db9f65936 100644 --- a/lily/volta-spanner.cc +++ b/lily/volta-spanner.cc @@ -60,9 +60,8 @@ Volta_spanner::brew_molecule (SCM smob) no_vertical_end = false; #endif - Real staff_space = me->paper_l ()->get_var ("staffspace"); Real staff_thick = me->paper_l ()->get_var ("stafflinethickness"); - Real half_space = staff_space / 2; + Real half_space = 0.5; /* the volta spanner is attached to the bar-line, which is moved @@ -70,8 +69,8 @@ Volta_spanner::brew_molecule (SCM smob) */ Real left = 0.0; Real w = dynamic_cast(me)->spanner_length () - left - half_space; - Real h = staff_space * gh_scm2double (me->get_elt_property ("height")); - Real t = staff_thick * gh_scm2double (me->get_elt_property ("thickness")); + Real h = gh_scm2double (me->get_elt_property ("height")); + Real t = staff_thick * gh_scm2double (me->get_elt_property ("thickness")); /* ugh: should build from line segments. @@ -91,7 +90,7 @@ Volta_spanner::brew_molecule (SCM smob) Molecule num = Text_item::text2molecule (me, text, properties); mol.add_at_edge (X_AXIS, LEFT, num, - num.extent (X_AXIS).length () - - staff_space); + - 1.0); mol.translate_axis (left, X_AXIS); return mol.create_scheme(); } diff --git a/scm/element-descriptions.scm b/scm/element-descriptions.scm index 8678154715..0a92527b7f 100644 --- a/scm/element-descriptions.scm +++ b/scm/element-descriptions.scm @@ -1,4 +1,3 @@ - ; distances are given in stafflinethickness (thicknesses) and ; staffspace (distances) @@ -38,9 +37,7 @@ (visibility-lambda . ,begin-of-line-visible) (padding . 1.0) (direction . 1) - (markup-to-properties . ,markup-to-properties) (font-family . roman) - (font-relative-size . -1) (meta . ,(element-description "BarNumber" text-interface font-interface break-aligned-interface)) @@ -91,18 +88,20 @@ (molecule-callback . ,Chord_name::brew_molecule) (after-line-breaking-callback . ,Chord_name::after_line_breaking) (chord-name-function . ,default-chord-name-function) - (markup-to-properties . ,markup-to-properties) - (meta . ,(element-description "ChordNames" font-interface chord-name-interface)) - )) - - (NoteCollision . ( - (axes 0 1) - (note-width . 1.65) - (meta . ,(element-description "NoteCollision" - note-collision-interface axis-group-interface - )) + (font-family . roman) + (meta . ,(element-description "ChordNames" font-interface text-interface chord-name-interface)) )) + (Custos . ( + (break-align-symbol . Custos) + (breakable . #t ) + (molecule-callback . ,Custos::brew_molecule) + (visibility-lambda . ,end-of-line-visible) + (style . "vaticana") + (Y-offset-callbacks . (,Staff_symbol_referencer::callback)) + (meta . ,(element-description "Custos" custos-interface staff-symbol-interface break-aligned-interface) ) + )) + (Crescendo . ( (molecule-callback . ,Crescendo::brew_molecule) (thickness . 1.0) @@ -133,16 +132,16 @@ (Y-offset-callbacks . (,Side_position::aligned_on_self)) (molecule-callback . ,Text_item::brew_molecule) (script-priority . 100) - (font-style . dynamic) - (markup-to-properties . ,markup-to-properties) + (font-series . bold) + (font-family . dynamic) (self-alignment-Y . 0) (meta . ,(element-description "DynamicText" font-interface text-interface )) )) (DynamicLineSpanner . ( (axes . ( 1)) - (padding . 3) - (minimum-space . 6) + (padding . 0.6) + (minimum-space . 1.2) (meta . ,(element-description "DynamicLineSpanner" dynamic-interface axis-group-interface side-position-interface)) )) @@ -156,11 +155,11 @@ (Fingering . ( (molecule-callback . ,Text_item::brew_molecule) (X-offset-callbacks . (,Side_position::centered_on_parent ,Side_position::aligned_on_self)) - (padding . 3.0) + (padding . 0.6) (self-alignment-X . 0) - - (font-style . finger) - (markup-to-properties . ,markup-to-properties) + (font-family . number) + (font-relative-size . -3) + (font-shape . upright) (meta . ,(element-description "Fingering" finger-interface font-interface text-script-interface text-interface side-position-interface)) )) @@ -196,7 +195,6 @@ (molecule-callback . ,Text_item::brew_molecule) (break-align-symbol . Instrument_name) (visibility-lambda . ,begin-of-line-visible) - (markup-to-properties . ,markup-to-properties) (font-family . roman) (meta . ,(element-description "InstrumentName" font-interface text-interface break-aligned-interface)) )) @@ -237,23 +235,20 @@ (self-alignment-X . 0) (non-rhythmic . #t) (word-space . 0.6) - - (markup-to-properties . ,markup-to-properties) (font-family . roman) (font-shape . upright) (font-relative-size . 0) - (meta . ,(element-description "LyricText" lyric-syllable-interface text-interface font-interface )) )) (RehearsalMark . ( - (molecule-callback . ,Text_item::brew_molecule) - (breakable . #t) - (markup-to-properties . ,markup-to-properties) - (font-style . mark) - (visibility-lambda . ,end-of-line-invisible) - (padding . 4.0) - (meta . ,(element-description "RehearsalMark" mark-interface side-position-interface)) + (molecule-callback . ,Text_item::brew_molecule) + (breakable . #t) + (font-family . number) + (font-relative-size . 1) + (visibility-lambda . ,end-of-line-invisible) + (padding . 0.8) + (meta . ,(element-description "RehearsalMark" mark-interface side-position-interface)) )) (MultiMeasureRest . ( @@ -263,10 +258,17 @@ (expand-limit . 10) (padding . 2.0) ; staffspace (minimum-width . 12.5) ; staffspace - (markup-to-properties . ,markup-to-properties) - (font-style . mmrest) + (font-family . number) + (font-relative-size . 1) (meta . ,(element-description "MultiMeasureRest" multi-measure-rest-interface font-interface )) )) + (NoteCollision . ( + (axes 0 1) + (note-width . 1.65) + (meta . ,(element-description "NoteCollision" + note-collision-interface axis-group-interface + )) + )) (NoteColumn . ( (axes . (0 1)) @@ -285,7 +287,6 @@ (NoteName . ( (style . default) (molecule-callback . ,Text_item::brew_molecule) - (markup-to-properties . ,markup-to-properties) (meta . ,(element-description "NoteName" note-name-interface font-interface general-element-interface)) @@ -299,8 +300,6 @@ (Y-offset-callbacks . (,Side_position::aligned_side)) (molecule-callback . ,Text_item::brew_molecule) (font-shape . italic) - (markup-to-properties . ,markup-to-properties) - (meta . ,(element-description "OctavateEight" text-interface font-interface )) )) @@ -380,9 +379,8 @@ (molecule-callback . ,Text_item::brew_molecule) (break-align-symbol . Clef_item) (visibility-lambda . ,begin-of-line-visible) - (markup-to-properties . ,markup-to-properties) (font-family . roman) -(meta . ,(element-description "StanzaNumber" break-aligned-interface text-interface font-interface)) + (meta . ,(element-description "StanzaNumber" break-aligned-interface text-interface font-interface)) )) (StaffSymbol . ( @@ -399,8 +397,6 @@ ,Side_position::centered_on_parent)) (no-spacing-rods . #t) (font-shape . italic) - (markup-to-properties . ,markup-to-properties) - (self-alignment-X . 0) (meta . ,(element-description "SostenutoPedal" text-interface font-interface)) )) @@ -446,8 +442,8 @@ (self-alignment-X . 0) (X-offset-callbacks . (,Side_position::aligned_on_self)) (Y-offset-callbacks . - (,Side_position::aligned_side - ,Side_position::centered_on_parent)) + (,Side_position::aligned_side + ,Side_position::centered_on_parent)) (meta . ,(element-description "SustainPedal" sustain-pedal-interface side-position-interface font-interface)) )) @@ -474,16 +470,14 @@ (molecule-callback . ,Text_item::brew_molecule) (no-spacing-rods . #t) (padding . 0.5) - (markup-to-properties . ,markup-to-properties) - (font-family . roman) - (font-shape . italic) - (font-relative-size . 0) + (font-family . roman) + (font-shape . italic) + (font-relative-size . 0) (meta . ,(element-description "TextScript" text-script-interface text-interface side-position-interface font-interface )) )) (TextSpanner . ( (molecule-callback . ,Text_spanner::brew_molecule) (font-shape . italic) - (markup-to-properties . ,markup-to-properties) (type . "line") (direction . 1) (meta . ,(element-description "TextSpanner" text-spanner-interface font-interface)) @@ -509,9 +503,8 @@ (break-align-symbol . Time_signature) (visibility-lambda . ,all-visible) (breakable . #t) - (markup-to-properties . ,markup-to-properties) - (font-style . timesig) - (meta . ,(element-description "TimeSignature" time-signature-interface font-interface)) + (font-family . number) + (meta . ,(element-description "TimeSignature" time-signature-interface font-interface)) )) (TupletBracket . ( @@ -520,8 +513,8 @@ (thick . 1.0) (after-line-breaking-callback . ,Tuplet_spanner::after_line_breaking) (molecule-callback . ,Tuplet_spanner::brew_molecule) - (markup-to-properties . ,markup-to-properties) - (font-style . tuplet) + (font-shape . italic) + (font-relative-size . -1) (meta . ,(element-description "TupletBracket" text-interface tuplet-bracket-interface font-interface)) )) @@ -529,7 +522,6 @@ (UnaChordaPedal . ( (molecule-callback . ,Text_item::brew_molecule) (font-shape . italic) - (markup-to-properties . ,markup-to-properties) (no-spacing-rods . #t) (self-alignment-X . 0) (X-offset-callbacks . (,Side_position::aligned_on_self)) @@ -544,12 +536,13 @@ (direction . 1) (padding . 1) - (markup-to-properties . ,markup-to-properties) (font-style . volta) (Y-offset-callbacks . (,Side_position::aligned_side)) (thickness . 1.6) ; stafflinethickness (height . 2.0) ; staffspace; - (minimum-space . 25) + (minimum-space . 5) + (font-family . number) + (font-relative-size . -2) (meta . ,(element-description "VoltaBracket" volta-bracket-interface side-position-interface font-interface)) )) -- 2.39.5