From e848a14d4f588396e45d93f9f8190b1235626c25 Mon Sep 17 00:00:00 2001 From: fred <fred> Date: Wed, 27 Mar 2002 00:48:10 +0000 Subject: [PATCH] lilypond-1.3.123 --- input/star-spangled-banner.ly | 2 +- input/test/volta.ly | 2 + lily/font-interface.cc | 29 +++++++------ lily/include/font-interface.hh | 1 + ly/property.ly | 4 ++ mf/feta-banier.mf | 17 +++++--- mutopia/J.S.Bach/pa.ly | 36 +++++++++------- scm/clef.scm | 1 - scm/font.scm | 77 +++++++++++++++++----------------- scripts/ly2dvi.py | 14 +++---- 10 files changed, 102 insertions(+), 81 deletions(-) diff --git a/input/star-spangled-banner.ly b/input/star-spangled-banner.ly index a4ee1e373d..339826fb6b 100644 --- a/input/star-spangled-banner.ly +++ b/input/star-spangled-banner.ly @@ -152,7 +152,7 @@ text = \lyrics { \context Staff=lower < \global \clef bass; - \property Staff.noVoltaBraces = ##t + \property Staff.VoltaBracket = \turnOff \context Voice = three { \stemUp \staffCVoiceB diff --git a/input/test/volta.ly b/input/test/volta.ly index 4a038334d4..927fe285d8 100644 --- a/input/test/volta.ly +++ b/input/test/volta.ly @@ -6,6 +6,8 @@ voiceE = \notes { \clef bass; \property Staff.instrument = "Bass" \property Staff.instr = "B" +% \property Staff.VoltaBracket = \turnOff + \time 4/4; f,2 ( ) f,8 r8 f8 e8 \repeat volta 2 { diff --git a/lily/font-interface.cc b/lily/font-interface.cc index d5a15ab2d9..c281756c45 100644 --- a/lily/font-interface.cc +++ b/lily/font-interface.cc @@ -99,7 +99,7 @@ so a 14% speedup. */ -static SCM name_sym, shape_sym, family_sym, series_sym, rel_sz_sym, pt_sz_sym; +static SCM name_sym, shape_sym, family_sym, series_sym, rel_sz_sym, pt_sz_sym, wild_sym; static void @@ -111,8 +111,14 @@ init_syms () series_sym = scm_permanent_object (ly_symbol2scm ("font-series")); rel_sz_sym = scm_permanent_object (ly_symbol2scm ("font-relative-size")); pt_sz_sym = scm_permanent_object (ly_symbol2scm ("font-point-size")); + wild_sym = scm_permanent_object (ly_symbol2scm ("*")); } +bool +Font_interface::wild_compare(SCM field_val, SCM val) +{ + return (val == SCM_BOOL_F || field_val == wild_sym || field_val == val); +} ADD_SCM_INIT_FUNC(Font_interface_syms,init_syms); @@ -163,31 +169,29 @@ Font_interface::properties_to_font_name (SCM fonts, SCM alist_chain) if (name != SCM_BOOL_F) { - if (scm_list_ref (qlist, gh_int2scm (4)) != name) + if (!wild_compare(scm_list_ref (qlist, gh_int2scm (4)), name)) continue; } else { - if (series != SCM_BOOL_F - && scm_list_ref (qlist, gh_int2scm (1)) != series) + if (!wild_compare(scm_list_ref (qlist, gh_int2scm (1)), series)) continue; - if (shape != SCM_BOOL_F - && scm_list_ref (qlist, gh_int2scm (2)) != shape) + if (!wild_compare(scm_list_ref (qlist, gh_int2scm (2)), shape)) continue; - if (family != SCM_BOOL_F - && scm_list_ref (qlist, gh_int2scm (3)) != family) + if (!wild_compare(scm_list_ref (qlist, gh_int2scm (3)), family)) continue; } if (point_sz != SCM_BOOL_F) { - if (scm_list_ref (qlist, gh_int2scm (4)) != name) + // This if statement will always be true since name must + // be SCM_BOOL_F here, right? /MB + if (!wild_compare(scm_list_ref (qlist, gh_int2scm (4)), name)) continue; } else { - if (rel_sz != SCM_BOOL_F - && gh_car (qlist) != rel_sz) + if (!wild_compare(gh_car (qlist), rel_sz)) continue; } @@ -198,7 +202,8 @@ Font_interface::properties_to_font_name (SCM fonts, SCM alist_chain) warning (_("couldn't find any font satisfying ") ); scm_write (gh_list (name, point_sz, shape, series , family, rel_sz, SCM_UNDEFINED), scm_current_error_port ()); - + scm_flush(scm_current_error_port ()); + return ly_str02scm ("cmr10"); } diff --git a/lily/include/font-interface.hh b/lily/include/font-interface.hh index 52189a10f4..e18cc9f3ef 100644 --- a/lily/include/font-interface.hh +++ b/lily/include/font-interface.hh @@ -19,6 +19,7 @@ struct Font_interface static Font_metric * get_font (Grob*, SCM alist_chain); static Font_metric * get_default_font (Grob*); static SCM add_style (Grob*, SCM style, SCM alist_chain); + static bool wild_compare(SCM field_val, SCM val); DECLARE_SCHEME_CALLBACK(properties_to_font_name, (SCM,SCM)); }; diff --git a/ly/property.ly b/ly/property.ly index f51b8c8519..95ba08ca18 100644 --- a/ly/property.ly +++ b/ly/property.ly @@ -86,3 +86,7 @@ autoBeamOn = \property Voice.noAutoBeaming = ##f emptyText = \property Voice.textNonEmpty = ##f fatText = \property Voice.textNonEmpty = ##t +% To remove a Volta bracet or some other graphical object, +% set it to turnOff. Example: \property Staff.VoltaBracket = turnOff + +turnOff = #'((meta . ((interfaces . ())))) diff --git a/mf/feta-banier.mf b/mf/feta-banier.mf index 8f68b5f5cf..4795c82513 100644 --- a/mf/feta-banier.mf +++ b/mf/feta-banier.mf @@ -17,11 +17,10 @@ right_downflag_space# = .2 downflag_width#; % Flags pointing down cannot overlap with the notehead in y-direction, % so they have less slant. -% % Because of optical illusion, the utmost flag (bottom for % down-pointing, top for up-pointing) should be smaller than the other -% flags. Adobe Sonata doesn't do this correctly. (Instead they have an -% extension flag. Yuck) +% flags. Adobe Sonata doesn't do this correctly. (Instead they have +% an extension flag, which looks less elegant) % save hip_thickness, foot_thickness; @@ -433,17 +432,23 @@ fet_beginchar("grace dash (down)", "dgrace", "dgracedash") fet_endchar; % ustem? +% +% +% Stem characters so we can compose metronome markings with Feta +% entirely. +% + fet_beginchar("stem (up)", "stem", "stem") - set_char_box(stemthickness#/2, 0, 3.5staff_space#, stemthickness#/2); + set_char_box(stemthickness#/2, stemthickness#/2, 0, 3.5staff_space#); pickup pencircle scaled stemthickness; draw (0, 0.2staff_space) .. (0, 3.5staff_space); fet_endchar; % do we want this? fet_beginchar("stem (down)", "dstem", "dstem") - set_char_box(stemthickness#/2, -3.5staff_space#, 0, stemthickness#/2); + set_char_box(stemthickness#/2, stemthickness#/2, 3.5staff_space#, 0); pickup pencircle scaled stemthickness; - draw (0, -0.2staff_space) .. (-3.5staff_space, 0); + draw (0, -0.2staff_space) .. (0, -3.5staff_space); fet_endchar; diff --git a/mutopia/J.S.Bach/pa.ly b/mutopia/J.S.Bach/pa.ly index 94132512ba..456e79f926 100644 --- a/mutopia/J.S.Bach/pa.ly +++ b/mutopia/J.S.Bach/pa.ly @@ -1,3 +1,4 @@ +\version "1.3.122" \header { filename = "pa.ly"; title = "Wachet auf, ruft uns die Stimme"; @@ -11,8 +12,8 @@ commands = \notes { \time 4/4; - \property Staff.timeSignatureStyle = "C" - \key es; + \property Staff.TimeSignature \override #'style = #'C + \key es \major; \partial 8; } @@ -24,7 +25,7 @@ right = \notes \relative c' { %if stable % \property Voice."beamAutoEnd_8" = "1/4" - \property Voice."beamAutoEnd_8" = #(make-moment 1 4) + \property Voice.autoBeamSettings \override #'(end 1 8 * *) = #(make-moment 1 4) bes8 | es16 f g8 g f as g bes, as | \repeat "volta" 2 { @@ -34,7 +35,7 @@ right = \notes \relative c' { bes4 as16 g f es f es d c bes8 c16 d | es f g f as g f es g8 f r bes, | g' a4 bes8 \grace f8()es16 d es8 r c | - a'8 bes4 c8 \grace f,()es16 d es8 r \grace{\slurdown [c'16( d ]}\stemboth)es8 | + a'8 bes4 c8 \grace f,()es16 d es8 r \grace{\slurDown [c'16( d ]}\stemBoth)es8 | d16 c bes8 bes16\prall a bes8 ~bes16 a g f es d c bes| c d es8 \grace f()es16 d es8~es16 a bes c bes a g f | bes8 f d\trill c16 bes bes es d c d8 bes| @@ -50,11 +51,11 @@ right = \notes \relative c' { } \alternative { { g8 f r4 r r8 bes,| es16 f g8 g f as g bes, as } - { g'8 f r4 r r8 bes | } } - bes4 as16 g f es f es d c bes8 c16 d | + { g8 f r4 r r8 bes | } } + bes'4 as16 g f es f es d c bes8 c16 d | es f g f as g f es g8 f r bes, | - g' a4 bes8 \grace f() es16 d es8 r c | - a' bes4 c8 \grace f,()es16 d es8 r es' | + g' a4 bes8 \grace {f(}) es16 d es8 r c | + a' bes4 c8 \grace {f,(})es16 d es8 r es' | d16 c bes8 bes16\prall a bes8~bes16 a g f es d c bes| c d es8 es16\prall d es8~es16 a bes c bes a g f| bes8 f d\trill c16 bes bes es d c d8 bes| @@ -116,8 +117,9 @@ left = \notes \relative c { %if stable % \property Staff.noVoltaBraces = 1 % \property Voice."beamAutoEnd_8" = "1/4" - \property Voice."beamAutoEnd_8" = #(make-moment 1 4) - \property Staff.noVoltaBraces = ##t + \property Voice.autoBeamSettings \override #'(end 1 8 * *) = #(make-moment 1 4) +% \property Staff.noVoltaBraces = ##t + \property Staff.VoltaBracket = \turnOff r8 R1 \repeat "volta" 2 { @@ -133,8 +135,8 @@ left = \notes \relative c { } \alternative { { c g8. as32 bes as8 g f4\trill| es2 r | } - { c'4 g8. as32 bes as8 g f4\trill |} } - es2 r | + { c4 g8. as32 bes as8 g f4\trill |} } + es,2 r | R1*6 | r2 r4 bes'4| bes as g f\trill | @@ -161,7 +163,8 @@ pedal = \notes \relative c, { \commands %if stable % \property Staff.noVoltaBraces = 1 - \property Staff.noVoltaBraces = ##t +% \property Staff.noVoltaBraces = ##t + \property Staff.VoltaBracket = \turnOff \clef "bass"; r8 | es4 es es g @@ -187,7 +190,7 @@ pedal = \notes \relative c, { bes as! g es |} \alternative { { as8 bes c4 f, bes8 as| g4 es' d es |} - { as,8 bes c4 f, bes8 as}} + { as8 bes c4 f, bes8 as}} g4 c bes as | g es bes' d| es d c es| @@ -248,8 +251,9 @@ pedal = \notes \relative c, { \paper { %textheight = 280.0 \mm; % landscape: - textheight = 160.0 \mm; - linewidth = 290.0 \mm; +% textheight = 160.0 \mm; + orientation = "landscape"; + linewidth = 280.0 \mm; %{ \translator { \OrchestralScoreContext diff --git a/scm/clef.scm b/scm/clef.scm index 1f90908b2e..75451eafe2 100644 --- a/scm/clef.scm +++ b/scm/clef.scm @@ -19,7 +19,6 @@ ("bass" . ("clefs-F" 2 0)) ("F" . ( "clefs-F" 2 0)) ("subbass" . ("clefs-F" 4 0)) - ("none" . ("" 0 0)) ;; should move mensural stuff to separate file? ("vaticana_do1" . ("clefs-vaticana_do" -1 0)) diff --git a/scm/font.scm b/scm/font.scm index b77414dc4f..ffa1c28c47 100644 --- a/scm/font.scm +++ b/scm/font.scm @@ -45,7 +45,8 @@ (define (filter-field field-name value font-descr-alist) "return those descriptions from FONT-DESCR-LIST whose FIELD-NAME matches VALUE" (filter-list - (lambda (x) (eq? value (font-field field-name (car x)))) + (lambda (x) (let* (field-value (font-field field-name (car x))) + (or (eq? field-value '*) (eq? value field-value)))) font-descr-alist) ) @@ -101,36 +102,36 @@ ((-5 medium upright typewriter cmtt 4) . "cmtt4" ) ;; should use the same brace font every where and fix C++ code. - ((2 medium upright braces feta-braces 26) . "feta-braces26") - ((1 medium upright braces feta-braces 23) . "feta-braces23") - ((0 medium upright braces feta-braces 20) . "feta-braces20") - ((-1 medium upright braces feta-braces 16) . "feta-braces16") - ((-2 medium upright braces feta-braces 13) . "feta-braces13") - ((-3 medium upright braces feta-braces 11) . "feta-braces11") - - ((3 bold italic dynamic feta-din 19) . "feta-din19") - ((2 bold italic dynamic feta-din 19) . "feta-din19") - ((1 bold italic dynamic feta-din 17) . "feta-din17") - ((0 bold italic dynamic feta-din 14) . "feta-din14") - ((-1 bold italic dynamic feta-din 12) . "feta-din12") - ((-2 bold italic dynamic feta-din 9) . "feta-din9") - ((-3 bold italic dynamic feta-din 8) . "feta-din8") - ((-4 bold italic dynamic feta-din 7) . "feta-din7") - ((-5 bold italic dynamic feta-din 6) . "feta-din6") - - ((2 medium upright music feta 26) . "feta26") - ((1 medium upright music feta 23) . "feta23") - ((0 medium upright music feta 20) . "feta20") - ((-0.5 medium upright music feta 20) . "feta19") - ((-1 medium upright music feta 16) . "feta16") - ((-2 medium upright music feta 13) . "feta13") - ((-3 medium upright music feta 11) . "feta11") - ((-4 medium upright music feta 11) . "feta11") - - ((0 medium upright math msam 10) . "msam10") - ((-1 medium upright math msam 10) . "msam10") - ((-2 medium upright math msam 10) . "msam10") - ((-3 medium upright math msam 10) . "msam10") + ((2 * * braces feta-braces 26) . "feta-braces26") + ((1 * * braces feta-braces 23) . "feta-braces23") + ((0 * * braces feta-braces 20) . "feta-braces20") + ((-1 * * braces feta-braces 16) . "feta-braces16") + ((-2 * * braces feta-braces 13) . "feta-braces13") + ((-3 * * braces feta-braces 11) . "feta-braces11") + + ((3 * * dynamic feta-din 19) . "feta-din19") + ((2 * * dynamic feta-din 19) . "feta-din19") + ((1 * * dynamic feta-din 17) . "feta-din17") + ((0 * * dynamic feta-din 14) . "feta-din14") + ((-1 * * dynamic feta-din 12) . "feta-din12") + ((-2 * * dynamic feta-din 9) . "feta-din9") + ((-3 * * dynamic feta-din 8) . "feta-din8") + ((-4 * * dynamic feta-din 7) . "feta-din7") + ((-5 * * dynamic feta-din 6) . "feta-din6") + + ((2 * * music feta 26) . "feta26") + ((1 * * music feta 23) . "feta23") + ((0 * * music feta 20) . "feta20") + ((-0.5 * * music feta 20) . "feta19") + ((-1 * * music feta 16) . "feta16") + ((-2 * * music feta 13) . "feta13") + ((-3 * * music feta 11) . "feta11") + ((-4 * * music feta 11) . "feta11") + + ((0 * * math msam 10) . "msam10") + ((-1 * * math msam 10) . "msam10") + ((-2 * * math msam 10) . "msam10") + ((-3 * * math msam 10) . "msam10") )) ;; @@ -199,7 +200,7 @@ (script . ((font-family . roman) (font-relative-size . -1))) (large . ((font-family . roman) (font-relative-size . 1))) (Large . ((font-series . bold) (font-family . roman) (font-relative-size . 2))) - (dynamic . ((font-series . bold) (font-family . dynamic) (font-relative-size . 0))) + (dynamic . ((font-family . dynamic) (font-relative-size . 0))) )) (properties-to-font . ,Font_interface::properties_to_font_name) @@ -212,7 +213,7 @@ . ((rows . ((align . 0))) (lines . ((align . 1))) (roman . ((font-family . roman))) - (music . ((font-family . music) (font-shape . upright) (lookup . name))) + (music . ((font-family . music) (lookup . name))) (finger . ((font-style . finger))) (bold . ((font-series . bold))) (italic . ((font-shape . italic))) @@ -271,11 +272,11 @@ and warn if the selected font is not unique. (display "\ncouldn't find unique font satisfying " err) (write qualifiers err) (display " found " err) - (if (null? fonts) - (display "none" err) - (write (map cdr fonts) err)) - )) - + (if (null? fonts) + (display "none" err) + (write (map cdr fonts) err)) + )) + (if (null? fonts) "cmr10" (cdar fonts)) ; return the topmost. diff --git a/scripts/ly2dvi.py b/scripts/ly2dvi.py index 5df8c7ed28..00ce2e48af 100644 --- a/scripts/ly2dvi.py +++ b/scripts/ly2dvi.py @@ -143,13 +143,13 @@ class Input: varTable = [ # regexp set method # ------ ---------- - ( 'language', Props.setLanguage ), - ( 'latexheaders', Props.setHeader ), - ( 'orientation', Props.setOrientation ), - ( 'paperpapersize', Props.setPaperZize ), - ( 'papertextheight', Props.setTextHeight ), - ( 'paperlinewidth', Props.setLineWidth ), - ( 'filename', Props.setFilename ), + ( 'language', Props.setLanguage ), + ( 'latexheaders', Props.setHeader ), + ( 'paperorientation', Props.setOrientation ), + ( 'paperpapersize', Props.setPaperZize ), + ( 'papertextheight', Props.setTextHeight ), + ( 'paperlinewidth', Props.setLineWidth ), + ( 'filename', Props.setFilename ), ] titles={} -- 2.39.5