From: Han-Wen Nienhuys Date: Fri, 3 Jun 2005 19:23:23 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: release/2.5.28~18 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=43529c29e89e2e09635a5f2f191fd0ec91355cdd;p=lilypond.git *** empty log message *** --- diff --git a/ChangeLog b/ChangeLog index 7e882f1286..02b3c3ef00 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-06-03 Han-Wen Nienhuys + + * 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 * lily/main.cc (setup_localisation): Listen to LILYPOND_LOCALEDIR. @@ -13,6 +22,9 @@ 2005-06-02 Han-Wen Nienhuys + * 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 diff --git a/THANKS b/THANKS index 8612072c4e..733d932854 100644 --- a/THANKS +++ b/THANKS @@ -62,6 +62,8 @@ Arjan Bos David Bobroff Bernard Hurley Bruce McIntyre +Bruce Fairchild +Daniel Johnson David Rogers Dylan Nicholson Ed Jackson @@ -71,6 +73,7 @@ Gilles Sadowski Jack O'Quin Jeff Smith Johannes Schindelin +John Mandereau Jose Miguel Pasini Josiah Boothby Juergen Reuter @@ -81,6 +84,7 @@ Richard Schoeller Rob Platt Roman Stöckl-Schmidt Stephen McCarthy +Sven Axelsson Tapio Tuovila Tom Cato Amundsen Will Oram diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc index a4d8025704..980bedd576 100644 --- a/lily/auto-beam-engraver.cc +++ b/lily/auto-beam-engraver.cc @@ -49,7 +49,7 @@ private: Spanner *finished_beam_; Link_array *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::process_music () 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 @@ Auto_beam_engraver::typeset_beam () void Auto_beam_engraver::start_translation_timestep () { - count_ = 0; + process_acknowledged_count_ = 0; /* don't beam over skips */ @@ -278,8 +278,10 @@ Auto_beam_engraver::acknowledge_grob (Grob_info info) { /* 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 @@ Auto_beam_engraver::acknowledge_grob (Grob_info info) /* 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 @@ Auto_beam_engraver::acknowledge_grob (Grob_info info) 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 @@ Auto_beam_engraver::acknowledge_grob (Grob_info info) 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 @@ Auto_beam_engraver::process_acknowledged_grobs () } } - count_++; + process_acknowledged_count_++; } ADD_TRANSLATOR (Auto_beam_engraver, diff --git a/ps/music-drawing-routines.ps b/ps/music-drawing-routines.ps index fff7dfd752..64bd1bf56a 100644 --- a/ps/music-drawing-routines.ps +++ b/ps/music-drawing-routines.ps @@ -33,6 +33,25 @@ b4_Inc_state restore } bind def + +% 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 { diff --git a/scm/auto-beam.scm b/scm/auto-beam.scm index e3369a4346..eed74f9c3e 100644 --- a/scm/auto-beam.scm +++ b/scm/auto-beam.scm @@ -190,8 +190,9 @@ a fresh copy of the list-head is made." (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 @@ a fresh copy of the list-head is made." (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) diff --git a/scm/backend-library.scm b/scm/backend-library.scm index e0170fb433..c32c5b82e6 100644 --- a/scm/backend-library.scm +++ b/scm/backend-library.scm @@ -42,6 +42,7 @@ -q\ -dNOPAUSE\ -dBATCH\ + -r1200 \ -sDEVICE=pdfwrite\ -sOutputFile=~S\ -c .setpdfwrite\ diff --git a/scm/output-ps.scm b/scm/output-ps.scm index 6f8795915d..bcbcef0bbe 100644 --- a/scm/output-ps.scm +++ b/scm/output-ps.scm @@ -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