+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.
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
David Bobroff
Bernard Hurley
Bruce McIntyre
+Bruce Fairchild
+Daniel Johnson
David Rogers
Dylan Nicholson
Ed Jackson
Jack O'Quin
Jeff Smith
Johannes Schindelin
+John Mandereau
Jose Miguel Pasini
Josiah Boothby
Juergen Reuter
Rob Platt
Roman Stöckl-Schmidt
Stephen McCarthy
+Sven Axelsson
Tapio Tuovila
Tom Cato Amundsen
Will Oram
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.
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;
void
Auto_beam_engraver::start_translation_timestep ()
{
- count_ = 0;
+ process_acknowledged_count_ = 0;
/*
don't beam over skips
*/
{
/* 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 ();
/*
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 ();
if (!stems_)
return;
- Moment now = now_mom ();
-
grouping_->add_stem (now - beam_start_moment_ + beam_start_location_,
durlog - 2);
stems_->push (stem);
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_)
{
}
}
- count_++;
+ process_acknowledged_count_++;
}
ADD_TRANSLATOR (Auto_beam_engraver,
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
{
(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)))
(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)
-q\
-dNOPAUSE\
-dBATCH\
+ -r1200 \
-sDEVICE=pdfwrite\
-sOutputFile=~S\
-c .setpdfwrite\
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