]> git.donarmstrong.com Git - lilypond.git/commitdiff
* input/regression/breathing-sign.ly: tiny fixes
authorJürgen Reuter <j@web.de>
Sun, 7 Sep 2003 22:25:52 +0000 (22:25 +0000)
committerJürgen Reuter <j@web.de>
Sun, 7 Sep 2003 22:25:52 +0000 (22:25 +0000)
* lily/mensural-ligature.cc: renamed stem->cauda/join to avoid
semantical collision with vaticana ligatures

* lily/vaticana-ligature-engraver.cc, lily/vaticana-ligature.cc,
scm/define-grob-properties.scm: bugfix: semantics of delta_pitch
now consistent with mensural ligatures

* lily/vaticana-ligature-engraver.cc, lily/vaticana-ligature.cc,
mf/parmesan-heads.mf: bugfix: length of cauda of flexa depends on
context pitches and staff position; dto. for virga stem; removed
obsolete virga and clivis characters from parmesan font (WARNING:
font changed)

* mf/parmesan-heads.mf, mf/parmesan-clefs.mf,
mf/parmesan-timesig.mf: fixed several set_char_box ()'s

* lily/vaticana-ligature-engraver.cc, lily/vaticana-ligature.cc,
scm/define-grob-properties.scm: consistency fix: renamed
join_left->add_cauda

* mf/parmesan-heads.mf: bugfix: cephalicus head: corrected
appendix length; bugfix: yoffs_bt for reverse direction punctum
characters

* lily/vaticana-ligature-engraver.cc, lily/vaticana-ligature.cc:
small cleanups; added more docu

* lily/mensural-ligature-engraver.cc, lily/vaticana-ligature-engraver.cc,
lily/coherent-ligature-engraver.cc: cleanup: moved delta-pitch
computation to CoherentLigatureEngraver

* ly/gregorian-init.ly, lily/gregorian-ligature.cc,
scm/define-grob-properties.scm: bugfix: added missing linea and
cavum properties; bugfix: removed dead semivocalis property

* mf/parmesan-heads.mf: bugfix: linea punctum: vertical lines
length; redesigned quilisma, stropha and auctum

* ly/engraver-init.ly, scm/define-grobs.scm: use 0.6 as default
line thickness

* lily/vaticana-ligature-engraver.cc, mf/parmesan-heads.mf,
Documentation/user/refman.itely: bugfix: introduced shifted
epiphonus head to avoid collision with adjacent plica

16 files changed:
ChangeLog
Documentation/user/refman.itely
input/regression/breathing-sign.ly
lily/coherent-ligature-engraver.cc
lily/gregorian-ligature.cc
lily/mensural-ligature-engraver.cc
lily/mensural-ligature.cc
lily/vaticana-ligature-engraver.cc
lily/vaticana-ligature.cc
ly/engraver-init.ly
ly/gregorian-init.ly
mf/parmesan-clefs.mf
mf/parmesan-heads.mf
mf/parmesan-timesig.mf
scm/define-grob-properties.scm
scm/define-grobs.scm

index e98a0e049eab8fce3a5004d44d2d78a5cee7298d..2da34855b2ffc1b2f951077a149661e900cc7617 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,52 @@
+2003-09-08  Juergen Reuter  <reuter@ipd.uka.de>
+
+       * input/regression/breathing-sign.ly: tiny fixes
+
+       * lily/mensural-ligature.cc: renamed stem->cauda/join to avoid
+       semantical collision with vaticana ligatures
+
+       * lily/vaticana-ligature-engraver.cc, lily/vaticana-ligature.cc,
+       scm/define-grob-properties.scm: bugfix: semantics of delta_pitch
+       now consistent with mensural ligatures
+
+       * lily/vaticana-ligature-engraver.cc, lily/vaticana-ligature.cc,
+       mf/parmesan-heads.mf: bugfix: length of cauda of flexa depends on
+       context pitches and staff position; dto. for virga stem; removed
+       obsolete virga and clivis characters from parmesan font (WARNING:
+       font changed)
+
+       * mf/parmesan-heads.mf, mf/parmesan-clefs.mf,
+       mf/parmesan-timesig.mf: fixed several set_char_box ()'s
+
+       * lily/vaticana-ligature-engraver.cc, lily/vaticana-ligature.cc,
+       scm/define-grob-properties.scm: consistency fix: renamed
+       join_left->add_cauda
+
+       * mf/parmesan-heads.mf: bugfix: cephalicus head: corrected
+       appendix length; bugfix: yoffs_bt for reverse direction punctum
+       characters
+
+       * lily/vaticana-ligature-engraver.cc, lily/vaticana-ligature.cc:
+       small cleanups; added more docu
+
+       * lily/mensural-ligature-engraver.cc, lily/vaticana-ligature-engraver.cc,
+       lily/coherent-ligature-engraver.cc: cleanup: moved delta-pitch
+       computation to CoherentLigatureEngraver
+
+       * ly/gregorian-init.ly, lily/gregorian-ligature.cc,
+       scm/define-grob-properties.scm: bugfix: added missing linea and
+       cavum properties; bugfix: removed dead semivocalis property
+
+       * mf/parmesan-heads.mf: bugfix: linea punctum: vertical lines
+       length; redesigned quilisma, stropha and auctum
+
+       * ly/engraver-init.ly, scm/define-grobs.scm: use 0.6 as default
+       line thickness
+
+       * lily/vaticana-ligature-engraver.cc, mf/parmesan-heads.mf,
+       Documentation/user/refman.itely: bugfix: introduced shifted
+       epiphonus head to avoid collision with adjacent plica
+
 2003-09-07  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
        * scm/font.scm (paper20-style-sheet-alist): add smaller font sizes.
index d8222701cf3ae4501be036371dbe573b2ac03ef9..3fd4e134f274e679167833e99f4da2173f0cd9b6 100644 (file)
@@ -7076,15 +7076,8 @@ respectively.
 
 @refbugs
 
-Scandicus Deminutus: Punctum Auctum Ascendens overlaps with
-Semivocalis head; this looks awful.
-
 Trigonus: apply equal spacing, regardless of pitch.
 
-Flexa and similar figurae: the left appendix should be adjusted with
-respect to the position of this head (on staffline or on staffspace)
-and the vertical position of the subsequent head.
-
 @node Figured bass
 @subsection Figured bass
 
index 208bb45a3fbb1ca65c852d4e54de923928efbaeb..8047cfd7964e529e339fd28a8fd43adebc8cd401 100644 (file)
@@ -74,8 +74,9 @@ finalis, the latter three looking similar to bar glyphs.
     \context VaticanaStaff {
       \notes \relative c' {
 
-       % we turn bars off for Gregorian stuff
-       \property Staff.BarLine \override #'transparent = ##t
+       % we turn bars and bar numbers off for Gregorian stuff
+       \property Staff.BarLine \set #'transparent = ##t
+       \property Score.BarNumber \set #'transparent = ##t
 
        % here is no \breathe
        c g c
@@ -102,4 +103,7 @@ finalis, the latter three looking similar to bar glyphs.
       }
     }
   }
+  \paper {
+    \translator { \RemoveEmptyStaffContext }
+  }
 }
index b898920950f73184e5873ea0be370ec4dc1dec78..50e6d57057b981571b97e8dd5fea074d5c9b9a41 100644 (file)
@@ -169,6 +169,29 @@ Coherent_ligature_engraver::collect_accidentals (Spanner *, Array<Grob_info>)
   /* TODO */
 }
 
+void
+compute_delta_pitches (Array<Grob_info> primitives)
+{
+  int prev_pitch = 0;
+  int delta_pitch = 0;
+  Item *prev_primitive = 0, *primitive = 0;
+  for (int i = 0; i < primitives.size(); i++) {
+    primitive = dynamic_cast<Item*> (primitives[i].grob_);
+    Music *music_cause = primitives[i].music_cause ();
+    int pitch =
+      unsmob_pitch (music_cause->get_mus_property ("pitch"))->steps ();
+    if (prev_primitive)
+      {
+       delta_pitch = pitch - prev_pitch;
+       prev_primitive->set_grob_property ("delta-pitch",
+                                          gh_int2scm (delta_pitch));
+      }
+    prev_pitch = pitch;
+    prev_primitive = primitive;
+  }
+  primitive->set_grob_property ("delta-pitch", gh_int2scm (0));
+}
+
 void
 Coherent_ligature_engraver::build_ligature (Spanner *, Array<Grob_info>)
 {
@@ -181,6 +204,10 @@ void
 Coherent_ligature_engraver::typeset_ligature (Spanner *ligature,
                                              Array<Grob_info> primitives)
 {
+  // compute some commonly needed context info stored as grob
+  // properties
+  compute_delta_pitches (primitives);
+
   // prepare ligature for typesetting
   build_ligature (ligature, primitives);
   collect_accidentals (ligature, primitives);
index 664124f329e863f9481f78a6c8dee1be5e512f30..7b5cfc221a266f4786284578f9495adb507619f9 100644 (file)
@@ -19,4 +19,5 @@ public:
 ADD_INTERFACE (Gregorian_ligature, "gregorian-ligature-interface",
               "A gregorian ligature",
               "virga stropha inclinatum auctum descendens ascendens "
-              "pes-or-flexa semivocalis oriscus context-info quilisma prefix-set deminutum");
+              "oriscus quilisma deminutum cavum linea pes-or-flexa "
+              "context-info prefix-set");
index bf1c2cd0c58abbd9ddf0c5a60504a9abe2f2bb3e..f8786b43142723b9d4a8e946e94341a41675f5b4 100644 (file)
@@ -325,14 +325,6 @@ Mensural_ligature_engraver::transform_heads (Array<Grob_info> primitives)
   // TODO: if (state == STATE_ERROR) { ... }
 }
 
