]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.5.16
authorfred <fred>
Wed, 27 Mar 2002 02:03:28 +0000 (02:03 +0000)
committerfred <fred>
Wed, 27 Mar 2002 02:03:28 +0000 (02:03 +0000)
input/test/ancient-font.ly
lily/include/porrectus.hh
lily/porrectus-engraver.cc
scm/grob-description.scm
scm/grob-property-description.scm

index cfc7e498a30aef267873af6b687c94de8b6de7e1..33e234db23638257786b96a786e4776553660f3c 100644 (file)
@@ -31,6 +31,7 @@ upperVoice =  \context Staff = upperVoice <
        \property Voice.Porrectus \override #'solid = ##t
        \property Voice.Porrectus \override #'add-stem = ##t
        \property Voice.Porrectus \override #'stem-direction = #-1
+       \property Voice.Porrectus \override #'line-thickness = #0.5
        \key es \major
        \clef "vaticana_fa2"
        c!1 des! e! f! ges!
@@ -44,7 +45,7 @@ upperVoice =  \context Staff = upperVoice <
        a! b!
        \property Staff.BarLine \override #'bar-size = #3.0 \bar "|"
        \property Voice.NoteHead \override #'style = #'vaticana_virga
-       ces' b! ces'! \~ ges! \~ fes!
+       ces' b! des'! \~ ges! \~ fes!
        \breathe
        \clef "vaticana_fa1"
        \property Voice.NoteHead \override #'style = #'vaticana_quilisma
@@ -129,7 +130,8 @@ lowerVoice =  \context Staff = lowerNotes <
        \property Voice.Porrectus \override #'add-stem = ##t
        \property Voice.Porrectus \override #'stem-direction = #1
        \property Voice.Porrectus \override #'line-thickness = #0.7
-       % \property Voice.Porrectus \override #'porrectus-width = #3.0
+%      \property Voice.Porrectus \override #'auto-properties = ##t
+%      \property Voice.Porrectus \override #'porrectus-width = #3.0
        \key a \major
 
        % IMPORTANT NOTE:
@@ -186,11 +188,6 @@ lowerVoice =  \context Staff = lowerNotes <
        e2 f g
        \clef "mensural_g"
 
-       % FIXME: In the second and all subsequent lines of score, the
-       % stems and accidentals of the junked notes keep visible on
-       % porrectus grobs.  Is this an initialization bug in the line
-       % breaking algorithm?
-
        bes'! \~ as'! \~ cis''!
        bes'! \~ fis'! as'! \~ ges'!
        \property Staff.forceClef = ##t
index 3b4a97a0468a3189f62147f42909982acd8d9e84..9fa037ab9c344950e7f894d67b9450caf27edf36 100644 (file)
@@ -30,6 +30,7 @@ private:
   static Molecule brew_mensural_molecule (Item *, Real,
                                          bool, Real, Real,
                                          bool, Direction);
+  static Molecule brew_bezier_sandwich (Bezier, Bezier);
   static Molecule brew_horizontal_slope (Real, Real, Real);
   static Molecule create_ledger_line (Interval, Grob *);
   static Molecule create_streepjes (Grob *, int, int, Interval);
index 4cc35e910c55216ec673c75eb9cb9271baa7e073..28166e63ea1adb8a51ce7f60c793561cf7893dae 100644 (file)
  *
  * TODO: Hufnagel support.
  *
