From: Han-Wen Nienhuys Date: Tue, 19 Mar 2002 00:50:26 +0000 (+0100) Subject: release: 1.5.43 X-Git-Tag: release/1.5.43 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=43e92a55dd6874d78abc5c32a74bd987753e26db;p=lilypond.git release: 1.5.43 --- diff --git a/ChangeLog b/ChangeLog index e0b0e21e2f..462b2c7759 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,24 @@ ---- ../lilypond-1.5.42.hwn1/ChangeLog Mon Mar 18 16:59:27 2002 -++ b/ChangeLog Mon Mar 18 23:23:50 2002 -@@ -1,3 +1,18 @@ +2002-03-19 Han-Wen + + * VERSION: 1.5.43 released + + * scm/beam.scm (beam-dir-majority-median): if majority is + undecided, use median. Removes a forced dir in sarabande. + + * mf/feta-schrift.mf: Trill fixes, Vee fixes (upbow, ltoe, rtoe) + +2002-03-18 Chris Jackson + + * lily/text-spanner.cc, lily/piano-pedal-engraver.cc: Cleanups. Edge + widths, heights and shortens are now customisable properties. + + * scm/grob-description.scm, scm/grob-property-description.scm: New + properties added to PianoPedalBracket, unnecessary + Y-offset-callbacks removed from *Pedal, undocumented properties + fixed. + + * Documentation/user/refman.itely: Piano pedal updates. + 2002-03-18 Jan Nieuwenhuizen * scm/grob-property-description.scm: @@ -16,11 +34,50 @@ * scm/beam.scm: Remove old stuff. Use Beam::get_interbeam () (previously space-function). - 2002-03-18 Han-Wen + * stepmake/bin/add-html-footer.py: Website title fix. + +2002-03-18 Han-Wen Nienhuys + + * scripts/ly2dvi.py (environment): use new font searching setup. + + * lily/afm.cc (afm_bbox_to_box): make code dimension independent + + * lily/tfm.cc (dimensions): make code dimension independent + + * ps/lilyponddefs.ps: add constant for MM and true/ps-point + scaling + + * tex/lily-ps-defs.tex: scaling for PS points and MM. + + * lily/include/dimensions.hh: try MM as internal unit. + + * scm/*.scm: remove invoke-dim1 + +2002-03-17 Han-Wen + + * GNUmakefile.in (fontpaths): add fontpaths target, + + * make/mutopia-targets.make: add PDF rules. + + * make/mutopia-rules.make: add pdf rule. + + * buildscripts/mutopia-index.py (list_item): add PDF. + + * buildscripts/lilypond-profile.sh (TEXMF): typo. + + * make/lilypond-vars.make: set TEXMF for the new font setup. - * lily/afm.cc (afm_bbox_to_box): make code dimension independent2002-03-18 Jan Nieuwenhuizen +2002-03-17 Han-Wen + + * VERSION: 1.5.42 released + + * mf/feta-schrift.mf: endless twiddling of Tr. - * stepmake/bin/add-html-footer.py: Website title fix. + * mf/feta-eindelijk.mf: 8th rest: make darker, top of brush lower, and + endless twiddling with the bulb shape. + + * lily/note-head.cc (internal_brew_molecule): make ledger lines a + little smaller if there is an accidental. 2002-03-15 Mats Bengtsson @@ -40,16 +97,6 @@ * mf/GNUmakefile (ALL_GEN_FILES): Actually generate the lilypond.map file - -2002-03-17 Han-Wen - - * mf/feta-schrift.mf: endless twiddling of Tr. - - * mf/feta-eindelijk.mf: 8th rest: make darker, top of brush lower, and - endless twiddling with the bulb shape. - - * lily/note-head.cc (internal_brew_molecule): make ledger lines a - little smaller if there is an accidental. 2002-03-17 Jan Nieuwenhuizen diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index 13eb20e0a4..ec472a3fd4 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -1948,7 +1948,7 @@ c''4 \spanrequest \stop "Sustain" The symbols that are printed can be modified by setting @code{pedal@var{X}Strings}, where @var{X} is one of the pedal types: Sustain, Sostenuto or UnaCorda. Refer to the generated documentation of -@rgrob{PianoPedal} for more information. +@rgrob{SustainPedal}, for example, for more information. Pedals can also be indicated by a sequence of brackets, by setting the @code{pedal-type} property of SustainPedal grobs: @@ -1967,13 +1967,25 @@ c''4 \sustainDown d''4 e''4 c'4 \sustainUp \sustainDown f'4 g'4 a'4 \sustainUp @end lilypond The default '*Ped' style for sustain and damper pedals corresponds to -@code{\pedal-type = #'text}. However @code{mixed} is the default style +@code{\pedal-type = #'text}. However, @code{mixed} is the default style for a sostenuto pedal: @lilypond[fragment,verbatim] c''4 \sostenutoDown d''4 e''4 c'4 f'4 g'4 a'4 \sostenutoUp @end lilypond +For fine-tuning of the appearance of a pedal bracket, the properties +@code{edge-width}, @code{edge-height}, and @code{shorten-pair} of +@code{PianoPedalBracket} grobs (see the detailed documentation of +@rgrob{PianoPedalBracket}) can be modified. For example, the bracket +may be extended to the end of the note head. + +@lilypond[fragment,verbatim] +\property Staff.PianoPedalBracket \override #'shorten-pair = #'(0 . -1.0) +c''4 \sostenutoDown d''4 e''4 c'4 f'4 g'4 a'4 \sostenutoUp +@end lilypond + + @c . {Arpeggio} @node Arpeggio diff --git a/GNUmakefile.in b/GNUmakefile.in index 35a549cd8c..d3ef1f9757 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -35,6 +35,7 @@ footify: $(footify) --index=./ `$(FIND) . -maxdepth 1 -name '*.html' -print` $(footify-all-command) + fonts: $(MAKE) -C $(depth)/mf @@ -60,21 +61,24 @@ TOP_HTMLS = index.html short-examples.html long-examples.html index: web-doc -short-examples: +short-examples: pfa-fonts $(MAKE) out=www -C input WWW $(PYTHON) $(buildscript-dir)/mutopia-index.py -o short-examples.html input/ -long-examples: +long-examples: pfa-fonts $(MAKE) out=www -C mutopia WWW $(PYTHON) $(buildscript-dir)/mutopia-index.py -o long-examples.html mutopia/ +pfa-fonts: + $(MAKE) MAKE_PFA_FILES=1 -C mf + lily: lily/$(outdir)/lilypond lily/$(outdir)/lilypond: $(MAKE) -C lily -local-web: fonts lily $(TOP_HTMLS:%.html=%) footify do-top-doc top-web +local-web: fontpaths fonts lily $(TOP_HTMLS:%.html=%) footify do-top-doc top-web top-web: rm -f `find . -name \*.html~ -print` @@ -109,3 +113,11 @@ top-WWW-clean: WWW: + +fontpaths: + -ln -s $(depth)/mf/out dvips + -mkdir -p fonts + -ln -s ../$(depth)/mf fonts/source + -ln -s ../$(depth)/mf/out fonts/afm + -ln -s ../$(depth)/mf/out fonts/tfm + -ln -s ../$(depth)/mf/out fonts/type1 diff --git a/VERSION b/VERSION index d4985a2899..be33ecbf52 100644 --- a/VERSION +++ b/VERSION @@ -1,8 +1,8 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=5 -PATCH_LEVEL=42 -MY_PATCH_LEVEL=jcn2 +PATCH_LEVEL=43 +MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/buildscripts/lilypond-profile.sh b/buildscripts/lilypond-profile.sh index 8539cd36d6..11464f2ba5 100755 --- a/buildscripts/lilypond-profile.sh +++ b/buildscripts/lilypond-profile.sh @@ -23,7 +23,7 @@ GS_LIB="$datadir/ps:"${GS_LIB:=""} # Add the installation directory to the teTeX system tree, # see Documentation/misc/fontinstallation -TEXMF="{$DATADIR,"`kpsexpand \\$TEXMF`"}" +TEXMF="{$datadir,"`kpsexpand \\$TEXMF`"}" # LILYPONDPREFIX="$datadir" # export LILYPONDPREFIX diff --git a/buildscripts/mutopia-index.py b/buildscripts/mutopia-index.py index 4bbc0bb2c5..2e5d3b5e35 100755 --- a/buildscripts/mutopia-index.py +++ b/buildscripts/mutopia-index.py @@ -3,7 +3,6 @@ name = 'mutopia-index' -# find.py -- deprecated in python 2.0 import fnmatch import os @@ -57,9 +56,10 @@ headertext= r""" These files are also included in the distribution. The output is completely generated by LilyPond, without any touch up by humans. -

The PostScript files were generated using TeX and dvips. The pictures -are 90dpi anti-aliased snapshots of the printed output. The images -are in PNG format, and should be viewable with any current browser. +

The PostScript files were generated using TeX and dvips at 600 dpi. +The pictures are 90dpi anti-aliased snapshots of the printed output. +The images are in PNG format, and should be viewable with any current +browser.

If you want a better impression of the appearance, do print out one of the postscript files. @@ -166,6 +166,7 @@ def gen_list(inputs, filename): if not file_exist_b (f): break list_item(f, 'See a picture of page %d' % pageno, 'png') + list_item(base + '.pdf', 'Print ', 'PDF') list_item(base + '.ps.gz', 'Print ', 'gzipped PostScript') list_item(base + '.midi', 'Listen', 'MIDI') list.write ("\n"); diff --git a/input/baerenreiter-sarabande.ly b/input/baerenreiter-sarabande.ly index 175735eef1..1a529b1a9c 100644 --- a/input/baerenreiter-sarabande.ly +++ b/input/baerenreiter-sarabande.ly @@ -19,7 +19,7 @@ measure 25, we get back the linebreaking of Baerenreiter. This file used to show spacing weaknesses. Now it shows weaknesses in -beam and slur handling. +slur handling. Note that the Barenreiter edition contains an engraving mistake. The second line begins with measure 6 (but prints 5). @@ -133,16 +133,31 @@ sarabandeCelloStaff = \context Staff < \sarabandeCelloScripts > -\score{ - \sarabandeCelloStaff - \paper{ - indent = 7. \mm - linewidth = 183.5 \mm +% size perversions +smallerPaper = \paper { + \translator { \StaffContext + fontSize = #-1 + StaffSymbol \override #'staff-space = #0.8 + } \translator { \ScoreContext - %% SpacingSpanner \override #'maximum-duration-for-spacing = #(make-moment 1 16) + SpacingSpanner \override #'spacing-increment = #0.96 + } + + indent = 5.6 \mm + linewidth = 146.8 \mm +} + +baerPaper = \paper { + indent = 7. \mm + linewidth =183.5 \mm +} - }} +\score{ + \sarabandeCelloStaff + \paper{ + \baerPaper + } \midi{ \tempo 4 = 40 } \header{ opus= "" diff --git a/input/test/pedal.ly b/input/test/pedal.ly new file mode 100644 index 0000000000..3c5559ef3d --- /dev/null +++ b/input/test/pedal.ly @@ -0,0 +1,39 @@ +\version "1.5.43" +\header{ + texidoc = "Piano pedal symbols merge stop and start. The strings are configurable. +Text style, bracket style, and a mixture of both are supported. " +} + + + + +\score{ + \context Staff \notes\relative c'{ + + c4 d e f g + \sustainDown b c + c, [d16 c c c] [e e \sustainUp \sustainDown e e ] f4 \sustainUp + g\sustainDown b \sustainUp c + \property Staff.pedalSustainStrings = #'("-" "-P" "P") + \property Staff.SustainPedal \override #'padding = #-2 + c, \sustainDown d e \sustainUp \sustainDown f + \sustainUp g b c + + \property Staff.SustainPedal \override #'pedal-type = #'bracket + + c4 d e \sustainDown b c c, \sustainUp \sustainDown [d8 c] [e8 e \sustainUp \sustainDown] f4 d + \sustainUp g \sustainDown b b, \sustainUp c' + + \property Staff.UnaCordaPedal \override #'pedal-type = #'mixed + + c4 d \unaCorda e f g + b \treCorde c + + + } + \paper{ + } + \midi{ + \tempo 4 = 60 + } +} diff --git a/lily/afm.cc b/lily/afm.cc index ddca303bc0..1c760a1813 100644 --- a/lily/afm.cc +++ b/lily/afm.cc @@ -9,6 +9,7 @@ #include "afm.hh" #include "warn.hh" #include "molecule.hh" +#include "dimensions.hh" Adobe_font_metric::Adobe_font_metric (AFM_Font_info * fi) { @@ -129,12 +130,16 @@ read_afm_file (String nm) return Adobe_font_metric::make_afm (fi, cs); } - + +/* + actually, AFMs will be printers point, usually, but our .py script dumps + real points. + */ Box afm_bbox_to_box (AFM_BBox bb) { - return Box (Interval (bb.llx, bb.urx)* (1/1000.0), - Interval (bb.lly, bb.ury)* (1/1000.0)); + return Box (Interval (bb.llx, bb.urx)* (1/1000.0) PT, + Interval (bb.lly, bb.ury)* (1/1000.0) PT); } diff --git a/lily/include/dimensions.hh b/lily/include/dimensions.hh index 8fe9487fcd..66a9d0868d 100644 --- a/lily/include/dimensions.hh +++ b/lily/include/dimensions.hh @@ -4,14 +4,17 @@ #include "real.hh" class String; + const Real INCH_TO_PT=72.270; -const Real CM_TO_PT=INCH_TO_PT/2.54; -const Real MM_TO_PT=CM_TO_PT/10; +const Real CM_TO_PT=(INCH_TO_PT/2.54); +const Real MM_TO_PT=(CM_TO_PT/10); const Real PT_TO_PT =1.0; const Real INCH_TO_BP = 72; -const Real BIGPOINT_TO_POINT = INCH_TO_PT/ INCH_TO_BP; +const Real BIGPOINT_TO_POINT = (INCH_TO_PT/ INCH_TO_BP); const Real CHAR_TO_PT =1.0; +const Real PT_TO_MM = (1.0/MM_TO_PT); +#ifdef POINTS #define PT *PT_TO_PT #define MM *MM_TO_PT @@ -20,6 +23,17 @@ const Real CHAR_TO_PT =1.0; #define BIGPOINT *BIGPOINT_TO_POINT #define CHAR *CHAR_TO_PT +#else // mm + +#define PT *PT_TO_PT *PT_TO_MM +#define MM *MM_TO_PT *PT_TO_MM +#define CM *CM_TO_PT *PT_TO_MM +#define INCH *INCH_TO_PT *PT_TO_MM +#define BIGPOINT *BIGPOINT_TO_POINT *PT_TO_MM +#define CHAR *CHAR_TO_PT *PT_TO_MM + +#endif + String print_dimen (Real); #endif // DIMENSIONS_HH diff --git a/lily/piano-pedal-engraver.cc b/lily/piano-pedal-engraver.cc index 2570e28075..5c9ca83d63 100644 --- a/lily/piano-pedal-engraver.cc +++ b/lily/piano-pedal-engraver.cc @@ -291,8 +291,8 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, SCM pedaltype) p->bracket_p_->set_bound (RIGHT, unsmob_grob(get_property ("currentMusicalColumn"))); - // Set a property so that the molecule-creating function will know whether the right edge should be angled ___/ - p->bracket_p_->set_grob_property("angle-right", gh_bool2scm((bool) p->req_l_drul_[START]) ); + // Set a property so that the molecule-creating function will know whether the right edge should be flared ___/ + p->bracket_p_->set_grob_property("right-widen", gh_bool2scm((bool) p->req_l_drul_[START]) ); add_bound_item (p->line_spanner_, p->bracket_p_->get_bound (RIGHT)); p->finished_bracket_p_ = p->bracket_p_; @@ -309,8 +309,8 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, SCM pedaltype) p->bracket_p_ = new Spanner (get_property ("PianoPedalBracket")); p->bracket_p_->set_interface (ly_symbol2scm ("piano-pedal-interface")); - // Set a property so that the molecule-creating function will know whether the left edge should be angled \___ - p->bracket_p_->set_grob_property("angle-left", gh_bool2scm((bool) p->req_l_drul_[STOP]) ); + // Set a property so that the molecule-creating function will know whether the left edge should be flared \___ + p->bracket_p_->set_grob_property("left-widen", gh_bool2scm((bool) p->req_l_drul_[STOP]) ); // Set this property for 'mixed style' pedals, Ped._______/\ , // so the molecule function will shorten the ____ line by the length of the Ped. text. @@ -321,8 +321,6 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, SCM pedaltype) if (p->item_p_) p->bracket_p_->set_parent (p->item_p_, Y_AXIS); - Side_position_interface::set_axis (p->bracket_p_, Y_AXIS); - Side_position_interface::set_direction (p->bracket_p_, UP); p->bracket_p_->set_bound (LEFT, unsmob_grob (get_property ("currentMusicalColumn"))); Axis_group_interface::add_element (p->line_spanner_, p->bracket_p_); diff --git a/lily/text-spanner.cc b/lily/text-spanner.cc index 127de061a3..554bc1d1f4 100644 --- a/lily/text-spanner.cc +++ b/lily/text-spanner.cc @@ -181,8 +181,6 @@ Text_spanner::brew_molecule (SCM smob) Pedal up-down (restart) indicated by the angled right and left edges of consecutive pedals touching exactly to form an __/\__ Chris Jackson - - TODO: Pedal line extending to the end of the note */ void @@ -190,31 +188,31 @@ Text_spanner::setup_pedal_bracket(Spanner *s) { Real thick = s->paper_l ()->get_var ("stafflinethickness"); - Real ss = Staff_symbol_referencer::staff_space (s); - Drul_array a, broken; + Drul_array w, broken; Drul_array height, width, shorten, r; + SCM pa = s->get_grob_property ("if-text-padding"); + SCM ew = s->get_grob_property ("edge-width"); + SCM eh = s->get_grob_property ("edge-height"); + SCM sp = s->get_grob_property ("shorten-pair"); + SCM wl = s->get_grob_property ("left-widen"); + SCM wr = s->get_grob_property ("right-widen"); + // Pedal has an angled left edge \__ or an angled right edge __/ - a[LEFT] = a[RIGHT] = false; - SCM al = s->get_grob_property ("angle-left"); - SCM ar = s->get_grob_property ("angle-right"); - if (gh_boolean_p (al) ) - a[LEFT] = to_boolean (al); - if (gh_boolean_p (ar) ) - a[RIGHT] = to_boolean (ar); - - height[LEFT] = ( to_boolean (s->get_grob_property ("text-start")) ? - 0 : - ss ); - height[RIGHT] = ss; + w[LEFT] = w[RIGHT] = false; + if (gh_boolean_p (wl) ) + w[LEFT] = to_boolean (wl); + if (gh_boolean_p (wr) ) + w[RIGHT] = to_boolean (wr); Direction d = LEFT; Interval e; Real padding = 0; - SCM pa = (s->get_grob_property ("if-text-padding")); + if (gh_number_p (pa) ) padding = gh_scm2double (pa); + do { Item *b = s->get_bound (d); @@ -223,18 +221,24 @@ Text_spanner::setup_pedal_bracket(Spanner *s) r[d] = d * (e[-d] + padding); broken[d] = b->break_status_dir () != CENTER; - width[d] = (a[d] ? ss*d/2 : 0); - if (broken[d]) - height[d] = 0; + width[d] = 0; + height[d] = 0; + shorten[d] = 0; + if ( w[d] && gh_pair_p (ew) ) + width[d] += gh_scm2double (index_cell (ew, d)) * d; + if ( !broken[d] && (gh_pair_p (eh) ) ) + height[d] = gh_scm2double (index_cell (eh, d)); + if ( gh_pair_p (sp) ) + shorten[d] = gh_scm2double (index_cell (sp, d)); } while (flip (&d) != LEFT); - shorten[RIGHT] = shorten[LEFT] = 0; Real extra_short = 0; // For 'Mixed' style pedals, i.e. a bracket preceded by text: Ped._____| // need to shorten by the extent of the text grob if ( to_boolean (s->get_grob_property ("text-start")) ) { + height[LEFT] = 0; Grob * textbit = s->get_parent(Y_AXIS); extra_short = padding; if (textbit->has_interface(ly_symbol2scm("piano-pedal-interface"))) @@ -267,10 +271,6 @@ Text_spanner::setup_pedal_bracket(Spanner *s) // Shorten bracket on the right so it ends just before the spanned note. shorten[RIGHT] += thick - (r[LEFT] + r[RIGHT]); - // Hmm. TODO: This should be set in grob-description.scm, but side-positioning - // of consecutive brackets only seems to work if direction is +1 within the engraver. - s->set_grob_property ("direction", gh_int2scm(-1)); - s->set_grob_property ("edge-height", gh_cons ( gh_double2scm ( height[LEFT] ) , gh_double2scm ( height[RIGHT]) ) ); s->set_grob_property ("edge-width", gh_cons ( gh_double2scm ( width[LEFT] ), diff --git a/lily/tfm.cc b/lily/tfm.cc index 01b26efaba..89a09a5011 100644 --- a/lily/tfm.cc +++ b/lily/tfm.cc @@ -14,6 +14,7 @@ #include "string-convert.hh" #include "debug.hh" #include "warn.hh" +#include "dimensions.hh" Box Tex_font_char_metric::dimensions () const @@ -26,7 +27,12 @@ Tex_font_char_metric::dimensions () const } Real d = -depth_; - return Box (Interval (0, width_),Interval (d ? height_)); + + Real point_constant = 1 PT; + + return Box (Interval (0, width_*point_constant ), + Interval ((d ? height_)*point_constant)); } Tex_font_char_metric::Tex_font_char_metric () diff --git a/lilypond-font-lock.el b/lilypond-font-lock.el index 4a09294c56..a678a121fd 100644 --- a/lilypond-font-lock.el +++ b/lilypond-font-lock.el @@ -163,7 +163,7 @@ (lambda (x) (modify-syntax-entry (car x) (cdr x) LilyPond-mode-syntax-table))) '(( ?\( . "." ) ( ?\) . "." ) - ( ?\[ . "." ) ( ?\] . "." ) + ( ?\[ . "(]" ) ( ?\] . ")[" ) ( ?\{ . "(}2b" ) ( ?\} . "){4b" ) ( ?\< . "." )( ?\> . ".") diff --git a/make/lilypond-vars.make b/make/lilypond-vars.make index 9891207728..b7ddebfa75 100644 --- a/make/lilypond-vars.make +++ b/make/lilypond-vars.make @@ -3,11 +3,8 @@ export PATH:=$(topdir)/lily/out:$(topdir)/buildscripts/out:$(PATH) +export TEXMF:={$(topdir),$(shell kpsexpand \$$TEXMF)} -export MFINPUTS:=$(topdir)/mf/:$(MFINPUTS):: -export TEXINPUTS:=$(topdir)/mf/out/:$(topdir)/tex/:$(topdir)/ps/:$(TEXINPUTS):$(pwd):: -export LILYINCLUDE:=$(topdir)/ps:$(topdir)/scm:$(topdir)/ly:$(topdir)/mf/out::$(TEX_TFMDIR):$(LILYINCLUDE) -export TFMFONTS:=$(topdir)/mf/out: export extra_mem_top=1000000 export extra_mem_bottom=1000000 export pool_size=250000 diff --git a/make/mutopia-rules.make b/make/mutopia-rules.make index 08445758d5..81b6b57fd4 100644 --- a/make/mutopia-rules.make +++ b/make/mutopia-rules.make @@ -33,6 +33,13 @@ $(outdir)/%.dvi: $(outdir)/%.ly $(outdir)/%.dvi: %.ly $(PYTHON) $(LY2DVI) --output=$@ --dependencies $< + +$(outdir)/%.pdf: $(outdir)/%.dvi + dvips -u lilypond.map -o $@.pdfps -Ppdf $< + ps2pdf $@.pdfps $@ + + $(PYTHON) $(LY2DVI) --output=$@ --dependencies $< + $(outdir)-$(PAPERSIZE)/%.dvi: %.ly $(PYTHON) $(LY2DVI) --output=$@ --dependencies --set=papersize=$(PAPERSIZE) $< diff --git a/make/mutopia-targets.make b/make/mutopia-targets.make index 3504259fb5..54cd429bb5 100644 --- a/make/mutopia-targets.make +++ b/make/mutopia-targets.make @@ -12,7 +12,7 @@ all: $(OUT_FILES) # we want dvi_examples as well, because they get thrown away otherwise # incurring another costly lilypond run. -local-WWW: $(ly_examples) $(dvi_examples) $(ps_examples) $(png_examples) +local-WWW: $(ly_examples) $(pdf_examples) $(ps_examples) $(png_examples) tar: mkdir -p $(outdir)/$(tarball) diff --git a/make/mutopia-vars.make b/make/mutopia-vars.make index 2132fab757..84bc7bf849 100644 --- a/make/mutopia-vars.make +++ b/make/mutopia-vars.make @@ -14,6 +14,7 @@ ly_examples=$(addprefix $(outdir)/, $(addsuffix .ly.txt, $(examples))) all_examples=$(examples) dvi_examples=$(addprefix $(outdir)/, $(addsuffix .dvi, $(all_examples))) ps_examples=$(addprefix $(outdir)/, $(addsuffix .ps.gz, $(all_examples))) +pdf_examples=$(addprefix $(outdir)/, $(addsuffix .pdf, $(all_examples))) gif_examples=$(addprefix $(outdir)/, $(addsuffix .gif, $(all_examples))) png_examples=$(addprefix $(outdir)/, $(addsuffix .png, $(all_examples))) diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index 1d09a22d18..763983702e 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,15 +1,15 @@ Begin3 Title: LilyPond -Version: 1.5.42 -Entered-date: 17MRT02 +Version: 1.5.43 +Entered-date: 19MRT02 Description: @BLURB@ Keywords: music notation typesetting midi fonts engraving Author: hanwen@cs.uu.nl (Han-Wen Nienhuys) janneke@gnu.org (Jan Nieuwenhuizen) Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys) Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert - 1000k lilypond-1.5.42.tar.gz + 1000k lilypond-1.5.43.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 1000k lilypond-1.5.42.tar.gz + 1000k lilypond-1.5.43.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.mandrake.spec b/make/out/lilypond.mandrake.spec index 577bafad07..cc29af3fdd 100644 --- a/make/out/lilypond.mandrake.spec +++ b/make/out/lilypond.mandrake.spec @@ -1,5 +1,5 @@ %define name lilypond -%define version 1.5.42 +%define version 1.5.43 %define release 1mdk Name: %{name} diff --git a/make/out/lilypond.redhat.spec b/make/out/lilypond.redhat.spec index d276007fb3..64d7a2f8cc 100644 --- a/make/out/lilypond.redhat.spec +++ b/make/out/lilypond.redhat.spec @@ -3,11 +3,11 @@ %define info yes Name: lilypond -Version: 1.5.42 +Version: 1.5.43 Release: 1 License: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.42.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.43.tar.gz Summary: Create and print music notation URL: http://www.lilypond.org/ BuildRoot: /tmp/lilypond-install diff --git a/make/out/lilypond.suse.spec b/make/out/lilypond.suse.spec index e5ece3c4e3..d2c3cb796a 100644 --- a/make/out/lilypond.suse.spec +++ b/make/out/lilypond.suse.spec @@ -14,11 +14,11 @@ Distribution: SuSE Linux 7.0 (i386) Name: lilypond -Version: 1.5.42 +Version: 1.5.43 Release: 2 Copyright: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.42.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.43.tar.gz # music notation software for.. ? Summary: A program for printing sheet music. URL: http://www.lilypond.org/ diff --git a/mf/feta-schrift.mf b/mf/feta-schrift.mf index 49f18ee262..5999f7120b 100644 --- a/mf/feta-schrift.mf +++ b/mf/feta-schrift.mf @@ -277,27 +277,47 @@ fet_beginchar("plus (stopped)", "stopped", "plusstop") addto currentpicture also currentpicture rotated 90; fet_endchar; + % -% FIXME: blotting +% A vee with tapered insides to prevent visual blotting % -fet_beginchar("Upbow", "upbow", "upbow") - save ht, wd, thick; - thick = 1.4 stafflinethickness; - wd# = 1.3 staff_space#; - ht# = 1.6 wd#; +def draw_vee (expr width, height, thickness) = +begingroup + save diminish; - - set_char_box(wd#/2, wd#/2, 0, ht#); - pickup pencircle scaled thick; + diminish = 0.75; + pickup pencircle scaled thickness; + x1 = 0; bot y1 = 0; rt x2 = w; top y2 = h; + z3 = 0.6 [z2, z1]; + penpos3(thickness, 0); + penpos4(thickness * diminish, 0); + x4r = thickness/2; + y4 = thickness/2; labels(1,2); - draw z2 -- z1 -- (z2 xscaled -1); + penlabels(3,4); + + draw z1; + draw z3 -- z2; + penstroke z3e .. z4e; + addto currentpicture also currentpicture xscaled -1; +endgroup; +enddef; + +fet_beginchar("Upbow", "upbow", "upbow") + save ht, wd, thick, diminish; + + thick = 1.4 stafflinethickness; + wd# = 1.3 staff_space#; + ht# = 1.6 wd#; + set_char_box(wd#/2, wd#/2, 0, ht#); + draw_vee (wd, ht, thick); fet_endchar; @@ -410,20 +430,22 @@ fet_beginchar("Trill (`tr')","trill","trill") ascender_extra# = 1/2 ex#; ascender# = ascender_extra# + ex#; ex# = 1.4 staff_space#; - kerning# = .550 ex#; + kerning# = .60 ex#; start_nib_angle = 20; - bulb_size = 0.55; + bulb_size = 0.70; define_pixels(ex, ascender_extra, ascender, kerning); t_overshoot = 0.03 ex; fatness = 12/40 ex; - t_fatness = 0.780 fatness; - t_width = 1.8 t_fatness; - r_fatness = 0.75 fatness; - uitschieter = 0.43 ex; + t_fatness = 0.78 fatness; + t_width = 1.9 t_fatness; + r_fatness = 0.78 fatness; + uitschieter = 0.48 ex; hair_thick = blot_diameter; - + r_flare = 0.45 r_fatness; + r_width = 2 r_fatness + 0.25 kerning; slant = .2; + % slant = .0; local_copy(transform)(currenttransform); @@ -454,7 +476,8 @@ fet_beginchar("Trill (`tr')","trill","trill") z5 = (t_fatness/2, 2/3 ex); % penpos5(hair_thick, ); - t_p := simple_serif (z1r, z1l, -40) -- z2l {down} + t_p := z1r{dir (angle(z1l-z1r) + 30)} .. z1l{-dir (angle(z1r-z1l) - 45)} + -- z2l {down} .. tension (1 + .5 slant) .. z3l{right} @@ -501,22 +524,22 @@ fet_beginchar("Trill (`tr')","trill","trill") set_char_box(.85 staff_space# , .85 staff_space#, 0,ascender#); - penpos11(1/4 r_fatness, -20); + penpos11(1/4 r_fatness, -4); z11r = z9r; - z13 = (x9 + 1.9 r_fatness, y11 - stafflinethickness ); - penpos13(0.45 r_fatness, 170); + z13l = (x9l + r_width, y11 - stafflinethickness ); + penpos13(r_flare, 180); z15 = z13r - (bulb_size * r_fatness,0); z14 = 0.5 [z13l, z15] - (0,bulb_size* r_fatness); z16 = 0.5 [z13l, z15] + (0,bulb_size* r_fatness); - fill z11r{dir 70} .. tension 0.94 .. z13r{down} -- z15{down} - .. tension 0.97 .. z13l{up} - .. z11l{dir 250} -- cycle; + fill z11r{up} .. tension 0.94 .. z13r{down} -- z15{down} + .. tension 1.0 .. z13l{up} + .. z11l{down} -- cycle; - fill z15{up} .. tension 1.1 .. z13l{down} .. z14 .. cycle; + fill z15{up} .. tension 1.06 .. z13l{down} .. z14 .. cycle; @@ -570,17 +593,7 @@ def draw_toe = set_char_box(wd#, wd#, 0, ht#); - - pickup pencircle scaled thickness; - lft x1 = -b; - bot y1 = 0; - x2 =0; - top y2 = h; - z3 = z1 xscaled -1; - - - draw z1 -- z2 -- z3; - + draw_vee (wd, ht, thickness); enddef; fet_beginchar("left toe", "upedaltoe", "upedaltoe") diff --git a/ps/lilyponddefs.ps b/ps/lilyponddefs.ps index 220b6cf2ea..453135ab52 100644 --- a/ps/lilyponddefs.ps +++ b/ps/lilyponddefs.ps @@ -12,7 +12,18 @@ % FIXME: why isn't this set (by default) by lily? % /text-height lilypondpapertextheight def -/output-scale lilypondpaperoutputscale def +/lily-output-units 2.83464 def %% milimeter +% /lily-output-units 0.996264 def %% true points. + +/output-scale +lilypondpaperoutputscale lily-output-units mul +def + +/set-ps-scale-to-lily-scale +{ +output-scale output-scale scale +} bind def + /paper-size { lilypondpaperpapersize } bind def % FIXME diff --git a/scm/beam.scm b/scm/beam.scm index f3d0de9951..6698e1fd62 100644 --- a/scm/beam.scm +++ b/scm/beam.scm @@ -29,6 +29,11 @@ ;; ;; We have our doubts, so we simply provide all sensible alternatives. + +;; +; +; DOCME: what goes into this func, what comes out. + (define (dir-compare up down) (sign (- up down))) @@ -36,7 +41,14 @@ (define (beam-dir-majority count total) (dir-compare (car count) (cdr count))) -(beam-dir-majority '(0 . 0) '(0 . 0)) +(define (beam-dir-majority-median count total) + "First try majority. If that doesn't work, try median." + (let ((maj (dir-compare (car count) (cdr count)))) + (if (not (= maj 0)) + maj + (beam-dir-median count total)) + )) + (define (beam-dir-mean count total) (dir-compare (car total) (cdr total))) diff --git a/scm/grob-description.scm b/scm/grob-description.scm index 84e7e1860c..997cbb755f 100644 --- a/scm/grob-description.scm +++ b/scm/grob-description.scm @@ -115,7 +115,7 @@ ,Beam::score_stem_lengths )) (neutral-direction . -1) - (dir-function . ,beam-dir-majority) + (dir-function . ,beam-dir-majority-median) (beamed-stem-shorten . (1.0 0.5)) (outer-stem-length-limit . 0.2) (slope-limit . 0.2) @@ -569,10 +569,14 @@ (if-text-padding . 1.0) (width-correct . 0) (outer . #t) - (angle-left . #f) - (angle-right . #f) + (direction . -1) + (edge-width . (0.5 . 0.5)) + (edge-height . (1.0 . 1.0)) + (shorten-pair . (0.0 . 0.0)) + (left-widen . #f) + (right-widen . #f) (text-start . #f) - (meta . ,(grob-description text-spanner-interface piano-pedal-interface font-interface)) + (meta . ,(grob-description piano-pedal-interface)) )) (RepeatSlash @@ -720,7 +724,6 @@ (molecule-callback . ,Text_item::brew_molecule) (direction . 1) (X-offset-callbacks . (,Side_position_interface::aligned_on_self)) - (Y-offset-callbacks . (,Side_position_interface::aligned_side)) (no-spacing-rods . #t) (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner (pedal-type . mixed) @@ -794,7 +797,6 @@ (padding . 0.0) ;; padding relative to SustainPedalLineSpanner (pedal-type . text) (X-offset-callbacks . (,Side_position_interface::aligned_on_self)) - (Y-offset-callbacks . (,Side_position_interface::aligned_side )) (meta . ,(grob-description piano-pedal-interface side-position-interface font-interface)) )) @@ -925,7 +927,6 @@ (pedal-type . text) (padding . 0.0) ;; padding relative to UnaCordaPedalLineSpanner (X-offset-callbacks . (,Side_position_interface::aligned_on_self)) - (Y-offset-callbacks . (,Side_position_interface::aligned_side )) (meta . ,(grob-description text-interface font-interface)) )) diff --git a/scm/grob-property-description.scm b/scm/grob-property-description.scm index f10f85ab9c..9b7c43bcf8 100644 --- a/scm/grob-property-description.scm +++ b/scm/grob-property-description.scm @@ -141,7 +141,7 @@ mean centre distance weighted per note (grob-property-description 'dot-count integer? "number of dots.") (grob-property-description 'duration-log integer? "2-log of the notehead duration, i.e. 0=whole note, 1 = half note, etc.") (grob-property-description 'dy number? "set by beam: vertical travel height") -(grob-property-description 'edge-height pair? "a cons that specifies the heights of the vertical egdes '(LEFT-height . RIGHT-height).") +(grob-property-description 'edge-height pair? "a cons that specifies the heights of the vertical edges '(LEFT-height . RIGHT-height).") (grob-property-description 'edge-width pair? "a cons that specifies the widths of the slanted edges '(LEFT-width . RIGHT-width).") (grob-property-description 'edge-text pair? "a cons that specifies the texts to be set at the edges '(LEFT-text . RIGHT-text).") (grob-property-description 'elements list? "list of grobs, type depending on the Grob where this is set in.") @@ -213,6 +213,7 @@ For barline, space after a thick line.") (grob-property-description 'layer number? "The output layer [0..2]. The default is 1.") (grob-property-description 'left-padding number? "space left of accs.") +(grob-property-description 'left-widen boolean? "Whether the left edge of a piano pedal bracket should be widened by the first element of edge-width.") (grob-property-description 'length number? "Stem length for unbeamed stems, only for user override.") (grob-property-description 'lengths list? "Stem length given multiplicity of flag.") @@ -270,7 +271,7 @@ more than this (in staffspace).") (grob-property-description 'padding number? "add this much extra space between objects that are next to each other.") (grob-property-description 'parallel-beam boolean? "internal: true if there is a beam just as wide as the bracket .") (grob-property-description 'paren-cautionaries boolean? "Whether to add parenthesis around cautionary accidentals.") -(grob-property-description 'pedal-type symbol? "Style of piano pedal: text, bracket or mixed") +(grob-property-description 'pedal-type symbol? "Style of piano pedal: text, bracket or mixed.") (grob-property-description 'penalty number? "Penalty for breaking at this column. 10000 or more means forbid linebreak, -10000 or less means force linebreak. Other values influence linebreaking decisions @@ -282,6 +283,7 @@ as a real penalty.") (grob-property-description 'raise number? "height for text to be raised (a negative value lowers the text.") (grob-property-description 'right-padding number? "space right of accs.") (grob-property-description 'right-trim-amount number? "shortening of the lyric extender on the right.") +(grob-property-description 'right-widen boolean? "Whether the right edge of a piano pedal bracket should be widened by the second element of edge-width") (grob-property-description 'script-priority number? "A sorting key that determines in what order a script is within a stack of scripts.") (grob-property-description 'self-alignment-X number-or-grob? "real number: -1 = left aligned, 0 = center, 1 right-aligned in X direction. @@ -293,6 +295,7 @@ reference point. TODO: revise typing.") (grob-property-description 'self-alignment-Y number? "like self-alignment-X but for Y axis.") (grob-property-description 'shorten number? "the amount of space that a stem should be shortened (DOCME!)") +(grob-property-description 'shorten-pair number-pair? "the length on each side to shorten a text-spanner, for example a pedal bracket") (grob-property-description 'shortest-playing-duration moment? "duration of the shortest playing in that column.") (grob-property-description 'shortest-starter-duration moment? "duration of the shortest notes that starts exactly in this column.") @@ -391,6 +394,7 @@ The following abbreviations are currently defined: select dynamics fontstyle @end table .") +(grob-property-description 'text-start boolean? "Indicator for whether a piano pedal bracket has leading text, such as Ped.") (grob-property-description 'thick number? "thickness, in stafflinethickness.") (grob-property-description 'thick-thickness number? "thickness, measured in stafflinethickness.") (grob-property-description 'thickness number? "thickness, measured in stafflinethickness.") diff --git a/scm/interface-description.scm b/scm/interface-description.scm index 8bfbf86109..3e765fa1ea 100644 --- a/scm/interface-description.scm +++ b/scm/interface-description.scm @@ -585,6 +585,11 @@ contains-grace extra-space stretch-distance )) 'piano-pedal-interface "" '(pedal-type + edge-width + edge-height + shorten-pair + left-widen + right-widen )) @@ -745,6 +750,7 @@ since these usually are in a different X_group edge-height edge-width edge-text + shorten-pair type )) diff --git a/scm/pdf.scm b/scm/pdf.scm index 50c674e88f..5f022652c7 100644 --- a/scm/pdf.scm +++ b/scm/pdf.scm @@ -151,10 +151,6 @@ (string-append "(\\" (inexact->string i 8) ") " s " " )) - (define (invoke-dim1 s d) - (string-append - (ly-number->string (* d (/ 72.27 72))) " " s )) - (define (placebox x y s) "") (define (bezier-sandwich l thick) @@ -249,7 +245,7 @@ (define font-load-command ,font-load-command) (define header ,header) (define invoke-char ,invoke-char) - (define invoke-dim1 ,invoke-dim1) + (define placebox ,placebox) (define repeat-slash ,repeat-slash) (define select-font ,select-font) @@ -285,4 +281,4 @@ ; Local Variables: ; scheme-program-name: "guile" -; End: \ No newline at end of file +; End: diff --git a/scm/pdftex.scm b/scm/pdftex.scm index 736cf9bcbf..6fccc24420 100644 --- a/scm/pdftex.scm +++ b/scm/pdftex.scm @@ -7,6 +7,9 @@ ;;; Han-Wen Nienhuys ;;; Stephen Peters + +;; TODO: port this to the new module framework. + (define (pdftex-scm action-name) (define (unknown) "%\n\\unknown%\n") @@ -107,12 +110,6 @@ (string-append "\n\\" s "{" (inexact->string i 10) "}" )) - (define (invoke-dim1 s d) - (string-append - "\n\\" s "{" (number->dim d) "}")) - (define (pt->sp x) - (* 65536 x)) - ;; ;; need to do something to make this really safe. ;; @@ -203,7 +200,7 @@ (define ez-ball ,ez-ball) (define header ,header) (define invoke-char ,invoke-char) - (define invoke-dim1 ,invoke-dim1) + (define placebox ,placebox) (define select-font ,select-font) (define start-line ,start-line) @@ -231,7 +228,7 @@ ((eq? action-name 'lily-def) lily-def) ((eq? action-name 'header) header) ((eq? action-name 'invoke-char) invoke-char) - ((eq? action-name 'invoke-dim1) invoke-dim1) + ((eq? action-name 'placebox) placebox) ((eq? action-name 'bezier-sandwich) bezier-sandwich) ((eq? action-name 'start-line) start-line) diff --git a/scm/ps.scm b/scm/ps.scm index e002e8b23c..8ba55fba03 100644 --- a/scm/ps.scm +++ b/scm/ps.scm @@ -129,11 +129,11 @@ (define (dashed-line thick on off dx dy) (string-append - (ly-number->string (* dx (/ 72 72.27))) + (ly-number->string dx) " " (ly-number->string dy) " " - (ly-number->string (* thick (/ 72 72.27))) + (ly-number->string thick) " [ " (ly-number->string on) " " @@ -192,9 +192,6 @@ (string-append "(\\" (inexact->string i 8) ") " s " " )) -(define (invoke-dim1 s d) - (string-append - (ly-number->string (* d (/ 72.27 72))) " " s )) (define (placebox x y s) (string-append @@ -222,12 +219,15 @@ " draw_dot"))) ; TODO: use HEIGHT argument + + (define (start-line height) (string-append "\n" (ly-number->string height) " start-line { -lilypondpaperoutputscale lilypondpaperoutputscale scale +set-ps-scale-to-lily-scale + ")) (define (stem breapth width depth height) diff --git a/scm/sketch.scm b/scm/sketch.scm index 30ec4a4ce0..a76f79d5c3 100644 --- a/scm/sketch.scm +++ b/scm/sketch.scm @@ -234,9 +234,6 @@ layer('Layer 1',1,1,0,0,(0,0,0)) (define (invoke-char s i) "") -(define (invoke-dim1 s d) - (string-append - (ly-number->string (* d (/ 72.27 72))) " " s )) (define (bezier-sandwich x y l thick) (apply diff --git a/scm/tex.scm b/scm/tex.scm index 0ca8f300e9..79f6886422 100644 --- a/scm/tex.scm +++ b/scm/tex.scm @@ -175,7 +175,11 @@ (ly-gulp-file "music-drawing-routines.ps")) (if (defined? 'ps-testing) "/testing true def%\n" "") "}" - "\\input lilyponddefs \\outputscale=\\lilypondpaperoutputscale pt\\turnOnPostScript")) + "\\input lilyponddefs \\outputscale=\\lilypondpaperoutputscale " + ;; "pt" + "mm" + + "\\turnOnPostScript")) ;; Note: this string must match the string in ly2dvi.py!!! (define (header creator generate) @@ -186,12 +190,6 @@ (string-append "\n\\" s "{" (inexact->string i 10) "}" )) -(define (invoke-dim1 s d) - (string-append - "\n\\" s "{" (number->dim d) "}")) -(define (pt->sp x) - (* 65536 x)) - ;; ;; need to do something to make this really safe. ;; diff --git a/scripts/ly2dvi.py b/scripts/ly2dvi.py index 43dd994891..d428202869 100644 --- a/scripts/ly2dvi.py +++ b/scripts/ly2dvi.py @@ -359,17 +359,13 @@ track_dependencies_p = 0 dependency_files = [] -# -# Try to cater for bad installations of LilyPond, that have -# broken TeX setup. Just hope this doesn't hurt good TeX -# setups. Maybe we should check if kpsewhich can find -# feta16.{afm,mf,tex,tfm}, and only set env upon failure. -# + +kpse = os.popen ('kpsexpand \$TEXMF').read() +kpse = re.sub('[ \t\n]+$','', kpse) + environment = { - 'MFINPUTS' : datadir + '/mf' + ':', - 'TEXINPUTS': datadir + '/tex:' + datadir + '/ps:' + '.:' - + os.getcwd() + ':', - 'TFMFONTS' : datadir + '/tfm' + ':', + ## todo: prevent multiple addition. + 'TEXMF' : "{%s,%s}" % (datadir, kpse) , 'GS_FONTPATH' : datadir + '/afm:' + datadir + '/pfa', 'GS_LIB' : datadir + '/ps', } diff --git a/tex/lily-ps-defs.tex b/tex/lily-ps-defs.tex index 0172a73d18..30e8d1b992 100644 --- a/tex/lily-ps-defs.tex +++ b/tex/lily-ps-defs.tex @@ -11,13 +11,19 @@ % \def\PSsetTeXdimen#1{\expandafter\special{! /#1 (\csname #1\endcsname) set_tex_dimen}} \def\lilySpace{ } + +% for mm: 72.27/25.4 +\def\scaletounit{ 2.845276 mul } + +% for true printers points to postscript points: +%\def\scaletounit{1.00375} \def\turnOnPostScript{% % This sets CTM so that you get to the currentpoint % by executing a 0 0 moveto \def\embeddedps##1{% \special{ps\string: @beginspecial @setspecial - \lilypondpaperoutputscale\lilySpace - \lilypondpaperoutputscale\lilySpace + \lilypondpaperoutputscale\lilySpace\scaletounit + \lilypondpaperoutputscale\lilySpace\scaletounit % FUCKING REDHAT XDVI -- ARG! skeel ##1 @endspecial}% }