]> git.donarmstrong.com Git - lilypond.git/commitdiff
*** empty log message ***
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 3 Jun 2005 19:23:23 +0000 (19:23 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 3 Jun 2005 19:23:23 +0000 (19:23 +0000)
ChangeLog
THANKS
lily/auto-beam-engraver.cc
ps/music-drawing-routines.ps
scm/auto-beam.scm
scm/backend-library.scm
scm/output-ps.scm

index 7e882f1286c77fff1f34c068cb8ce6182ca6fbef..02b3c3ef00ce8903706f690986a2898a1ae4acbc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2005-06-03  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * 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  <janneke@gnu.org>
 
        * lily/main.cc (setup_localisation): Listen to LILYPOND_LOCALEDIR.
@@ -13,6 +22,9 @@
 
 2005-06-02  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * 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 8612072c4ed22b0447bb197b4589b68a49cfbaac..733d932854942ad4fff3dc57635664649588a535 100644 (file)
--- 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
index a4d8025704f3dc8a41493d8ae67914ae8983944e..980bedd57686bd06b76b2bc012ebe329602048dc 100644 (file)
@@ -49,7 +49,7 @@ private:
   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::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,
index fff7dfd7528b822a22710fa9003a823011b41a1f..64bd1bf56afe42cac3cba210877347f0c3cbb2b4 100644 (file)
   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 e3369a4346c32a0dd81f10925001c92f813c611e..eed74f9c3ef507fcc2269564e5b6355bcbf25359 100644 (file)
@@ -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)
index e0170fb433e217dc3754c1268a4161da64f04e93..c32c5b82e6f2c8c1de8e801c121b48624034f63d 100644 (file)
@@ -42,6 +42,7 @@
  -q\
  -dNOPAUSE\
  -dBATCH\
+ -r1200 \
  -sDEVICE=pdfwrite\
  -sOutputFile=~S\
  -c .setpdfwrite\
index 6f8795915d6c74c91aefe9e001cef16c71ff79f6..bcbcef0bbe963e14c61bd009fec0548b5a67094b 100644 (file)
         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