- * TODO: Fine-tuning of vaticana-style porrectus shape; in particular,
- * ensure solidity if solid is set to #t and thickness is very small.
- *
- * TODO: For white mensural (i.e. #'style=#'mensural, #'solid=##f)
- * porrectus grobs, it is possible to automatically determine all
- * porrectus specific properties (add-stem, stem-direction) solely
- * from the duration of the contributing notes and time-signature.
- * Introduce a boolean grob property called auto-config, so that, if
- * turned on, lily automatically sets the properties add-stem and
- * stem-direction properly.
- *
  * TODO: The following issues are currently not handled by this
- * engraver: (1) accidentals placement, (2) avoiding line breaking
- * inbetween porrectus, (3) spacing.  (Han-Wen says: for (2), look at
- * beam engraver.)  For example, currently only the accidental for the
- * second note (cp. the above FIXME) is printed.  These issues should
- * be resolved by some sort of ligature context that encloses use of
- * this engraver, using syntax like: \ligature { e \~ c }.
+ * engraver: (1) accidentals placement, (2) spacing.  For example,
+ * currently only the accidental for the second note (cp. the above
+ * FIXME) is printed.  These issues should be resolved by some sort of
+ * ligature context that encloses use of this engraver, using syntax
+ * like: \ligature { e \~ c }.
  *
  * TODO: Do not allow a series of adjacent porrectus requests, as in:
  * e \~ d \~ c.
  *
  * TODO: Junk duplicate (or rather triple) implementation of
- * create_ledger_line in porrectus.cc, custos.cc and note-head.cc.  */
+ * create_ledger_line in porrectus.cc, custos.cc and note-head.cc.
+ */
 
 #include "staff-symbol-referencer.hh"
 #include "porrectus.hh"
@@ -47,7 +36,9 @@
 #include "rhythmic-head.hh"
 #include "item.hh"
 #include "engraver.hh"
+#include "score-engraver.hh"
 #include "pqueue.hh"
+#include "warn.hh"
 
 // TODO: PHead_melodic_tuple is duplicated code from tie-engraver.cc.
 // Maybe put this into public class?
@@ -74,6 +65,7 @@ public:
   
 protected:
   virtual bool try_music (Music *req_l);
+  virtual void process_music ();
   virtual void create_grobs ();
   virtual void stop_translation_timestep ();
   virtual void start_translation_timestep ();
@@ -104,6 +96,28 @@ Porrectus_engraver::try_music (Music *m)
     return false;
 }
 
+void
+Porrectus_engraver::process_music ()
+{
+  if (porrectus_req_l_)
+    {
+      // TODO: Move code that forbids breaking into ligature music
+      // wrapper?
+      Score_engraver *engraver = 0;
+      for (Translator *translator = daddy_grav_l ();
+          translator && !engraver;
+          translator = translator->daddy_trans_l_)
+       {
+         engraver = dynamic_cast<Score_engraver*> (translator);
+       }
+      
+      if (!engraver)
+       programming_error ("No score engraver!");
+      else
+       engraver->forbid_breaks ();
+    }
+}
+
 void
 Porrectus_engraver::acknowledge_grob (Grob_info info_l_)
 {
index 3683ebda1ed9759ff4c56412ad2b23c36070cc82..55cece0c443c3ef73e8115444c18a85932f29525 100644 (file)
        
        (Porrectus . (
                (style . mensural)
-               (auto-properties . #t)
+               (auto-properties . #f)
                (solid . #f)
                (porrectus-width . 2.4)
                (line-thickness . 1.0)
                (add-stem . #t)
                (stem-direction . 1)
                (molecule-callback . ,Porrectus::brew_molecule)
-               (meta . ,(grob-description
-                                          porrectus-interface))
+               (meta . ,(grob-description porrectus-interface))
        ))
 
        (RehearsalMark . (
index 3f808ba8bf0a5e0d61f442120ce4f5e5e2764eec..85a6b931f412d0650d18af3ff804e7a7b8530fe2 100644 (file)
@@ -55,6 +55,7 @@ terms of note head bounding box.")
 '(LEFT-offset . RIGHT-offset).  This offset is added to the
 attachments to prevent ugly slurs.  [fixme: we need more documentation here].
 .")
+(grob-property-description 'auto-properties boolean? "if true, as many properties of this grob as possible will be determined automatically from the musical context.")
 (grob-property-description 'auto-knee-gap number-or-boolean? "the minimal smallest gap between two adjacent beamed chords for which beam will create auto-knees.  Set to false for no auto knees." )
 (grob-property-description 'axes list? "list of axis numbers.
 In the case of alignment grobs, this should contain only one number.")