2 ligature-head.cc -- implement Ligature_head
4 source file of the GNU LilyPond music typesetter
6 (c) 2002 Juergen Reuter <reuter@ipd.uka.de>
9 #include "ligature-head.hh"
11 #include "note-head.hh"
15 * TODO: in scm/grob-description.scm, LigatureHead must contain value
16 * "rhythmic-head-interface" in the interfaces list. Otherwise, text
17 * scripts (such as fermata) are horizontally aligned with the end of
18 * the ligature rather than with the associated head. Why?
20 * TODO: if properties font-family and style are not set properly
21 * (e.g. by a user erronously setting font-family to #'music),
22 * lilypond currently crashes with the message: "lilypond:
23 * ../flower/include/interval.hh:28: Real Interval_t<double>::center()
24 * const: Assertion `!empty_b ()' failed.". The code of this class
25 * should be clever enough to foresee a potential crash, print a
26 * warning, and supply sensible default values that avoid the crash.
28 MAKE_SCHEME_CALLBACK (Ligature_head,brew_molecule,1);
30 Ligature_head::brew_molecule (SCM smob)
32 Grob *me = unsmob_grob (smob);
33 SCM brew_ligature_primitive_proc =
34 me->get_grob_property ("ligature-primitive-callback");
35 if (brew_ligature_primitive_proc != SCM_EOL)
37 return gh_call1 (brew_ligature_primitive_proc, smob);
41 warning ("Ligature_head: ligature-primitive-callback undefined -> resorting to Note_head::brew_molecule");
42 return Note_head::brew_molecule (smob);
47 UGH primitive is only used within the engraver.
49 ADD_INTERFACE (Ligature_head,"ligature-head-interface","Ligature head",
50 "primitive ligature-primitive-callback thickness flexa-width head-width delta-pitch join-left");