]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/text-item.cc (interpret_markup): idem.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 22 Mar 2004 12:20:52 +0000 (12:20 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 22 Mar 2004 12:20:52 +0000 (12:20 +0000)
* scm/define-markup-commands.scm: remove split around-space hack.

* lily/staff-symbol-referencer.cc (get_rounded_position): new
function, fold WL's fixes into one function.

15 files changed:
ChangeLog
VERSION
lily/custos.cc
lily/dot-column.cc
lily/include/staff-symbol-referencer.hh
lily/mensural-ligature.cc
lily/note-column.cc
lily/note-head.cc
lily/paper-def.cc
lily/score.cc
lily/staff-symbol-referencer.cc
lily/stem.cc
lily/text-item.cc
lily/vaticana-ligature.cc
scm/define-markup-commands.scm

index 21c210112fc6e471aac9ce8b24144bf37f64aace..09612884e0e7540991447c3a36e170022fdbe735 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2004-03-22  Han-Wen Nienhuys   <hanwen@xs4all.nl>
+
+       * lily/text-item.cc (interpret_markup): idem.
+
+       * scm/define-markup-commands.scm: remove split around-space hack.
+
+       * lily/staff-symbol-referencer.cc (get_rounded_position): new
+       function, fold WL's fixes into one function.
+
 2004-03-22  Werner Lemberg  <wl@gnu.org>
 
        lily/stem.cc (Stem::extremal_heads, Stem::note_head_positions),
@@ -15,6 +24,8 @@
 
 2004-03-21  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * VERSION: 2.1.33 released.
+
        * scripts/lilypond-book.py (do_file): reinstate --filter support.
 
        * buildscripts/mf-to-table.py (base): use %d for TfmCheckSum
@@ -61,6 +72,8 @@
        * lily/tie-performer.cc (acknowledge_audio_element): bugfix: use
        and init ties_created_
 
+       * VERSION: release 2.1.32
+
        * lily/include/music-iterator.hh (IMPLEMENT_CTOR_CALLBACK): remove
        doc string from IMPLEMENT_CTOR_CALLBACK().
 
diff --git a/VERSION b/VERSION
index 3c7ba8f1b3b7aa366ff6965887f8ba1fdb7ed6b1..e95b04287b82255760006bfa70ff8f607c8ba13c 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,5 +2,5 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=2
 MINOR_VERSION=1
 PATCH_LEVEL=33
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=hwn1
 
index 64f93c2a13f6ba4a3cffdb1929ecd47efb4cc1be..83913b2cda5de44fb815e0010344c004d6cce784 100644 (file)
@@ -54,7 +54,7 @@ Custos::print (SCM smob)
   Direction neutral_direction =
     to_dir (me->get_property ("neutral-direction"));
 
-  int pos = (int)rint (Staff_symbol_referencer::get_position (me));
+  int pos = (int)Staff_symbol_referencer::get_rounded_position (me);
   int sz = Staff_symbol_referencer::line_count (me)-1;
 
   String font_char = "custodes-" + style + "-";
@@ -88,7 +88,7 @@ Custos::print (SCM smob)
   else
     {
       // add ledger lines
-      int pos = (int)rint (Staff_symbol_referencer::get_position (me));
+      int pos = Staff_symbol_referencer::get_rounded_position (me);
       int interspaces = Staff_symbol_referencer::line_count (me)-1;
       if (abs (pos) - interspaces > 1)
        {
index 523e2955f46ea0728e304085615653e99304dac2..2d49465eb9b4df0cd9cad142fded8fd6cc1b1dff 100644 (file)
@@ -272,7 +272,7 @@ Dot_column::do_shifts (Grob*me)
            dp.extremal_head_ = Stem::first_head (stem) == note;
        }
       
-      int p = (int)rint (Staff_symbol_referencer::get_position (dp.dot_));
+      int p = Staff_symbol_referencer::get_rounded_position (dp.dot_);
       dp.pos_= p;
 
       if (dp.extremal_head_)
index b944ae93f7cbe496ac43415aa10d02aaea9c083b..b93516dbe09bbe3907995f478b9d5cfaa9713db7 100644 (file)
@@ -40,6 +40,7 @@ public:
   static int line_count (Grob*);
   static Real get_position (Grob*);
   static Real staff_radius (Grob*);
+  static int get_rounded_position (Grob*me);
 };
 
 int compare_position (Grob *const&,Grob *const&); 
index f7b6927f28bc86ddfab0fa4df39c925dfdea1619..cbd404b32c8fec7f4fa406e628cb849d8e602cf7 100644 (file)
@@ -202,7 +202,7 @@ internal_brew_primitive (Grob *me, bool ledger_take_space)
       out.add_stencil (join);
     }
 