-void set_delta_pitch (Item *primitive, Grob_info info1, Grob_info info2)
-{
-  Pitch pitch1 = *unsmob_pitch (info1.music_cause ()->get_mus_property ("pitch"));
-  Pitch pitch2 = *unsmob_pitch (info2.music_cause ()->get_mus_property ("pitch"));
-  int delta_pitch = (pitch2.steps () - pitch1.steps ());
-  primitive->set_grob_property ("delta-pitch", gh_int2scm (delta_pitch));
-}
-
 /*
  * A MensuralLigature grob consists of a bunch of NoteHead grobs that
  * are glued together.  It (a) does not make sense to change
@@ -390,8 +382,6 @@ Mensural_ligature_engraver::propagate_properties (Spanner *ligature,
                                        gh_double2scm (half_flexa_width));
          primitive->set_grob_property ("flexa-width",
                                        gh_double2scm (flexa_width));
-         set_delta_pitch (primitive,
-                          primitives[i], primitives[i+1]);
          break;
        default:
          programming_error (_f ("unexpected case fall-through"));
index f62e3c29ca84c37af933361e216c4eb6786c25cb..77e48816221278c394e6fbaaf1fec526151ebd09 100644 (file)
@@ -28,38 +28,38 @@ brew_flexa (Grob *me,
            bool solid,
            Real width,
            Real thickness,
-           bool add_stem,
-           Direction stem_direction)
+           bool add_cauda,
+           Direction cauda_direction)
 {
   Real staff_space = Staff_symbol_referencer::staff_space (me);
   Real height = 0.6 * staff_space;
   Molecule molecule = Molecule ();
 
-  if (add_stem)
+  if (add_cauda)
     {
       bool consider_interval =
-       stem_direction * interval > 0.0;
+       cauda_direction * interval > 0.0;
 
-      Interval stem_box_x (0, thickness);
-      Interval stem_box_y;
+      Interval cauda_box_x (0, thickness);
+      Interval cauda_box_y;
 
       if (consider_interval)
         {
          Real y_length = max (interval/2.0*staff_space, 1.2*staff_space);
-         stem_box_y = Interval (0, y_length);
+         cauda_box_y = Interval (0, y_length);
        }
       else
-       stem_box_y = Interval (0, staff_space);
+       cauda_box_y = Interval (0, staff_space);
 
       Real y_correction =
-       (stem_direction == UP) ?
+       (cauda_direction == UP) ?
        +0.5*height :
-       -0.5*height - stem_box_y.length();
+       -0.5*height - cauda_box_y.length();
 
-      Box stem_box (stem_box_x, stem_box_y);
-      Molecule stem = Lookup::filledbox (stem_box);
-      stem.translate_axis (y_correction, Y_AXIS);
-      molecule.add_molecule(stem);
+      Box cauda_box (cauda_box_x, cauda_box_y);
+      Molecule cauda = Lookup::filledbox (cauda_box);
+      cauda.translate_axis (y_correction, Y_AXIS);
+      molecule.add_molecule (cauda);
     }
 
   Real slope = (interval / 2.0 * staff_space) / width;
@@ -228,10 +228,10 @@ internal_brew_primitive (Grob *me, bool ledger_take_space)
       Interval y_extent = (join_left > 0) ?
        Interval (-join_left * 0.5 * staff_space, 0) :
        Interval (0, -join_left * 0.5 * staff_space);
-      Box stem_box (x_extent, y_extent);
+      Box join_box (x_extent, y_extent);
 
-      Molecule stem = Lookup::round_filled_box (stem_box, blotdiameter);
-      out.add_molecule (stem);
+      Molecule join = Lookup::round_filled_box (join_box, blotdiameter);
+      out.add_molecule (join);
     }
 
   int pos = (int)rint (Staff_symbol_referencer::get_position (me));
index bd7bd8af85fe39b5366f7a52db0d18f4123151c3..9e655406c4a2499e91ca3ab780d5427a64b57f65 100644 (file)
@@ -21,6 +21,7 @@
  * This class implements the notation specific aspects of Vaticana
  * style ligatures for Gregorian chant notation.
  */
+
 class Vaticana_ligature_engraver : public Gregorian_ligature_engraver
 {
 
@@ -29,7 +30,7 @@ private:
                        int context_info);
   Real align_heads (Array<Grob_info> primitives,
                    Real flexa_width,
-                   Real join_thickness);
+                   Real thickness);
 
 public:
   TRANSLATOR_DECLARATIONS(Vaticana_ligature_engraver);
@@ -102,7 +103,7 @@ inline int get_context_info (Item *primitive)
     {
       primitive->programming_error ("Vaticana_ligature:"
                                    "context-info undefined -> "
-                                   "ignoring grob");
+                                   "aborting ligature");
       return -1;
     }
 }
