use (sign dir) for computing attachment points.
another (sign dir) fix for note markup
use stem::calc-duration-log for rest.
don't use guile -e main execution.
Examine Stem::duration_log() for preventing merge of quarter and halfnote. Fixes collision-heads.ly. Add separate regtest for that.
trim example.
excise cmr10
formatting.
use SCM_ASSERT_TYPE for graphing functions.
nitpicks.
+2006-11-07 Han-Wen Nienhuys <hanwen@lilypond.org>
+
+ * lily/break-substitution.cc:
+ * lily/dynamic-text-spanner.cc:
+ nitpicks.
+
+ * lily/engraver.cc:
+ * lily/grob-property.cc:
+ use SCM_ASSERT_TYPE for graphing functions.
+
+ * lily/cluster.cc:
+ formatting.
+
+ * lily/all-font-metrics.cc:
+ excise cmr10
+
+ * input/regression/collision-heads.ly:
+ trim example.
+
+ * lily/note-collision.cc:
+ * input/regression/collision-merge-differently-headed.ly:
+ Examine Stem::duration_log() for preventing merge of quarter and halfnote. Fixes collision-heads.ly. Add separate regtest for that.
+
+ * scripts/lilypond-invoke-editor.scm:
+ don't use guile -e main execution.
+
+ * scm/define-grobs.scm:
+ use stem::calc-duration-log for rest.
+
+ * scm/define-markup-commands.scm:
+ another (sign dir) fix for note markup
+
+ * scm/define-markup-commands.scm:
+ use (sign dir) for computing attachment points.
+
+ * buildscripts/git-update-changelog.py:
+ run cvs up before patching.
+
2006-11-06 Han-Wen Nienhuys <hanwen@lilypond.org>
* lily/note-head.cc:
try:
previously_done = dict((c, 1) for c in open ('.git-commits-done').read ().split ('\n'))
- except OSError:
+ except IOError:
previously_done = {}
- commits = [c for c in commits if not previously_done.has_key (c.committish)]
commits = [c for c in commits if not previously_done.has_key (c.committish)]
commits = sorted (commits, cmp=Commit.compare)
+ system ('cvs up')
file_adddel = []
collated_log = ''
-\version "2.7.39"
+\version "2.9.29"
\header {
texidoc =
-
- "If @code{merge-differently-headed} is enabled, then
-open note heads may be merged with black noteheads, but only
-if the black note heads are from 8th or shorter notes.
-"
+ "Open and black note heads are not merged by default."
}
\context Staff \relative c'' <<
{
c2 c8 c4.
-
- \override Staff.NoteCollision #'merge-differently-headed = ##t
- c2 c8 c4.
- c2
}\\
{
c8 c4. c2
-
- c8 c4. c2
- c4
}
>>
--- /dev/null
+\version "2.7.39"
+\header {
+ texidoc =
+
+ "If @code{merge-differently-headed} is enabled, then
+open note heads may be merged with black noteheads, but only
+if the black note heads are from 8th or shorter notes.
+"
+
+}
+
+\layout { ragged-right= ##t }
+
+
+\context Staff \relative c'' <<
+ {
+ \override Staff.NoteCollision #'merge-differently-headed = ##t
+ c2 c8 c4.
+ c2
+ }\\
+ {
+ c8 c4. c2
+ c4
+ }
+>>
#include "scm-hash.hh"
#include "warn.hh"
-static char const *default_font_str0_ = "cmr10";
-
All_font_metrics::All_font_metrics (string path)
{
otf_dict_ = new Scheme_hash_table;
{
Font_metric *f = find_otf (name);
-
- if (!f)
- {
- warning (_f ("can't find font: `%s'", name.c_str ()));
- warning (_ ("loading default font"));
- }
-
- string def_name = default_font_str0_;
-
if (!f)
{
- error (_f ("can't find default font: `%s'", def_name.c_str ()));
- error (_f ("(search path: `%s')", search_path_.to_string ()));
- error (_ ("giving up"));
+ error (_f ("can't find font: `%s'", name.c_str ()));
}
return f;
/*
We store items on the left, spanners on the right in this vector.
+
+ FIXME: will not multithread.
*/
static Substitution_entry *vec;
static int vec_room;
"The property @code{style} controls the shape of cluster segments. Valid values "
"include @code{leftsided-stairs}, @code{rightsided-stairs}, @code{centered-stairs}, "
"and @code{ramp}.\n",
- "style padding columns");
+ "style "
+ "padding "
+ "columns ");
struct Cluster_beacon
{
Grob *me = unsmob_grob (smob);
Spanner *spanner = dynamic_cast<Spanner *> (me);
- Grob *common = spanner->get_bound (LEFT)->common_refpoint (spanner->get_bound (RIGHT), X_AXIS);
+ Grob *common = spanner->get_bound (LEFT)
+ ->common_refpoint (spanner->get_bound (RIGHT), X_AXIS);
Output_def *layout = me->layout ();
Interval span_points;
"the grob to be created and the corresponding line number in the "
"C++ source file.")
{
- if (!ly_is_procedure (cb))
- warning (_ ("not setting creation callback: not a procedure"));
- else
- creation_callback = cb;
+ SCM_ASSERT_TYPE(ly_is_procedure (cb), cb, SCM_ARG1, __FUNCTION__,
+ "procedure");
- return SCM_EOL;
+ creation_callback = cb;
+
+ return SCM_UNSPECIFIED;
}
#endif
"which the modification was requested, the property to be changed and "
"the new value for the property.")
{
- if (!ly_is_procedure (cb))
- warning (_ ("not setting modification callback: not a procedure"));
- else
- modification_callback = cb;
- return SCM_EOL;
+
+ SCM_ASSERT_TYPE(ly_is_procedure (cb), cb, SCM_ARG1, __FUNCTION__,
+ "procedure");
+
+ modification_callback = cb;
+ return SCM_UNSPECIFIED;
}
#endif
if (!Note_column::get_stem (cu) || !Note_column::get_stem (cd))
return;
+ Drul_array<Grob*> stems (Note_column::get_stem (cd),
+ Note_column::get_stem (cu));
+
Grob *nu = Note_column::first_head (cu);
Grob *nd = Note_column::first_head (cd);
/* Should never merge quarter and half notes, as this would make
them indistinguishable. */
if (merge_possible
- && ((Rhythmic_head::duration_log (nu) == 1
- && Rhythmic_head::duration_log (nd) == 2)
- || (Rhythmic_head::duration_log (nu) == 2
- && Rhythmic_head::duration_log (nd) == 1)))
+ && ((Stem::duration_log (stems[UP]) == 1
+ && Stem::duration_log (stems[DOWN]) == 2)
+ || (Stem::duration_log (stems[UP]) == 2
+ && Stem::duration_log (stems[DOWN]) == 1)))
merge_possible = false;
/*
/* properties */
"merge-differently-dotted "
"merge-differently-headed "
- "positioning-done");
+ "positioning-done ");
(Rest
. (
(stencil . ,ly:rest::print)
- (duration-log . ,note-head::calc-duration-log)
+ (duration-log . ,stem::calc-duration-log)
(X-extent . ,ly:rest::width)
(Y-extent . ,ly:rest::height)
(Y-offset . ,ly:rest::y-offset-callback)
. (
(stencil . ,ly:text-interface::print)
(Y-offset . ,ly:staff-symbol-referencer::callback)
- (duration-log . ,note-head::calc-duration-log)
(font-size . -2)
(stem-attachment . (0.0 . 1.35))
(font-series . bold)
(define-markup-command (note-by-number layout props log dot-count dir) (number? number? number?)
"Construct a note symbol, with stem. By using fractional values for
@var{dir}, you can obtain longer or shorter stems."
+
(define (get-glyph-name-candidates dir log style)
(map (lambda (dir-name)
(format "noteheads.~a~a~a" dir-name (min log 2)
(size-factor (magstep (chain-assoc-get 'font-size props 0)))
(style (chain-assoc-get 'style props '()))
(stem-length (* size-factor (max 3 (- log 1))))
- (head-glyph-name (get-glyph-name font (get-glyph-name-candidates dir log style)))
+ (head-glyph-name (get-glyph-name font (get-glyph-name-candidates (sign dir) log style)))
(head-glyph (ly:font-get-glyph font head-glyph-name))
(attach-indices (ly:note-head::stem-attachment font head-glyph-name))
(stem-thickness (* size-factor 0.13))
(stemy (* dir stem-length))
(attach-off (cons (interval-index
(ly:stencil-extent head-glyph X)
- (* dir (car attach-indices)))
- (* dir ; fixme, this is inconsistent between X & Y.
+ (* (sign dir) (car attach-indices)))
+ (* (sign dir) ; fixme, this is inconsistent between X & Y.
(interval-index
(ly:stencil-extent head-glyph Y)
(cdr attach-indices)))))
(stem-glyph (and (> log 0)
(ly:round-filled-box
(ordered-cons (car attach-off)
- (+ (car attach-off) (* (- dir) stem-thickness)))
+ (+ (car attach-off) (* (- (sign dir)) stem-thickness)))
(cons (min stemy (cdr attach-off))
(max stemy (cdr attach-off)))
(/ stem-thickness 3))))
-#!@GUILE@ \
--e main -s
+#!@GUILE@ -s
!#
;;;; lilypond-invoke-editor.scm -- Invoke an editor in file:line:column mode
;;;;
(run-editor uri)
(run-browser uri)))))
+(main (command-line))