-  int pos = (int)rint (Staff_symbol_referencer::get_position (me));
+  int pos = Staff_symbol_referencer::get_rounded_position (me);
   add_ledger_lines (me, &out, pos, 0, ledger_take_space);
   if (primitive & MLP_FLEXA)
     {
index 123535c75ef897002148397ab865f24a3840c9f9..d9a8ce307827d59bb63cb9a974abaeef157e6201 100644 (file)
@@ -59,7 +59,7 @@ Note_column::head_positions_interval (Grob *me)
     {
       Grob *se = unsmob_grob (ly_car (h));
       
-      int j = (int)rint (Staff_symbol_referencer::get_position (se));
+      int j = Staff_symbol_referencer::get_rounded_position (se);
       iv.unite (Slice (j,j));
     }
   return iv;
index 4b351332272c5862f225c448a21934279083b73e..0ec06d5686e148f4bc18fac4e483afa32b48db5c 100644 (file)
@@ -140,7 +140,7 @@ internal_print (Grob *me, bool with_ledgers)
     }
 
   int interspaces = Staff_symbol_referencer::line_count (me)-1;
-  int pos = (int)rint (Staff_symbol_referencer::get_position (me));
+  int pos = Staff_symbol_referencer::get_rounded_position (me);
   if (with_ledgers && interspaces >= 0
       && abs (pos) - interspaces > 1)
     {
@@ -269,7 +269,7 @@ Note_head::brew_ez_stencil (SCM smob)
   Box bx (Interval (0, 1.0), Interval (-0.5, 0.5));
   Stencil m (bx, at);
 
-  int pos = (int)rint (Staff_symbol_referencer::get_position (me));
+  int pos = Staff_symbol_referencer::get_rounded_position (me);
   int interspaces = Staff_symbol_referencer::line_count (me)-1;
   if (abs (pos) - interspaces > 1)
     {
index 83fb510504da37a281abd5f64f0959f747d3060f..99e371a9999f306c8ef8ffdfbb9e6fca100cd50e 100644 (file)
 
 /*
   This is an almost empty thing. The only substantial thing this class
-  handles, is scaling up and down to real-world dimensions (internally
+  handles is scaling up and down to real-world dimensions (internally
   dimensions are against global staff-space.)
-  
  */
+
 Paper_def::Paper_def ()
 {
 }
index 5e15b722e5484daaf2075b71ae8d67501fa3d0ad..c43822ac2fb9f458a235457e4827b8d3592a4ac6 100644 (file)
@@ -148,8 +148,7 @@ LY_DEFINE (ly_run_translator, "ly:run-translator",
   return scm_gc_unprotect_object (trans->self_scm ());
 }
 
-// FIXME: silly name, score/music is rendered, not the output -- render midi?
-LY_DEFINE (ly_render_output, "ly:render-output",
+LY_DEFINE (ly_format_output, "ly:format-output",
           2, 0, 0, (SCM context, SCM outname),
           "Given a Score context in its final state,"
            "process it and return the (rendered) result.")
@@ -172,7 +171,7 @@ default_rendering (SCM music, SCM outdef, SCM header, SCM outname)
   if (Global_context *g = dynamic_cast<Global_context*>
       (unsmob_context (context)))
     {
-      SCM systems = ly_render_output (context, outname);
+      SCM systems = ly_format_output (context, outname);
       Music_output *output = g->get_output ();
       if (systems != SCM_UNDEFINED)
        {
index ae0586e39f53f05fd94c7c426b656a9160e0fc3f..0a2b4faeec08ba8b4c846dd03126e8610feadb86 100644 (file)
@@ -77,6 +77,11 @@ Staff_symbol_referencer::get_position (Grob *me)
   return robust_scm2double (me->get_property ("staff-position"), p);
 }
 
+int
+Staff_symbol_referencer::get_rounded_position (Grob*me)
+{
+  return int (rint (get_position (me)));
+}
 
 LY_DEFINE (ly_grob_staff_position, "ly:grob-staff-position",
           1, 0,0, (SCM sg),
@@ -163,3 +168,4 @@ ADD_INTERFACE (Staff_symbol_referencer,"staff-symbol-referencer-interface",
               "in their @code{Y-offset-callbacks}. "
               ,
               "staff-position");
+
index 3562170668e7286fcafe2127ebe26a1305e80b84..be9c8a265be0562c90985e0333d6d067a6964f1d 100644 (file)
@@ -194,7 +194,7 @@ Stem::extremal_heads (Grob*me)
       Grob * n = unsmob_grob (ly_car (s));
 
       
-      int p = (int)rint (Staff_symbol_referencer::get_position (n));
+      int p = Staff_symbol_referencer::get_rounded_position (n);
 
       Direction d = LEFT;
       do {
@@ -225,7 +225,7 @@ Stem::note_head_positions (Grob *me)
   for (SCM s = me->get_property ("note-heads"); gh_pair_p (s); s = ly_cdr (s))
     {
       Grob * n = unsmob_grob (ly_car (s));
-      int p = (int)rint (Staff_symbol_referencer::get_position (n));
+      int p = Staff_symbol_referencer::get_rounded_position (n);
 
       ps.push (p);
     }
@@ -624,7 +624,7 @@ Stem::flag (Grob*me)
            
            --hwn.
          */
-         int p = (int)rint (Staff_symbol_referencer::get_position (first_head (me)));
+         int p = Staff_symbol_referencer::get_rounded_position (me);
          staffline_offs = Staff_symbol_referencer::on_staffline (me, p) ?
            "1" : "0";
        }
index b327e78865c6b7d09a90fc0ebc08ba599be5c3f7..63ed2334fde7c1e48f31b9307191765c52d59603 100644 (file)
@@ -22,14 +22,7 @@ Text_item::interpret_markup (SCM paper, SCM props, SCM markup)
   if (gh_string_p (markup))
     {
       String str = ly_scm2string (markup);
-      if (str.index_any (" \t\n\r") != -1)
-       {
-         /* Multi word string to line markup.  */
-         SCM proc= ly_scheme_function ("make-simple-markup");
-         return interpret_markup (paper, props, scm_call_1 (proc, markup));
-       }
-
-      /* Simple word.  */
+      
       Paper_def *pap = unsmob_paper (paper);
       Font_metric *fm = select_font (pap, props);
       SCM lst = scm_list_n (ly_symbol2scm ("text"), markup, SCM_UNDEFINED);
index 8d2d941b87a38f812969d74a4213872db0801110..169be2404ae27c36a2ce1a4927731b59f6b10c46 100644 (file)
@@ -235,7 +235,7 @@ vaticana_brew_primitive (Grob *me, bool ledger_take_space)
   Real blotdiameter =
     (me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter")));
 
-  int pos = (int)rint (Staff_symbol_referencer::get_position (me));
+  int pos = Staff_symbol_referencer::get_rounded_position (me);
 
   SCM delta_pitch_scm = me->get_property ("delta-pitch");
   int delta_pitch;
index 39b56affab4825a649fc9f09e11bb818ad0dc75c..e504cef998ed9d14e6edc06d570781937086f966 100644 (file)
   "A simple text-string; @code{\\markup @{ foo @}} is equivalent with
 @code{\\markup @{ \\simple #\"foo\" @}}."
     (interpret-markup paper props
-                     (make-line-markup
-                      (map make-word-markup (string-tokenize str)))))
+                     (make-word-markup str)))
+
+; todo: use font recoding.
+;                    (make-line-markup
+;                     (map make-word-markup (string-tokenize str)))))
 
 (define-public empty-markup
   (make-simple-markup ""))