@@ -110,7 +111,7 @@ inline int get_context_info (Item *primitive)
 Real
 Vaticana_ligature_engraver::align_heads (Array<Grob_info> primitives,
                                         Real flexa_width,
-                                        Real join_thickness)
+                                        Real thickness)
 {
   if (!primitives.size ())
     {
@@ -119,8 +120,14 @@ Vaticana_ligature_engraver::align_heads (Array<Grob_info> primitives,
       return 0.0;
     }
 
-  Item *first_primitive = dynamic_cast<Item*> (primitives[0].grob_);
-  Real ligature_width = 0.0;
+  /*
+   * The paper column where we put the whole ligature into.
+   */
+  Paper_column *column =
+    dynamic_cast<Item*> (primitives[0].grob_)->get_column ();
+
+  Real join_thickness =
+    thickness * column->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
 
   /*
    * Amount of extra space two put between some particular
@@ -128,40 +135,21 @@ Vaticana_ligature_engraver::align_heads (Array<Grob_info> primitives,
    *
    * TODO: make this a property of primtive grobs.
    */
-  Real extra_space = 2.0 * join_thickness;
-
-  Item *prev_primitive, *primitive, *next_primitive;
-  int prev_context_info, context_info, next_context_info;
-
-  primitive = 0;
-  context_info = 0;
+  Real extra_space = 4.0 * join_thickness;
 
-  next_primitive = first_primitive;
-  if ((next_context_info = get_context_info (next_primitive)) < 0)
-    {
-      return 0.0;
-    }
+  /*
+   * Keep track of the total width of the ligature.
+   */
+  Real ligature_width = 0.0;
 
+  Item *prev_primitive = 0;
   for (int i = 0; i < primitives.size (); i++)
     {
-      prev_primitive = primitive;
-      prev_context_info = context_info;
-      context_info = next_context_info;
-      primitive = next_primitive;
+      Item *primitive = dynamic_cast<Item*> (primitives[i].grob_);
+      int context_info;
 
-      if (i+1 < primitives.size ())
-       {
-         next_primitive = dynamic_cast<Item*> (primitives[i+1].grob_);
-         if ((next_context_info = get_context_info (next_primitive)) < 0)
-           {
-             break;
-           }
-       }
-      else
-       {
-         next_primitive = 0;
-         next_context_info = 0;
-       }
+      if ((context_info = get_context_info (primitive)) < 0)
+       break; // programming error
 
       /*
        * Get glyph_name, delta_pitch and context_info for this head.
@@ -177,18 +165,21 @@ Vaticana_ligature_engraver::align_heads (Array<Grob_info> primitives,
        }
       String glyph_name = ly_scm2string (glyph_name_scm);
 
-      int delta_pitch;
-      SCM delta_pitch_scm = primitive->get_grob_property ("delta-pitch");
-      if (delta_pitch_scm != SCM_EOL)
+      int delta_pitch = 0;
+      if (prev_primitive) /* urgh, need prev_primitive only here */
        {
-         delta_pitch = gh_scm2int (delta_pitch_scm);
-       }
-      else
-       {
-         primitive->programming_error ("Vaticana_ligature:"
-                                       "delta-pitch undefined -> "
-                                       "ignoring grob");
-         continue;
+         SCM delta_pitch_scm = prev_primitive->get_grob_property ("delta-pitch");
+         if (delta_pitch_scm != SCM_EOL)
+           {
+             delta_pitch = gh_scm2int (delta_pitch_scm);
+           }
+         else
+           {
+             primitive->programming_error ("Vaticana_ligature:"
+                                           "delta-pitch undefined -> "
+                                           "ignoring grob");
+             continue;
+           }
        }
 
       /*
@@ -222,8 +213,12 @@ Vaticana_ligature_engraver::align_heads (Array<Grob_info> primitives,
          head_width = 0.5 * flexa_width;
          x_offset = 0.0;
        }
-      else // retrieve width from corresponding font
+      else
        {
+         /*
+          * This is a regular head, placed right to the previous one.
+          * Retrieve its width from corresponding font.
+          */
          head_width =
            Font_interface::get_default_font (primitive)->
            find_by_name ("noteheads-" + glyph_name).extent (X_AXIS).length ();
@@ -245,13 +240,22 @@ Vaticana_ligature_engraver::align_heads (Array<Grob_info> primitives,
          ((context_info & FLEXA_RIGHT) &&
           !(context_info & PES_LOWER)))
        {
-         primitive->set_grob_property ("join-left", gh_bool2scm(true));
-
-         /*
-          * Create a small overlap of adjacent heads so that the join
-          * can be drawn perfectly between them.
-          */
-         ligature_width -= join_thickness;
+         if (!prev_primitive)
+           {
+             primitive->programming_error ("vaticana ligature: add-join: "
+                                           "missing previous primitive");
+           }
+         else
+           {
+             prev_primitive->set_grob_property ("add-join",
+                                                gh_bool2scm(true));
+
+             /*
+              * Create a small overlap of adjacent heads so that the join
+              * can be drawn perfectly between them.
+              */
+             ligature_width -= join_thickness;
+           }
        }
       else if (!String::compare (glyph_name, ""))
        {
@@ -276,8 +280,7 @@ Vaticana_ligature_engraver::align_heads (Array<Grob_info> primitives,
           */
          ligature_width += extra_space;
        }
-      else if ((context_info & FLEXA_LEFT) &&
-              !(prev_context_info & PES_LOWER))
+      else if ((context_info & FLEXA_LEFT) && !(context_info & PES_UPPER))
        {
          /*
           * Before a flexa (but not within a torculus), make a an
@@ -299,10 +302,11 @@ Vaticana_ligature_engraver::align_heads (Array<Grob_info> primitives,
       /*
        * Horizontally line-up this head to form a ligature.
        */
-      get_set_column (primitive, first_primitive->get_column ());
+      get_set_column (primitive, column);
       primitive->translate_axis (ligature_width, X_AXIS);
       ligature_width += head_width;
 
+      prev_primitive = primitive;
     }
 
   /*
@@ -333,41 +337,39 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
        2.0 * Staff_symbol_referencer::staff_space (ligature);
     }
 
-  Real join_thickness;
-  SCM join_thickness_scm = ligature->get_grob_property ("thickness");
-  if (join_thickness_scm != SCM_EOL)
+  Real thickness;
+  SCM thickness_scm = ligature->get_grob_property ("thickness");
+  if (thickness_scm != SCM_EOL)
     {
-      join_thickness = gh_scm2double (join_thickness_scm);
+      thickness = gh_scm2double (thickness_scm);
     }
   else
     {
       ligature->programming_error ("Vaticana_ligature_engraver:"
-                                  "thickness undefined; "
-                                  "assuming 1.4 linethickness");
-      join_thickness = 1.4;
+                                  "thickness undefined; assuming 1.0");
+      thickness = 1.0;
     }
-  join_thickness *= ligature->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
 
   Item *prev_primitive = 0;
   int prev_prefix_set = 0;
   int prev_context_info = 0;
-  int prev_pitch = 0;
+  int prev_delta_pitch = 0;
   String prev_glyph_name = "";
   for (int i = 0; i < primitives.size(); i++) {
     Item *primitive = dynamic_cast<Item*> (primitives[i].grob_);
-    Music *music_cause = primitives[i].music_cause ();
 
-    /* compute interval between previous and current primitive */
-    int pitch =
-      unsmob_pitch (music_cause->get_mus_property ("pitch"))->steps ();
     int delta_pitch;
-    if (i == 0)
+    SCM delta_pitch_scm = primitive->get_grob_property ("delta-pitch");
+    if (delta_pitch_scm != SCM_EOL)
       {
-       delta_pitch = 0;
+       delta_pitch = gh_scm2int (delta_pitch_scm);
       }
     else
       {
-       delta_pitch = pitch - prev_pitch;
+       primitive->programming_error ("Vaticana_ligature:"
+                                     "delta-pitch undefined -> "
+                                     "ignoring grob");
+       continue;
       }
 
     /* retrieve & complete prefix_set and context_info */
@@ -390,7 +392,10 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
      */
     String glyph_name;
     if (prefix_set & VIRGA)
-      glyph_name = "vaticana_virga";
+      {
+       glyph_name = "vaticana_punctum";
+       primitive->set_grob_property ("add-stem", gh_bool2scm(true));
+      }
     else if (prefix_set & QUILISMA)
       glyph_name = "vaticana_quilisma";
     else if (prefix_set & ORISCUS)
@@ -412,28 +417,46 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
          // initio debilis
          glyph_name = "vaticana_reverse_plica";
        }
-      else if (delta_pitch > 0)
+      else if (prev_delta_pitch > 0)
        {
          // epiphonus
          if (!(prev_context_info & FLEXA_RIGHT))
-           {
+           /* correct head of previous primitive */
+           if (prev_delta_pitch > 1)
              prev_glyph_name = "vaticana_epiphonus";
-           }
+           else
+             prev_glyph_name = "vaticana_vepiphonus";
          glyph_name = "vaticana_plica";
        }
-      else // (delta_pitch <= 0)
+      else // (prev_delta_pitch <= 0)
        {
          // cephalicus
          if (!(prev_context_info & FLEXA_RIGHT))
+           /* correct head of previous primitive */
            {
              if (i > 1)
                {
+                 /* cephalicus head with fixed size cauda */
                  prev_glyph_name = "vaticana_inner_cephalicus";
                }
              else
                {
+                 /* cephalicus head without cauda */
                  prev_glyph_name = "vaticana_cephalicus";
                }
+
+             /*
+              * Flexa has no variable size cauda if its left head is
+              * stacked on the right head.  This is true for
+              * cephalicus.  Hence, remove the cauda.
+              *
+              * Urgh: for the current implementation, this rule only
+              * applies for cephalicus; but it is a fundamental rule.
+              * Therefore, the following line of code should be
+              * placed somewhere else.
+              */
+             prev_primitive->set_grob_property ("add-cauda",
+                                                gh_bool2scm(false));
            }
          glyph_name = "vaticana_reverse_plica";
        }
@@ -449,45 +472,60 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
        glyph_name = "solesmes_auct_asc";
       else
        glyph_name = "solesmes_auct_desc";
-    else if ((prefix_set & PES_OR_FLEXA) &&
-            (context_info & PES_LOWER) &&
-            (context_info & FLEXA_RIGHT))
-      glyph_name = ""; // second head of flexa shape
     else if ((context_info & STACKED_HEAD) &&
             (context_info & PES_UPPER))
-      if (delta_pitch > 1)
+      if (prev_delta_pitch > 1)
        glyph_name = "vaticana_upes";
       else
        glyph_name = "vaticana_vupes";
-    else if ((context_info & FLEXA_LEFT) &&
-            !(prefix_set && PES_OR_FLEXA))
-      glyph_name = "vaticana_rvirga";
     else
       glyph_name = "vaticana_punctum";
 
     /*
-     * If the head for the current primitive represents the right head
-     * of a flexa or the upper head of a pes, then this may affect the
-     * shape of the previous head.
+     * This head needs a cauda, if it starts a flexa, is not the upper
+     * head of a pes, and if it is a punctum.
+     */
+    if ((context_info & FLEXA_LEFT) && !(context_info & PES_UPPER))
+      if (!String::compare (glyph_name, "vaticana_punctum"))
+       primitive->set_grob_property ("add-cauda", gh_bool2scm(true));
+
+    /*
+     * Execptional rule for porrectus:
+     *
+     * If the current head is preceded by a \flexa and succeded by a
+     * \pes (e.g. "a \flexa g \pes a"), then join the current head and
+     * the previous head into a single curved flexa shape.
+     */
+    if ((context_info & FLEXA_RIGHT) && (context_info & PES_LOWER))
+      {
+       glyph_name = "";
+       prev_glyph_name = "flexa";
+       prev_primitive->set_grob_property ("flexa-height",
+                                          gh_int2scm (prev_delta_pitch));
+       prev_primitive->set_grob_property ("flexa-width",
+                                          gh_double2scm (flexa_width));
+       bool add_cauda = !(prev_prefix_set && PES_OR_FLEXA);
+       prev_primitive->set_grob_property ("add-cauda",
+                                          gh_bool2scm (add_cauda));
+      }
+
+    /*
+     * Exceptional rule for pes:
+     *
+     * If this head is stacked on the previous one due to a \pes, then
+     * set the glyph of the previous head to that for this special
+     * case, thereby avoiding potential vertical collision with the
+     * current head.
      */
     if (prefix_set & PES_OR_FLEXA)
       {
-       if ((context_info & FLEXA_RIGHT) && (context_info & PES_LOWER))
-         {
-           // join the two flexa heads into a single curved flexa shape
-           prev_glyph_name = "flexa";
-           prev_primitive->set_grob_property ("flexa-height",
-                                              gh_int2scm (delta_pitch));
-           prev_primitive->set_grob_property ("flexa-width",
-                                              gh_double2scm (flexa_width));
-           bool add_stem = !(prev_prefix_set && PES_OR_FLEXA);
-           prev_primitive->set_grob_property ("add-stem",
-                                              gh_bool2scm (add_stem));
-         }
        if ((context_info & PES_UPPER) && (context_info & STACKED_HEAD))
          {
            if (!String::compare (prev_glyph_name, "vaticana_punctum"))
-             prev_glyph_name = "vaticana_lpes";
+             if (prev_delta_pitch > 1)
+               prev_glyph_name = "vaticana_lpes";
+             else
+               prev_glyph_name = "vaticana_vlpes";
          }
       }
 
@@ -495,21 +533,18 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
       prev_primitive->set_grob_property ("glyph-name",
                                         scm_makfrom0str (prev_glyph_name.to_str0 ()));
 
-    primitive->set_grob_property ("delta-pitch",
-                                 gh_int2scm (delta_pitch));
-
     /*
-     * In the backend, flexa shapes and joins need to know about
+     * In the backend, flexa shapes and joins need to know about line
      * thickness.  Hence, for simplicity, let's distribute the
      * ligature grob's value for thickness to each ligature head (even
      * if not all of them need to know).
      */
-    primitive->set_grob_property ("thickness", gh_double2scm (join_thickness));
+    primitive->set_grob_property ("thickness", gh_double2scm (thickness));
 
     prev_primitive = primitive;
     prev_prefix_set = prefix_set;
     prev_context_info = context_info;
-    prev_pitch = pitch;
+    prev_delta_pitch = delta_pitch;
     prev_glyph_name = glyph_name;
   }
 
@@ -520,7 +555,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
   Real ligature_width =
 #endif
 
-  align_heads (primitives, flexa_width, join_thickness);
+  align_heads (primitives, flexa_width, thickness);
 
 #if 0 // experimental code to collapse spacing after ligature
   /* TODO: set to max(old/new spacing-increment), since other
index c58ca37c8b3a70df497469d87e8856ccc6f53e83..d4b3b66089c70ee12234c7fbf4a00bf7d4338410 100644 (file)
 #include "bezier.hh"
 #include "warn.hh"
 
+Molecule
+vaticana_brew_cauda (Grob *me,
+                    int pos,
+                    int delta_pitch,
+                    Real thickness,
+                    Real blotdiameter)
+{
+  bool on_staffline = Staff_symbol_referencer::on_staffline (me, pos);
+  int interspaces = Staff_symbol_referencer::line_count (me)-1;
+  bool above_staff = pos > interspaces;
+
+  if (delta_pitch > -1)
+    {
+      me->programming_error ("flexa cauda: invalid delta_pitch; assuming -1");
+      delta_pitch = -1;
+    }
+  Real length;
+  if (on_staffline)
+    {
+      if (delta_pitch >= -1)
+       length = 1.30;
+      else if (delta_pitch >= -2)
+       length = 1.35;
+      else
+       length = 1.85;
+    }
+  else
+    {
+      if (delta_pitch >= -1)
+       if (above_staff)
+         length = 1.30;
+       else
+         length = 1.00;
+      else if (delta_pitch >= -2)
+       length = 1.35;
+      else if (delta_pitch >= -3)
+       length = 1.50;
+      else
+       length = 1.85;
+    }
+  Box cauda_box (Interval (0, thickness), Interval (-length, 0));
+  return Lookup::round_filled_box (cauda_box, blotdiameter);
+}
+
 /*
  * TODO: move this function to class Lookup?
  */
 Molecule
 vaticana_brew_flexa (Grob *me,
                     bool solid,
-                    Real thickness,
-                    Direction stem_direction)
+                    Real line_thickness)
 {
   Real staff_space = Staff_symbol_referencer::staff_space (me);
   Molecule molecule = Molecule ();
@@ -62,50 +105,25 @@ vaticana_brew_flexa (Grob *me,
       width = 2.0 * staff_space;
     }
 
-  bool add_stem = to_boolean (me->get_grob_property ("add-stem"));
-
-  // Compensate thickness that appears to be smaller in steep section
-  // of bend.
+  /*
+   * Compensate curve thickness that appears to be smaller in steep
+   * section of bend.
+   */
   Real left_height =
     right_height +
     min (0.12 * abs(interval), 0.3) * staff_space;
 
-  if (add_stem)
-    {
-      bool consider_interval =
-       stem_direction * interval > 0.0;
-
-      Interval stem_box_x (0, thickness);
-      Interval stem_box_y;
-
-      if (consider_interval)
-       {
-         Real y_length = max (abs(interval)/2.0*staff_space +
-                              (right_height-left_height),
-                              1.2*staff_space);
-         stem_box_y = Interval (0, y_length);
-       }
-      else
-       stem_box_y = Interval (0, staff_space);
-
-      Real y_correction =
-       (stem_direction == UP) ?
-       +0.5*left_height :
-       -0.5*left_height - stem_box_y.length();
-
-      Box stem_box (stem_box_x, stem_box_y);
-      Molecule stem = Lookup::filledbox (stem_box);
-      stem.translate_axis (y_correction, Y_AXIS);
-      molecule.add_molecule(stem);
-    }
-
-  // Compensate optical illusion regarding vertical position of left
-  // and right endings due to curved shape.
+  /*
+   * Compensate optical illusion regarding vertical position of left
+   * and right endings due to curved shape.
+   */
   Real ypos_correction = -0.1*staff_space * sign(interval);
   Real interval_correction = 0.2*staff_space * sign(interval);
   Real corrected_interval = interval*staff_space + interval_correction;
 
-  // middle curve of flexa shape
+  /*
+   * middle curve of flexa shape
+   */
   Bezier curve;
   curve.control_[0] = Offset (0.00 * width, 0.0);
   curve.control_[1] = Offset (0.33 * width, corrected_interval / 2.0);
@@ -115,9 +133,9 @@ vaticana_brew_flexa (Grob *me,
   Bezier top_curve = curve, bottom_curve = curve;
   for (int i = 0; i < 4; i++)
     {
-      Real thickness = 0.33 * ((3 - i)*left_height + i*right_height);
-      top_curve.control_[i] += Offset (0, +0.5*thickness);
-      bottom_curve.control_[i] += Offset (0, -0.5*thickness);
+      Real curve_thickness = 0.33 * ((3 - i)*left_height + i*right_height);
+      top_curve.control_[i] += Offset (0, 0.5 * curve_thickness);
+      bottom_curve.control_[i] -= Offset (0, 0.5 * curve_thickness);
     }
 
   if (solid)
@@ -129,29 +147,31 @@ vaticana_brew_flexa (Grob *me,
   else // outline
     {
       Bezier inner_top_curve = top_curve;
-      inner_top_curve.translate (Offset (0.0, -thickness));
+      inner_top_curve.translate (Offset (0.0, -line_thickness));
       Molecule top_edge =
        Lookup::bezier_sandwich (top_curve, inner_top_curve);
       molecule.add_molecule(top_edge);
 
       Bezier inner_bottom_curve = bottom_curve;
-      inner_bottom_curve.translate (Offset (0.0, +thickness));
+      inner_bottom_curve.translate (Offset (0.0, +line_thickness));
       Molecule bottom_edge =
        Lookup::bezier_sandwich (bottom_curve, inner_bottom_curve);
       molecule.add_molecule(bottom_edge);
 
-      // TODO: Use horizontal slope with proper slope value rather
-      // than filled box for left edge, since the filled box stands
-      // out from the flexa shape if the interval is big and the line
-      // thickness small.  The difficulty here is to compute a proper
-      // slope value, as it should roughly be equal with the slope of
-      // the left end of the bezier curve.
-      Box left_edge_box (Interval (0, thickness),
+      /*
+       * TODO: Use horizontal slope with proper slope value rather
+       * than filled box for left edge, since the filled box stands
+       * out from the flexa shape if the interval is big and the line
+       * thickness small.  The difficulty here is to compute a proper
+       * slope value, as it should roughly be equal with the slope of
+       * the left end of the bezier curve.
+       */
+      Box left_edge_box (Interval (0, line_thickness),
                         Interval (-0.5*left_height, +0.5*left_height));
       Molecule left_edge = Lookup::filledbox (left_edge_box);
       molecule.add_molecule(left_edge);
 
-      Box right_edge_box (Interval (-thickness, 0),
+      Box right_edge_box (Interval (-line_thickness, 0),
                          Interval (-0.5*right_height, +0.5*right_height));
       Molecule right_edge = Lookup::filledbox (right_edge_box);
       right_edge.translate_axis (width, X_AXIS);
@@ -162,6 +182,25 @@ vaticana_brew_flexa (Grob *me,
   return molecule;
 }
 
+Molecule
+vaticana_brew_join (Grob *me, int delta_pitch,
+                   Real join_thickness, Real blotdiameter)
+{
+  Real staff_space = Staff_symbol_referencer::staff_space (me);
+  if (!delta_pitch)
+    {
+      me->programming_error (_f ("Vaticana_ligature: "
+                                "zero join (delta_pitch == 0)"));
+      return Molecule ();
+    }
+  Interval x_extent = Interval (0, join_thickness);
+  Interval y_extent = (delta_pitch > 0) ?
+    Interval (0, delta_pitch * 0.5 * staff_space) : // ascending join
+    Interval (delta_pitch * 0.5 * staff_space, 0); // descending join
+  Box join_box (x_extent, y_extent);
+  return Lookup::round_filled_box (join_box, blotdiameter);
+}
+
 void
 vaticana_add_ledger_lines (Grob *me, Molecule *out, int pos, Real offs,
                           bool ledger_take_space)
@@ -196,18 +235,10 @@ vaticana_brew_primitive (Grob *me, bool ledger_take_space)
     }
 
   String glyph_name = ly_scm2string (glyph_name_scm);
-  if (!String::compare (glyph_name, ""))
-    {
-      // empty head (typically, this is the right side of flexa shape,
-      // which is already typeset by the associated left side head);
-      // nothing left to do
-      return Molecule ();
-    }
 
   Molecule out;
   int flexa_height = 0;
-  Real thickness = 0.0;
-  Real staff_space = Staff_symbol_referencer::staff_space (me);
+  Real thickness;
 
   SCM thickness_scm = me->get_grob_property ("thickness");
   if (thickness_scm != SCM_EOL)
@@ -216,12 +247,26 @@ vaticana_brew_primitive (Grob *me, bool ledger_take_space)
     }
   else
     {
-      programming_error (_f ("Vaticana_ligature:"
-                            "thickness undefined; assuming 1.4",
-                            me));
-      thickness = 1.4 * me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
+      me->programming_error ("Vaticana_ligature: "
+                            "thickness undefined; assuming 1.0");
+      thickness = 1.0;
     }
 
+  Real line_thickness =
+    thickness * me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
+
+  Real blotdiameter =
+    (me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter")));
+
+  int pos = (int)rint (Staff_symbol_referencer::get_position (me));
+
+  SCM delta_pitch_scm = me->get_grob_property ("delta-pitch");
+  int delta_pitch;
+  if (delta_pitch_scm != SCM_EOL)
+    delta_pitch = gh_scm2int (delta_pitch_scm);
+  else
+    delta_pitch = 0;
+
   Real x_offset = 0.0;
   SCM x_offset_scm = me->get_grob_property ("x-offset");
   if (x_offset_scm != SCM_EOL)
@@ -235,51 +280,79 @@ vaticana_brew_primitive (Grob *me, bool ledger_take_space)
                             me));
     }
 
-  if (!String::compare (glyph_name, "flexa"))
+  bool add_stem = to_boolean (me->get_grob_property ("add-stem"));
+  bool add_cauda = to_boolean (me->get_grob_property ("add-cauda"));
+  bool add_join = to_boolean (me->get_grob_property ("add-join"));
+
+  if (!String::compare (glyph_name, ""))
     {
-      out = vaticana_brew_flexa (me, true, thickness, DOWN);
+      /*
+       * This is an empty head.  This typically applies for the right
+       * side of a curved flexa shape, which is already typeset by the
+       * associated left side head.  The only possible thing left to
+       * do is to draw a vertical join to the next head.  (Urgh: need
+       * flexa_width.)
+       */
+      Real staff_space = Staff_symbol_referencer::staff_space (me);
+      Real flexa_width;
+      SCM flexa_width_scm = me->get_grob_property ("flexa-width");
+      if (flexa_width_scm != SCM_EOL)
+       {
+         flexa_width = gh_scm2double (flexa_width_scm);
+       }
+      else
+       {
+         me->warning ("Vaticana_ligature:"
+                      "flexa-width undefined; assuming 2.0");
+         flexa_width = 2.0 * staff_space;
+       }
+      out =
+       Lookup::blank (Box (Interval (0, 0.5*flexa_width), Interval (0,0)));
+    }
+  else if (!String::compare (glyph_name, "flexa"))
+    {
+      out = vaticana_brew_flexa (me, true, line_thickness);
     }
   else
     {
-      Molecule mol =
+      out =
        Font_interface::get_default_font (me)->
        find_by_name ("noteheads-" + glyph_name);
-      mol.translate_axis (x_offset, X_AXIS);
-      out.add_molecule (mol);
     }
+  out.translate_axis (x_offset, X_AXIS);
+  Real head_width = out.extent (X_AXIS).length ();
 
-  if (to_boolean (me->get_grob_property ("join-left")))
+  if (add_cauda)
     {
-      SCM delta_pitch_scm = me->get_grob_property ("delta-pitch");
-      if (delta_pitch_scm != SCM_EOL)
-       {
-         int delta_pitch = gh_scm2int (delta_pitch_scm);
-         if (!delta_pitch)
-           programming_error (_f ("Vaticana_ligature: (delta_pitch == 0)"));
-         Real blotdiameter = (me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter")));
-         Interval x_extent = Interval (0, thickness);
-         Interval y_extent = (delta_pitch > 0) ?
-           Interval (-delta_pitch * 0.5 * staff_space, 0) : // ascending join
-           Interval (0, -delta_pitch * 0.5 * staff_space); // descending join
-         Box stem_box (x_extent, y_extent);
-
-         Molecule stem = Lookup::round_filled_box (stem_box, blotdiameter);
-         out.add_molecule (stem);
-       }
-      else
-       {
-         programming_error (_f ("Vaticana_ligature:"
-                                "delta-pitch -> ignoring join",
-                                me));
-       }
+      Molecule cauda =
+       vaticana_brew_cauda (me, pos, delta_pitch,
+                            line_thickness, blotdiameter);
+      out.add_molecule (cauda);
+    }
+
+  if (add_stem)
+    {
+      Molecule stem =
+       vaticana_brew_cauda (me, pos, -1,
+                            line_thickness, blotdiameter);
+      stem.translate_axis (head_width - line_thickness, X_AXIS);
+      out.add_molecule (stem);
+    }
+
+  if (add_join)
+    {
+      Molecule join =
+       vaticana_brew_join (me, delta_pitch, line_thickness, blotdiameter);
+      join.translate_axis (head_width - line_thickness, X_AXIS);
+      out.add_molecule (join);
     }
 
-  int pos = (int)rint (Staff_symbol_referencer::get_position (me));
   vaticana_add_ledger_lines(me, &out, pos, 0, ledger_take_space);
   if (!String::compare (glyph_name, "flexa"))
     {
       pos += flexa_height;
-      vaticana_add_ledger_lines(me, &out, pos, 0.5*flexa_height, ledger_take_space);
+      vaticana_add_ledger_lines(me, &out, pos, 0.5*flexa_height,
+                               ledger_take_space);
     }
 
   return out;
@@ -303,5 +376,6 @@ Vaticana_ligature::brew_molecule (SCM)
 
 ADD_INTERFACE (Vaticana_ligature, "vaticana-ligature-interface",
               "A vaticana style gregorian ligature",
-              "glyph-name flexa-height flexa-width thickness join-left "
-              "delta-pitch add-stem x-offset ligature-primitive-callback");
+              "glyph-name flexa-height flexa-width thickness add-cauda "
+              "add-stem add-join delta-pitch x-offset "
+              "ligature-primitive-callback");
index 3081189ee9b18b52c919d5c5634e07e5dd542297..890cf72f787946e8a2283d1ad90061cf284feb54 100644 (file)
@@ -692,6 +692,7 @@ VaticanaStaffContext = \translator {
   BarLine \set #'transparent = ##t
 
   StaffSymbol \set #'line-count = #4
+  StaffSymbol \set #'thickness = #0.6
 
   % FIXME: unit on StaffSymbol's width should be \linewidth.
   % StaffSymbol \set #'width = #60.0
index f8a7395f396bdfec4c9578099ca28e2d1587abbf..e4645de5e85388648ef61d9597c84f92447ae634 100644 (file)
@@ -29,6 +29,10 @@ quilisma =
   \once \property Voice.NoteHead \override #'quilisma = ##t
 deminutum =
   \once \property Voice.NoteHead \override #'deminutum = ##t
+linea =
+  \once \property Voice.NoteHead \override #'linea = ##t
+cavum =
+  \once \property Voice.NoteHead \override #'cavum = ##t
 
 %
 % declare divisiones shortcuts
index 2c9e3a76236675d06376e39a92833455d6ddc2af..c43859d06417f737581be9703689d1e3b3498d48 100644 (file)
@@ -22,7 +22,7 @@ def draw_vaticana_do_clef(expr exact_center, reduction) =
 
        reduced_il# = staff_space# * reduction;
        
-       set_char_box(0.4reduced_il#, 0.0reduced_il#,
+       set_char_box(0.0reduced_il#, 0.4reduced_il#,
                     0.8reduced_il#, 0.8reduced_il#);
 
        define_pixels(reduced_il);
@@ -32,12 +32,12 @@ def draw_vaticana_do_clef(expr exact_center, reduction) =
        save za, zb, zc, zd, ze, zf;
        pair za, zb, zc, zd, ze, zf;
 
-       za = exact_center + (-0.0reduced_il, -.45reduced_il);
-       zb = exact_center + (-0.2reduced_il, -.50reduced_il);
-       zc = exact_center + (-0.4reduced_il, -.25reduced_il);
-       zd = exact_center + (-0.4reduced_il, +.25reduced_il);
-       ze = exact_center + (-0.2reduced_il, +.50reduced_il);
-       zf = exact_center + (-0.0reduced_il, +.45reduced_il);
+       za = exact_center + (0.4reduced_il, -.45reduced_il);
+       zb = exact_center + (0.2reduced_il, -.50reduced_il);
+       zc = exact_center + (0.0reduced_il, -.25reduced_il);
+       zd = exact_center + (0.0reduced_il, +.25reduced_il);
+       ze = exact_center + (0.2reduced_il, +.50reduced_il);
+       zf = exact_center + (0.4reduced_il, +.45reduced_il);
        draw za .. zb .. zc --  % lower punctum
             zd .. ze .. zf;    % upper punctum
 enddef;
@@ -83,7 +83,7 @@ def draw_vaticana_fa_clef(expr exact_center, reduction) =
        %right-handed puncta as in do clef
        draw_vaticana_do_clef(
                exact_center +
-               (+0.8reduced_il + 1.25stafflinethickness, 0),
+               (+0.4reduced_il + 1.25stafflinethickness, 0),
                reduction);
 
        set_char_box(0.0reduced_il#, 0.8reduced_il# + 1.25stafflinethickness#,
index e3d3a63f1862c772497f623e60890c67c646f13c..84dbec0cbe5efa8767fc98bf14bd1d48e9c14c3b 100644 (file)
@@ -278,7 +278,7 @@ fet_endchar;
 % parameterized punctum
 def punctum_char (expr verbose_name, internal_name, ly_name,
                  left_stem, right_stem, linea, cavum,
-                 straight, auctum, direction_up, excentric, up_shift, mag) =
+                 straight, auctum, direction_up, excentric, up_shift, down_shift, mag) =
 
        fet_beginchar(verbose_name, internal_name, ly_name)
                save b_h, a_w;
@@ -324,6 +324,8 @@ def punctum_char (expr verbose_name, internal_name, ly_name,
                save yoffs;
                if up_shift:
                        yoffs# = 0.08ht#;
+               elseif down_shift:
+                       yoffs# = -0.11ht#;
                else:
                        yoffs# = 0.00ht#;
                fi
@@ -334,9 +336,8 @@ def punctum_char (expr verbose_name, internal_name, ly_name,
                path p;
                save height, yoffs_bt;
                define_pixels (height, yoffs_bt);
-               height# = max (0.5ht# - stafflinethickness#, 0);
-               yoffs_bt# = yoffs# - (height# - stafflinethickness#)/2 -
-                           convexity#;
+               height# = 0.47ht#;
+               yoffs_bt# = yoffs# - 0.5*height# - 0.25*convexity#;
                xpart z1a = xpart z1b;
                xpart z2a = xpart z2b;
                xpart z3a = xpart z3b;
@@ -348,8 +349,8 @@ def punctum_char (expr verbose_name, internal_name, ly_name,
 
                if auctum:
                        z1a = (0.00wd + stafflinethickness/2, yoffs_bt);
-                       z2a = (0.20wd, yoffs_bt + 1.0*convexity);
-                       z3a = (0.40wd - stafflinethickness/2,
+                       z2a = (0.21wd, yoffs_bt + 1.0*convexity);
+                       z3a = (0.42wd - stafflinethickness/2,
                               yoffs_bt + 1.0*excentricity);
                        box_top# = height# + yoffs_bt# +
                                max(0, 1.0*convexity#, 1.0*excentricity#);
@@ -361,7 +362,8 @@ def punctum_char (expr verbose_name, internal_name, ly_name,
                        z1a = (0.00wd + stafflinethickness/2,
                               yoffs_bt - 1.0*convexity);
                        z2a = (0.08wd, yoffs_bt + 1.4*convexity);
-                       z3a = (0.40wd - stafflinethickness/2, yoffs_bt);
+                       z3a = (0.42wd - stafflinethickness/2,
+                              yoffs_bt - 1.0*convexity);
                        box_top# = height# + yoffs_bt# +
                                max(-1.0*convexity#, 1.4*convexity#, 0);
                        box_bt# = yoffs_bt# +
@@ -370,8 +372,8 @@ def punctum_char (expr verbose_name, internal_name, ly_name,
                            z3b .. {left}z2b .. {-direction}z1b -- cycle;
                else:
                        z1a = (0.00wd + stafflinethickness/2, yoffs_bt);
-                       z2a = (0.20wd, yoffs_bt + 1.0*convexity);
-                       z3a = (0.40wd - stafflinethickness/2, yoffs_bt);
+                       z2a = (0.21wd, yoffs_bt + 1.0*convexity);
+                       z3a = (0.42wd - stafflinethickness/2, yoffs_bt);
                        box_top# = height# + yoffs_bt# +
                                max(0, 1.0*convexity#);
                        box_bt# = yoffs_bt# +
@@ -386,49 +388,47 @@ def punctum_char (expr verbose_name, internal_name, ly_name,
                        filldraw p;
                fi;
 
-               pickup pencircle scaled stafflinethickness;
+               pickup pencircle scaled 0.6stafflinethickness;
+
+               save stem_bt;
 
                if left_stem:
-                       z5=(0.00wd + stafflinethickness/2, yoffs);
-                       z6=(0.00wd + stafflinethickness/2, yoffs - 1.5ht);
+                       z5=(0.00wd + 0.6stafflinethickness/2, yoffs);
+                       z6=(0.00wd + 0.6stafflinethickness/2, yoffs - 1.1ht);
                        draw z5 -- z6;
-               fi;
-
-               if right_stem:
-                       z5=(0.40wd - stafflinethickness/2, yoffs);
-                       z6=(0.40wd - stafflinethickness/2, yoffs - 1.5ht);
+                       stem_bt# = yoffs# - 1.1ht#;
+               elseif right_stem:
+                       z5=(0.42wd - 0.6stafflinethickness/2, yoffs);
+                       z6=(0.42wd - 0.6stafflinethickness/2, yoffs - 1.5ht);
                        draw z5 -- z6;
-               fi;
-
-               save stem_bt;
-
-               if left_stem or right_stem:
                        stem_bt# = yoffs# - 1.5ht#;
                else:
                        stem_bt# = 0;
                fi;
 
-               set_char_box(0.00wd#, 0.40wd#,
+               set_char_box(0.00wd#, 0.42wd#,
                             max(0, -box_bt#, -stem_bt#) + stafflinethickness#/2,
                             max(0, box_top#) + stafflinethickness#/2);
 
                if linea:
                        save linea_width, linea_height;
-                       linea_width# = stafflinethickness#;
-                       linea_height# = 0.85 ht#;
+                       linea_width# = 0.6 stafflinethickness#;
+                       linea_height# = 0.7 ht#;
                        define_pixels (linea_width, linea_height);
                        draw_block ((-0.10wd - linea_width/2,
-                                    linea_height/2),
+                                    -linea_height/2),
                                    (-0.10wd + linea_width/2,
-                                    linea_height/2));
-                       draw_block ((+0.50wd - linea_width/2,
-                                    linea_height/2),
-                                   (+0.50wd + linea_width/2,
-                                    linea_height/2));
-                       set_char_box(0.10wd# + linea_width#/2,
-                                    0.50wd# + linea_width#/2,
+                                    +linea_height/2));
+                       draw_block ((+0.52wd - linea_width/2,
+                                    -linea_height/2),
+                                   (+0.52wd + linea_width/2,
+                                    +linea_height/2));
+                       set_char_box(0,
+                                    0.62wd# + linea_width#,
                                     linea_height#/2,
                                     linea_height#/2);
+                       currentpicture := currentpicture
+                               shifted (0.10wd + linea_width/2, 0);
                fi;
        fet_endchar;
 enddef;
@@ -450,25 +450,26 @@ def inclinatum_char(expr verbose_name, internal_name, ly_name,
 
                if stropha:
                        pickup pencircle
-                               xscaled (0.2*head_height)
-                               yscaled (0.5*head_height)
+                               xscaled (0.25*head_height)
+                               yscaled (0.55*head_height)
                                rotated alpha#;
                        save za, off_angle; pair za;
                        off_angle := 15;
                        za = (0, -0.25*head_height)
                                rotated -(alpha# + off_angle)
-                               shifted (0.5 head_width, 0);
+                               shifted (0.48 head_width, -0.02 head_width);
                        undraw za;
                fi;
 
                if auctum:
                        pickup pencircle scaled stafflinethickness;
-                       save za, zb;
-                       pair za, zb;
+                       save za, zb, zc;
+                       pair za, zb, zc;
                        za = (0, -0.5 head_height + stafflinethickness);
-                       zb = za + (0.5 head_width, 0);
-                       draw za{(0,-1) rotated alpha#} ..
-                            {(0,1) rotated -alpha#}zb;
+                       zb = 0.6 (za + zc);
+                       zc = za + (0.52 head_width, 0);
+                       draw za{(0,-1) rotated alpha#} .. {right}zb{right} ..
+                            {(0,1) rotated -alpha#}zc;
                fi;
        fet_endchar;
 enddef;
@@ -476,88 +477,93 @@ enddef;
 % punctum
 punctum_char("Ed. Vat. punctum", "vaticana_punctum", "vatpunctumhead",
             false, false, false, false, false,
-            false, false, false, false, 1.0);
+            false, false, false, false, false, 1.0);
 
 % punctum cavum (for OpusTeX compatibility)
 punctum_char("Ed. Vat. punctum cavum", "vaticana_punctum_cavum",
             "vatpunctumcavumhead",
             false, false, false, true, false,
-            false, false, false, false, 1.0);
+            false, false, false, false, false, 1.0);
 
 % linea punctum (for OpusTeX compatibility)
 punctum_char("Ed. Vat. linea punctum", "vaticana_linea_punctum",
             "vatlineapunctumhead",
             false, false, true, false, false,
-            false, false, false, false, 1.0);
+            false, false, false, false, false, 1.0);
 
 % linea punctum cavum (for OpusTeX compatibility)
 punctum_char("Ed. Vat. linea punctum cavum", "vaticana_linea_punctum_cavum",
             "vatlineapunctumcavumhead",
             false, false, true, true, false,
-            false, false, false, false, 1.0);
+            false, false, false, false, false, 1.0);
 
 % punctum inclinatum
 inclinatum_char("Ed. Vat. inclinatum", "vaticana_inclinatum",
                "vatinclinatumhead",
                false, false, false);
 
-% virga (i.e. right stemmed punctum)
-punctum_char("Ed. Vat. virga", "vaticana_virga", "vatvirgahead",
-            false, true, false, false, false,
-            false, false, false, false, 1.0);
-
-% left stemmed punctum as used in clivis (flexa) ligature
-punctum_char("Ed. Vat. reverse virga", "vaticana_rvirga", "vatrvirgahead",
-            true, false, false, false, false,
-            false, false, false, false, 1.0);
-
 % pes lower punctum
 punctum_char("Ed. Vat. pes lower punctum", "vaticana_lpes", "vatlpeshead",
             false, false, false, false, true,
-            false, true, false, false, 1.0);
+            false, true, false, false, false, 1.0);
+
+% pes lower punctum
+punctum_char("Ed. Vat. pes var lower punctum", "vaticana_vlpes", "vatvlpeshead",
+            false, false, false, false, true,
+            false, true, false, false, true, 1.0);
 
 % pes upper punctum
 punctum_char("Ed. Vat. pes upper punctum", "vaticana_upes", "vatupeshead",
             false, false, false, false, true,
-            false, false, false, false, 1.0);
+            false, false, false, false, false, 1.0);
 
 % pes upper punctum (shifted variation)
 %
-% Note: This note head is used instead of the regular pes upper
-% punctum to avoid collision with the lower punctum note of the pes when
-% the upper punctum sits directly on top of the lower punctum.
+% This note head is used instead of the regular pes upper punctum to
+% avoid collision with the lower punctum note of the pes when the upper
+% punctum sits directly on top of the lower punctum.
 %
 punctum_char("Ed. Vat. var pes upper punctum", "vaticana_vupes",
             "vatvupeshead",
             false, false, false, false, true,
-            false, false, false, true, 1.0);
+            false, false, false, true, false, 1.0);
 
 % small punctum as used in epiphonus
 punctum_char("Ed. Vat. plica", "vaticana_plica", "vatplicahead",
             false, false, false, false, false,
-            false, false, false, false, 0.7);
+            false, false, false, false, false, 0.6);
 
 % excentric punctum as used in epiphonus
 punctum_char("Ed. Vat. epiphonus", "vaticana_epiphonus", "vatepiphonushead",
             false, false, false, false, false,
-            false, true, true, false, 1.0);
+            false, true, true, false, false, 1.0);
+
+% excentric punctum as used in epiphonus (shifted variation)
+%
+% This note head is used instead of the regular epiphonus punctum to
+% avoid collision with the plica head when the plica sits directly on
+% top of the lower head.
+%
+punctum_char("Ed. Vat. var epiphonus", "vaticana_vepiphonus", "vatvepiphonushead",
+            false, false, false, false, false,
+            false, true, true, false, true, 1.0);
 
 % small punctum as used in cephalicus
 punctum_char("Ed. Vat. rev. plica", "vaticana_reverse_plica", "vatrplicahead",
             false, false, false, false, false,
-            false, true, false, false, 0.7);
+            false, true, false, false, false, 0.6);
 
 % excentric punctum as used in cephalicus; without left stem
 punctum_char("Ed. Vat. cephalicus", "vaticana_inner_cephalicus",
             "vatinnercephalicushead",
             false, false, false, false, false,
-            false, false, true, false, 1.0);
+            false, false, true, false, false, 1.0);
 
 % excentric punctum as used in cephalicus; with left stem
 punctum_char("Ed. Vat. cephalicus", "vaticana_cephalicus",
             "vatcephalicushead",
             true, false, false, false, false,
-            false, false, true, false, 1.0);
+            false, false, true, false, false, 1.0);
 
 % quilisma
 fet_beginchar("Ed. Vat. quilisma", "vaticana_quilisma", "vatquilismahead")
@@ -571,20 +577,19 @@ fet_beginchar("Ed. Vat. quilisma", "vaticana_quilisma", "vatquilismahead")
        2beta# = ht#*b_h;
        a# = beta#*a_b;
        wd# = 2a# / a_w;
-       set_char_box(0, 0.40wd#, 0.31 ht#, 0.41 ht#);
+       set_char_box(0, 0.42wd#, 0.28 ht#, 0.36 ht#);
        black_notehead_width# := wd#;
 
        define_pixels(ht, wd);
-       pickup pencircle xscaled stafflinethickness yscaled 0.4ht;
-       lft x1 = 0.00wd; bot y1 = -0.31ht;
-       lft x2 = 0.00wd; y2 = +0.06ht;
-       x3 = 0.10wd;     y3 = -0.05ht;
-       x4 = 0.16wd;     y4 = +0.11ht;
-       x5 = 0.24wd;     y5 = -0.01ht;
-       x6 = 0.30wd;     y6 = +0.15ht;
-       rt x7 = 0.40wd;  y7 = +0.04ht;
-       rt x8 = 0.40wd;  top y8 = +0.41ht;
-       draw z1 -- z2 -- z3 -- z4 -- z5 -- z6 -- z7 -- z8;
+       pickup pencircle xscaled stafflinethickness yscaled 0.44ht;
+       lft x1 = 0.00wd; bot y1 = -0.28ht;
+       x2 = 0.11wd;     y2 = -0.14ht;
+       x3 = 0.12wd;     y3 = +0.03ht;
+       x4 = 0.25wd;     y4 = -0.09ht;
+       x5 = 0.26wd;     y5 = +0.08ht;
+       x6 = 0.40wd;     y6 = -0.04ht;
+       rt x7 = 0.42wd;  top y7 = +0.36ht;
+       draw z1 .. z2 -- z3 .. z4 -- z5 .. z6 -- z7;
 fet_endchar;
 
 % solesmes punctum inclinatum parvum
@@ -596,13 +601,13 @@ inclinatum_char("Solesmes punctum inclinatum parvum", "solesmes_incl_parvum",
 punctum_char("Solesmes punctum auctum ascendens", "solesmes_auct_asc",
             "solauctaschead",
             false, false, false, false, false,
-            true, true, false, false, 1.0);
+            true, true, false, false, false, 1.0);
 
 % solesmes punctum auctum descendens
 punctum_char("Solesmes punctum auctum descendens", "solesmes_auct_desc",
             "solauctdeschead",
             false, false, false, false, false,
-            true, false, false, false, 1.0);
+            true, false, false, false, false, 1.0);
 
 % solesmes punctum inclinatum auctum
 inclinatum_char("Solesmes punctum incl. auctum", "solesmes_incl_auctum",
@@ -679,7 +684,7 @@ def punctum_char (expr verbose_name, internal_name, ly_name,
                        xscaled blot_diameter
                        yscaled 0.50ht;
                z1 = (0.00wd + blot_diameter/2, 0);
-               z2 = (0.40wd - blot_diameter/2, 0);
+               z2 = (0.4wd - blot_diameter/2, 0);
                draw z1 .. z2;
 
                pickup pencircle
index eb4751a11267f867486af6c54514d3697ac0e485..17240cb4981cd2aa6f734fb0cb0acfb6538e1744 100644 (file)
@@ -61,8 +61,8 @@ def mens_timesig (expr verbose_name, internal_name, ly_name,
 
        fet_beginchar(verbose_name, internal_name, ly_name)
                if slashed:
-                       set_char_box(.5 (Cdiameter# + Cthickness#),
-                                    .5 (Cdiameter# + Cthickness#),
+                       set_char_box(0,
+                                    Cdiameter# + Cthickness#,
                                     .75 (Cdiameter# + Cthickness#),
                                     .75 (Cdiameter# + Cthickness#));
                        if (full_circle or dotted):
@@ -71,8 +71,8 @@ def mens_timesig (expr verbose_name, internal_name, ly_name,
                                draw_nail((-Cthickness, -d), (0, h));
                        fi;
                else:
-                       set_char_box(.5 (Cdiameter# + Cthickness#),
-                                    .5 (Cdiameter# + Cthickness#),
+                       set_char_box(0,
+                                    Cdiameter# + Cthickness#,
                                     .5 (Cdiameter# + Cthickness#),
                                     .5 (Cdiameter# + Cthickness#));
                fi;
@@ -88,6 +88,7 @@ def mens_timesig (expr verbose_name, internal_name, ly_name,
                        pickup pencircle scaled 4 stafflinethickness;
                        draw (0,0);
                fi;
+               currentpicture := currentpicture shifted 0.5(Cdiameter + Cthickness, 0);
        fet_endchar;
 enddef;
 
@@ -154,8 +155,8 @@ def neo_mens_timesig (expr verbose_name, internal_name, ly_name,
 
        fet_beginchar(verbose_name, internal_name, ly_name)
                if slashed:
-                       set_char_box(.5 (neo_Cdiameter# + neo_Cthickness#),
-                                    .5 (neo_Cdiameter# + neo_Cthickness#),
+                       set_char_box(0,
+                                    neo_Cdiameter# + neo_Cthickness#,
                                     .5 (neo_Cdiameter# + neo_Cthickness#),
                                     .5 (neo_Cdiameter# + neo_Cthickness#));
                        if (full_circle or dotted):
@@ -164,8 +165,8 @@ def neo_mens_timesig (expr verbose_name, internal_name, ly_name,
                                draw_block((-neo_Cthickness, -d), (0, h));
                        fi;
                else:
-                       set_char_box(.5 (neo_Cdiameter# + neo_Cthickness#),
-                                    .5 (neo_Cdiameter# + neo_Cthickness#),
+                       set_char_box(0,
+                                    neo_Cdiameter# + neo_Cthickness#,
                                     .5 (neo_Cdiameter# + neo_Cthickness#),
                                     .5 (neo_Cdiameter# + neo_Cthickness#));
                fi;
@@ -181,6 +182,7 @@ def neo_mens_timesig (expr verbose_name, internal_name, ly_name,
                        pickup pencircle scaled 4 stafflinethickness;
                        draw (0,0);
                fi;
+               currentpicture := currentpicture shifted 0.5(neo_Cdiameter + neo_Cthickness, 0);
        fet_endchar;
 enddef;
 
index 942ad999c56ec22ed3a126287ccc3da37095bb05..10214e9eafe8e8729003c58758562f9997281654 100644 (file)
@@ -61,7 +61,9 @@ the grob to the nearest open space.
 
 (grob-property-description 'accidental-grobs list? "Alis with (NOTENAME . GROBLIST) entries")
 (grob-property-description 'accidentals list? "List of alteration numbers.")
-(grob-property-description 'add-stem boolean? "does this flexa shape require an additional stem on the left side?.")
+(grob-property-description 'add-cauda boolean? "does this flexa require an additional cauda on the left side?.")
+(grob-property-description 'add-join boolean? "is this ligature head joined with the next one by a vertical line?")
+(grob-property-description 'add-stem boolean? "is this ligature head a virga and therefore needs an additional stem on the right side?")
 (grob-property-description 'adjust-if-on-staffline boolean? "If this grob is on a staff line, adjust its appearance, so that it better fits into the staff.  E.g., if set true on stem grobs, flares of mensural flags will always be aligned with the staff lines, regardless if the associated note head is printed on a staff line or inbetween.")
 (grob-property-description 'after-line-breaking-callback procedure? "Procedure taking a grob as argument.
 This procedure is called (using dependency resolution) after line breaking. Return value is ignored.")
@@ -126,6 +128,7 @@ column as start/begin point. Only columns that have grobs or act as bounds are s
 (grob-property-description 'c0-position integer? "integer indicating the position of central C.")
 (grob-property-description 'cautionary-style symbol? "style  of cautionary accidentals. Choices are 'smaller (one size smaller) or 'parentheses.")
 (grob-property-description 'cautionary boolean? "is this a cautionary accidentals.?")
+(grob-property-description 'cavum boolean? "is this neume outlined?.")
 
 (grob-property-description 'center-element ly:grob? "grob which will
 be at the center of the group after aligning (when using
@@ -290,6 +293,7 @@ space to add. For barline, space after a thick line.")
 multiplicity of flag.  The Nth element of the list gives the stem
 length of a note with N flags.
 ")
+(grob-property-description 'linea boolean? "attach vertical lines to this neume?.")
 (grob-property-description 'line-count integer? "Number of staff
 lines.  If you want to override this for staffs individually, you must
 use @code{\outputproperty}. @code{\property .. \override} will not
@@ -382,7 +386,6 @@ reference point.
 
 TODO: revise typing.")
 (grob-property-description 'self-alignment-Y number? "like self-alignment-X but for Y axis.")
-(grob-property-description 'semivocalis boolean? "is this neume a lisquescending one?.")
 (grob-property-description 'shorten ly:dimension? "the amount of space that a stem should be shortened (DOCME!)")
 (grob-property-description 'shorten-pair number-pair? "the length on each side to shorten a text-spanner, for example a pedal bracket")
 (grob-property-description 'common-shortest-duration ly:moment?
@@ -526,10 +529,13 @@ staff in a row more often, when the heights of the notes vary.
 (grob-property-description 'grace-space-factor number? "space grace at this fraction of the increment.")
 (grob-property-description 'position-callbacks list? "list of
 functions set spanner positions.")
-(grob-property-description 'join-left boolean? "is this ligature head joined with the previous one?")
+
+;;; Junk me, replace it by add-join.
+(grob-property-description 'join-left boolean? "is this ligature head joined with the previous one by a vertical line?")
+
 (grob-property-description 'join-left-amount number? "DOCME")
 
-(grob-property-description 'delta-pitch number? "the interval between this and the neighbouring note, or, more precisely, their vertical distance; this is used in ligatures for calculation of the height of vertical joins flexa shapes")
+(grob-property-description 'delta-pitch number? "the interval between this and the next note, or, more precisely, their vertical distance; this is used in ligatures for calculation of the height of vertical joins flexa shapes")
 (grob-property-description 'head-width ly:dimension? "width of this ligature head")
 (grob-property-description 'primitive integer? "Pointer to a ligature primitive, i.e. an item similar to a note head that is part of a ligature. [TODO: change this]")
 (grob-property-description 'minimum-beam-collision-distance ly:dimension?
index e1ac6d13aa9ba3b140b0465d729abdf64ef28e4f..16fe53fe1bd441a2f3ebf8b31131799466d7d75a 100644 (file)
 
     (VaticanaLigature
      . (
-       (thickness . 1.0)
+       (thickness . 0.6)
        (flexa-width . 2.0)
        (ligature-primitive-callback . ,Vaticana_ligature::brew_ligature_primitive)
        (molecule-callback . ,Vaticana_ligature::brew_molecule)