From: fred Date: Tue, 26 Mar 2002 21:29:25 +0000 (+0000) Subject: lilypond-1.1.5 X-Git-Tag: release/1.5.59~2762 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6169193b27ccd60c872cc844be23b610b3e98ea0;p=lilypond.git lilypond-1.1.5 --- diff --git a/NEWS b/NEWS index 78c854e1cd..7c1e93e253 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,42 @@ +pl4.jcn4 + - fixes; preludes, finger + +pl4.jcn3 + - bf: text staff vertical align; see input/test/vertical-text.ly + - urg, scaled cmr8 by factor 4/5 + - apart from end/begin of measure spacing urgs, stars-and-stripes.ly + is rather cool + +pl4.jcn2 + - read (cmrxx)afm for text char widths + - tfmtoafm.sh (quite urg) + - alphabet.ly + +pl 4.uu1 + - read .scm files. No need for GUILE_LOAD_PATH + - .ps hack. No need for lily.ps on the printer + + (&$^@M&@^$@^&$@ Damn TeX) + + + - bf: mudela-book -> \default_paper is obsolete. + +pl 3.ms1 + - thumb-upgrade + +pl4.jcn1 + - bf: dotted slur + - bf: text ssb + - bf: empty/unknown in ps + +pl 4.tca1 + - 40% speedup executing mudela-book on mudela-book-doc.doc + - change of lilypond's output filenames. Given multiple input + files, eg. 'm.ly y.ly', output names will now be 'm.tex y.tex' + not 'm.tex y-1.tex', but if m.ly containts two paper definitions + output will be 'm.tex m-1.tex y.tex' + +******* 1.1.4 pl 3.tca1 diff --git a/VERSION b/VERSION index 66f4cf93b6..b7f6e05bad 100644 --- a/VERSION +++ b/VERSION @@ -1,7 +1,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=1 -PATCH_LEVEL=4 +PATCH_LEVEL=5 MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a diff --git a/lily/lookup.cc b/lily/lookup.cc index 300439b3dd..35d9774c14 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -12,6 +12,7 @@ Glissando */ +#include #include "lookup.hh" #include "debug.hh" #include "dimensions.hh" @@ -19,6 +20,7 @@ #include "scalar.hh" #include "paper-def.hh" #include "string-convert.hh" +#include "file-path.hh" #include "main.hh" #include "lily-guile.hh" @@ -180,10 +182,10 @@ Lookup::dashed_slur (Array controls, Real thick, Real dash) const // (lambda (o) (dashed-slur o thick dash '(stuff)) a.lambda_ = ly_append (ly_lambda_o (), - ly_list1 (ly_append (ly_func_o ("dashed-slur"), + gh_list (ly_append (ly_func_o ("dashed-slur"), gh_cons (gh_double2scm (thick), gh_cons (gh_double2scm (dash), - ly_list1 (ly_quote_scm (gh_list (sc[0], sc[1], sc[2], sc[3], SCM_UNDEFINED)))))))); + gh_list (ly_quote_scm (gh_list (sc[1], sc[2], sc[3], sc[0], SCM_UNDEFINED)), SCM_UNDEFINED)))), SCM_UNDEFINED)); a.str_ = "dashed_slur"; return a; @@ -311,6 +313,9 @@ Lookup::streepje (int type) const return afm_find ("balls" + String ("-") +to_str (type) + "l"); } +Dictionary cmr_dict; +Dictionary afm_p_dict; + Atom Lookup::text (String style, String text) const { @@ -319,10 +324,65 @@ Lookup::text (String style, String text) const arr.push (text); Atom a = (*symtables_p_) ("style")->lookup (style); a.lambda_ = lambda_scm (a.str_, arr); + Real font_w = a.dim_.x ().length (); + Real font_h = a.dim_.y ().length (); + +// urg +// if (!cmr_dict.length_i ()) + if (!cmr_dict.elem_b ("roman")) + { + //brrrr + cmr_dict.elem ("bold") = "cmbx"; + cmr_dict.elem ("dynamic") = "feta-din"; + cmr_dict.elem ("finger") = "feta-nummer"; + cmr_dict.elem ("italic") = "cmti"; + cmr_dict.elem ("roman") = "cmr"; + } + + if (!afm_p_dict.elem_b (style)) + { + Adobe_font_metric* afm_p = 0; + String cmr_str = cmr_dict.elem (style) + to_str ((int) font_h) + ".afm"; + String font_path = global_path.find (cmr_str); + if (!font_path.length_i ()) + { + warning (_f("can't open file: `%s'", cmr_str.ch_C ())); + warning (_f("guessing dimensions for font style: `%s'", style.ch_C ())); + } + else + { + *mlog << "[" << font_path; + afm_p = new Adobe_font_metric (read_afm (font_path)); + DOUT << afm_p->str (); + *mlog << "]" << flush ; + } + afm_p_dict.elem (style) = afm_p; + } + Real w = 0; + Adobe_font_metric* afm_p = afm_p_dict.elem (style); + DOUT << "\nChars: "; + for (int i = 0; i < text.length_i (); i++) + { + if (text[i]=='\\') + for (i++; (i < text.length_i ()) && isalpha(text[i]); i++) + ; + else + { + if (afm_p) + { + Adobe_font_char_metric m = afm_p->char_metrics_[(int)text[i]]; + w += m.B_.x ().length (); + DOUT << to_str (m.B_.x ().length ()) << " "; + } + else + w += font_w; + } + } + DOUT << "\n" << to_str (w) << "\n"; + a.dim_.x () = Interval (0, w); a.str_ = "text"; a.font_ = font_; return a; - } diff --git a/lily/script-engraver.cc b/lily/script-engraver.cc index c68a165d11..17cc5dd70d 100644 --- a/lily/script-engraver.cc +++ b/lily/script-engraver.cc @@ -64,11 +64,13 @@ Script_engraver::do_pre_move_processing() if (dynamic_cast (script_p->specs_p_)) // UGH { Text_def * td_l = (Text_def*)script_p->specs_p_; - Scalar style = get_property ("textstyle"); - if (style.to_bool ()) + if (!td_l->style_str_.length_i ()) { - td_l->style_str_= style; + Scalar style = get_property ("textstyle"); + if (style.to_bool ()) + td_l->style_str_= style; } + // urg, what if this is already set? in-band signaling... Scalar alignment = get_property ("textalignment"); if (alignment.isnum_b()) { diff --git a/mutopia/J.S.Bach/Petites-Preludes/preludes-1.ly b/mutopia/J.S.Bach/Petites-Preludes/preludes-1.ly index 63bc884eb9..116a6b1a2b 100644 --- a/mutopia/J.S.Bach/Petites-Preludes/preludes-1.ly +++ b/mutopia/J.S.Bach/Petites-Preludes/preludes-1.ly @@ -1,10 +1,8 @@ \header{ filename = "preludes-1.ly"; -% mmm -% title = "DOUZE PETITES PR\\'ELUDES"; -opus = "BWV 924"; -% piece = "\\numfont 1"; -piece = "1"; +% urg? +%opus = "BWV 924"; +% piece = "1"; % blz 1 % Clavierb"uchlein f"ur W. Fr. Bach % Clav. W. Fr. Bach: 2-Praeambulum I @@ -116,4 +114,8 @@ grand_staff = \type GrandStaff < \grand_staff \include "preludes-paper.ly"; \midi{ \tempo 4 = 80; } + \header { + opus = "BWV 924"; + piece = "1"; + } } diff --git a/mutopia/J.S.Bach/Petites-Preludes/preludes-2.ly b/mutopia/J.S.Bach/Petites-Preludes/preludes-2.ly index 65f98fe3ba..75cd4a6db3 100644 --- a/mutopia/J.S.Bach/Petites-Preludes/preludes-2.ly +++ b/mutopia/J.S.Bach/Petites-Preludes/preludes-2.ly @@ -1,9 +1,5 @@ \header{ filename = "preludes-2.ly"; -title = "2"; -opus = "BWV 939"; -% urg?? piece = "\\numfont 2"; -piece = "2"; % blz 10 % % Six Petits Pr eludes @@ -126,5 +122,9 @@ a4 = \paper{ \grandStaff \paper{ \a4 } \midi{ \tempo 4 = 100; } + \header { + opus = "BWV 939"; + piece = "2"; + } } diff --git a/mutopia/J.S.Bach/Petites-Preludes/preludes-3.lym4 b/mutopia/J.S.Bach/Petites-Preludes/preludes-3.lym4 index 011f3da24a..6361ccd1f2 100644 --- a/mutopia/J.S.Bach/Petites-Preludes/preludes-3.lym4 +++ b/mutopia/J.S.Bach/Petites-Preludes/preludes-3.lym4 @@ -7,10 +7,6 @@ define(t, r16 [$1$4 $2 $3] [$2 $1 $2 $6$1] r $1$7 r $5$1 |) \header{ filename = "preludes-3.ly"; -title = "3"; -opus = "BWV 999"; -% piece = "\\numfont 3"; -piece = "3"; % Pr"aludum in C Moll f"ur Laute % blz 16 % Six Petits Preludes` @@ -179,4 +175,8 @@ a4 = \paper{ \grand_staff \paper{ \a4 } \midi{ \tempo 4 = 100; } + \header{ + opus = "BWV 999"; + piece = "3"; + } } diff --git a/mutopia/J.S.Bach/Petites-Preludes/preludes-4.ly b/mutopia/J.S.Bach/Petites-Preludes/preludes-4.ly index daf563f99a..35ee6bbeef 100644 --- a/mutopia/J.S.Bach/Petites-Preludes/preludes-4.ly +++ b/mutopia/J.S.Bach/Petites-Preludes/preludes-4.ly @@ -1,9 +1,5 @@ \header{ filename = "preludes-4.ly"; -title = "4"; -opus = "BWV 925"; -% piece = "\\numfont 4"; -piece = "4"; % blz 8 % Clavierb"uchlein f"ur W. Fr. Bach % Clav. W. Fr. Bach: 27-Praeludium ex d neutral @@ -204,4 +200,8 @@ grand_staff = \type GrandStaff < \grand_staff \include "preludes-paper.ly"; \midi{ \tempo 4 = 70; } + \header{ + opus = "BWV 925"; + piece = "4"; + } } diff --git a/mutopia/J.S.Bach/Petites-Preludes/preludes-5.ly b/mutopia/J.S.Bach/Petites-Preludes/preludes-5.ly index 57aff962f3..9cca66e1eb 100644 --- a/mutopia/J.S.Bach/Petites-Preludes/preludes-5.ly +++ b/mutopia/J.S.Bach/Petites-Preludes/preludes-5.ly @@ -1,9 +1,5 @@ \header{ filename = "preludes-5.ly"; -title = "5"; -% piece = "\\numfont 5"; -piece = "5"; -opus = "BWV 926"; % blz 2 % Clavierb"uchlein f"ur W. Fr. Bach % Clav. W. Fr. Bach: 4-Praeludium 2 @@ -221,5 +217,9 @@ widea4 = \paper { \grand_staff \paper{ \widea4 } \midi{ \tempo 4 = 90; } + \header{ + piece = "5"; + opus = "BWV 926"; + } } diff --git a/mutopia/J.S.Bach/Petites-Preludes/preludes-6.ly b/mutopia/J.S.Bach/Petites-Preludes/preludes-6.ly index 030c149d63..ff3f180446 100644 --- a/mutopia/J.S.Bach/Petites-Preludes/preludes-6.ly +++ b/mutopia/J.S.Bach/Petites-Preludes/preludes-6.ly @@ -1,9 +1,5 @@ \header{ filename = "preludes-6.ly"; -title = "6"; -% piece = "\\numfont 6"; -piece = "6"; -opus = "BWV 940"; % blz 11 % Six Petits Preludes % Collection Johann Peter Kellner @@ -129,5 +125,9 @@ a4 = \paper{ \grand_staff \paper{ \a4 } \midi{ \tempo 4 = 40; } + \header{ + piece = "6"; + opus = "BWV 940"; + } }