CVSROOT: /cvsroot/lilypond Module name: lilypond Branch: Changes by: Han-Wen Nienhuys <[EMAIL PROTECTED]> 05/06/03 19:23:23
Modified files: . : ChangeLog THANKS lily : auto-beam-engraver.cc ps : music-drawing-routines.ps scm : auto-beam.scm backend-library.scm output-ps.scm Log message: CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.3713&tr2=1.3714&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/THANKS.diff?tr1=1.118&tr2=1.119&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/auto-beam-engraver.cc.diff?tr1=1.143&tr2=1.144&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ps/music-drawing-routines.ps.diff?tr1=1.36&tr2=1.37&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/auto-beam.scm.diff?tr1=1.25&tr2=1.26&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/backend-library.scm.diff?tr1=1.29&tr2=1.30&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/output-ps.scm.diff?tr1=1.142&tr2=1.143&r1=text&r2=text Patches: Index: lilypond/ChangeLog diff -u lilypond/ChangeLog:1.3713 lilypond/ChangeLog:1.3714 --- lilypond/ChangeLog:1.3713 Fri Jun 3 12:52:34 2005 +++ lilypond/ChangeLog Fri Jun 3 19:23:22 2005 @@ -1,3 +1,12 @@ +2005-06-03 Han-Wen Nienhuys <[EMAIL PROTECTED]> + + * scm/auto-beam.scm (default-auto-beam-check): only forbid beam + start on grace moment. Fixes autobeam-grace.ly. + + * lily/auto-beam-engraver.cc (process_acknowledged_grobs): don't + process anything unless we're at the end of a pending beam. Fixes + syncopated 8ths beamed across a beat. + 2005-06-03 Jan Nieuwenhuizen <[EMAIL PROTECTED]> * lily/main.cc (setup_localisation): Listen to LILYPOND_LOCALEDIR. @@ -13,6 +22,9 @@ 2005-06-02 Han-Wen Nienhuys <[EMAIL PROTECTED]> + * scm/backend-library.scm (postscript->pdf): set resolution to + 1200, so bitmap fonts aren't that ugly. + * Documentation/topdocs/NEWS.tely (Top): add entry about font family. * lily/dynamic-engraver.cc (acknowledge_grob): only center on Index: lilypond/THANKS diff -u lilypond/THANKS:1.118 lilypond/THANKS:1.119 --- lilypond/THANKS:1.118 Tue May 31 12:16:40 2005 +++ lilypond/THANKS Fri Jun 3 19:23:22 2005 @@ -62,6 +62,8 @@ David Bobroff Bernard Hurley Bruce McIntyre +Bruce Fairchild +Daniel Johnson David Rogers Dylan Nicholson Ed Jackson @@ -71,6 +73,7 @@ Jack O'Quin Jeff Smith Johannes Schindelin +John Mandereau Jose Miguel Pasini Josiah Boothby Juergen Reuter @@ -81,6 +84,7 @@ Rob Platt Roman Stöckl-Schmidt Stephen McCarthy +Sven Axelsson Tapio Tuovila Tom Cato Amundsen Will Oram Index: lilypond/lily/auto-beam-engraver.cc diff -u lilypond/lily/auto-beam-engraver.cc:1.143 lilypond/lily/auto-beam-engraver.cc:1.144 --- lilypond/lily/auto-beam-engraver.cc:1.143 Sun May 8 23:30:50 2005 +++ lilypond/lily/auto-beam-engraver.cc Fri Jun 3 19:23:23 2005 @@ -49,7 +49,7 @@ Spanner *finished_beam_; Link_array<Item> *stems_; - int count_; + int process_acknowledged_count_; Moment last_add_mom_; /* Projected ending of the beam we're working on. @@ -87,7 +87,7 @@ Auto_beam_engraver::Auto_beam_engraver () { forbid_ = 0; - count_ = 0; +process_acknowledged_count_ = 0; stems_ = 0; shortest_mom_ = Moment (Rational (1, 8)); finished_beam_ = 0; @@ -242,7 +242,7 @@ void Auto_beam_engraver::start_translation_timestep () { - count_ = 0; + process_acknowledged_count_ = 0; /* don't beam over skips */ @@ -278,8 +278,10 @@ { /* Duplicated from process_music (), since Repeat_acknowledge_engraver::process_music () may also set whichBar. */ + + Moment now = now_mom (); if (scm_is_string (get_property ("whichBar")) - && beam_start_moment_ < now_mom ()) + && beam_start_moment_ < now) { consider_end (shortest_mom_); junk_beam (); @@ -340,7 +342,7 @@ /* ignore grace notes. */ - if (bool (beam_start_location_.grace_part_) != bool (now_mom ().grace_part_)) + if (bool (beam_start_location_.grace_part_) != bool (now.grace_part_)) return; Moment dur = unsmob_duration (m->get_property ("duration"))->get_length (); @@ -373,8 +375,6 @@ if (!stems_) return; - Moment now = now_mom (); - grouping_->add_stem (now - beam_start_moment_ + beam_start_location_, durlog - 2); stems_->push (stem); @@ -386,12 +386,15 @@ void Auto_beam_engraver::process_acknowledged_grobs () { - if (!count_) + if (extend_mom_ > now_mom ()) + return ; + + if (!process_acknowledged_count_) { consider_end (shortest_mom_); consider_begin (shortest_mom_); } - else if (count_ > 1) + else if (process_acknowledged_count_ > 1) { if (stems_) { @@ -408,7 +411,7 @@ } } - count_++; + process_acknowledged_count_++; } ADD_TRANSLATOR (Auto_beam_engraver, Index: lilypond/ps/music-drawing-routines.ps diff -u lilypond/ps/music-drawing-routines.ps:1.36 lilypond/ps/music-drawing-routines.ps:1.37 --- lilypond/ps/music-drawing-routines.ps:1.36 Tue May 31 15:44:48 2005 +++ lilypond/ps/music-drawing-routines.ps Fri Jun 3 19:23:23 2005 @@ -33,6 +33,25 @@ b4_Inc_state restore } bind def + +%<font> <encoding> <name> reencode-font +/reencode-font +{ + /name exch def + /encoding exch def + dup length + dict begin { + 1 index /FID ne {def} {pop + pop} ifelse + } + forall + /Encoding encoding + def currentdict + end + name exch definefont +} bind def + + % llx lly urx ury URI /mark_URI { Index: lilypond/scm/auto-beam.scm diff -u lilypond/scm/auto-beam.scm:1.25 lilypond/scm/auto-beam.scm:1.26 --- lilypond/scm/auto-beam.scm:1.25 Thu Apr 21 18:45:04 2005 +++ lilypond/scm/auto-beam.scm Fri Jun 3 19:23:23 2005 @@ -190,8 +190,9 @@ (let ((value (ly:context-property context name))) (if (not (null? value)) value default))) - (if (!= (ly:moment-grace-numerator (ly:context-now context)) 0) - ;; No auto beaming for grace notes + ;; Don't start auto beams on grace notes + (if (and (!= (ly:moment-grace-numerator (ly:context-now context)) 0) + (= dir START)) #f (let* ((beat-length (get 'beatLength (ly:make-moment 1 1))) (measure-length (get 'measureLength (ly:make-moment 1 1))) @@ -216,6 +217,7 @@ (append function '(* * * *)) (append function type time) (append function '(* *) time)))) + (if (or ;; always begin or end beams at beginning/ending of measure (= (ly:moment-main-numerator pos) 0) Index: lilypond/scm/backend-library.scm diff -u lilypond/scm/backend-library.scm:1.29 lilypond/scm/backend-library.scm:1.30 --- lilypond/scm/backend-library.scm:1.29 Mon May 23 19:18:58 2005 +++ lilypond/scm/backend-library.scm Fri Jun 3 19:23:23 2005 @@ -42,6 +42,7 @@ -q\ -dNOPAUSE\ -dBATCH\ + -r1200 \ -sDEVICE=pdfwrite\ -sOutputFile=~S\ -c .setpdfwrite\ Index: lilypond/scm/output-ps.scm diff -u lilypond/scm/output-ps.scm:1.142 lilypond/scm/output-ps.scm:1.143 --- lilypond/scm/output-ps.scm:1.142 Mon May 30 09:45:14 2005 +++ lilypond/scm/output-ps.scm Fri Jun 3 19:23:23 2005 @@ -151,13 +151,29 @@ size cid? x-y-named-glyphs) + (define (encoding-vector-hack glyphs) + + ;; GS fucks up with glyphs that are not in the + ;; encoding vector. + (define (inner j glyphs) + (if (or (null? glyphs) (> j 256)) + '() + (cons (format "dup ~a /~a put\n" + j (car glyphs)) + (inner (1+ j) (cdr glyphs))))) + + (format "256 array 0 1 255 { 1 index exch /.notdef put} for\n ~a +/EncHack reencode-font /EncHack findfont" + (apply string-append (inner 32 glyphs)))) + ;; END HACK. + (format #f "gsave 1 output-scale div 1 output-scale div scale /~a ~a ~a scalefont setfont\n~a grestore" postscript-font-name (if cid? " /CIDFont findresource " - " findfont") - + " findfont") + size (apply string-append _______________________________________________ Lilypond-cvs mailing list Lilypond-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-cvs