]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.96.jcn3
authorJan Nieuwenhuizen <janneke@gnu.org>
Tue, 17 Oct 2000 22:42:23 +0000 (00:42 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Tue, 17 Oct 2000 22:42:23 +0000 (00:42 +0200)
1.3.96.jcn3
===========

* Fixed (added actually, it got lost?) word-space for chords.

CHANGES
VERSION
input/test/american-chords.ly
input/test/chord-names.ly
input/test/chords.ly
input/test/jazz-chords.ly
lily/chord-name.cc

diff --git a/CHANGES b/CHANGES
index 3a94fe33578b8eb4f715daa0a753aa74fe9904ec..e96d44c89e0e1b0e68a61c3289339bb1a98f1180 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+1.3.96.jcn3
+===========
+
+* Fixed (added actually, it got lost?) word-space for chords.
+
 1.3.96.jcn1
 ===========
 
diff --git a/VERSION b/VERSION
index 66268331391c5a67c2b5209078759fd6ab85e58d..a09a984736b979782a26c97865df1becd59138b1 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=96
-MY_PATCH_LEVEL=jcn2
+MY_PATCH_LEVEL=jcn3
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index bb344b2256b6d37de0b7ea8856d55616d4349913..91f6238088356df48e285a1fa2e18eeb31e50fc2 100644 (file)
@@ -13,7 +13,7 @@
       chord::names-alist-american))
 
 chord = \notes\transpose c''\chords{
-\property ChordNames.chordNameStyle = "american"
+       \property ChordNames.ChordName \push #'style = #"american"
 c
 cs:m
 df:m5-
@@ -46,8 +46,10 @@ c:m7.9
 >
     \paper
     {
-        \translator { \ChordNameContext chordNameWordSpace = #1 }
-        \translator { \LyricsContext textScriptWordSpace = #0.3 }
+               \translator { 
+                       \ChordNameContext
+                       ChordName \push #'word-space = #1 
+               }
     }
 }
 
index 500f98e949e84ff6496531c6bdeceb9b499b06ce..76a0246148c27d8a1be28f28196d3ec079af107a 100644 (file)
@@ -20,8 +20,10 @@ chord = \notes\transpose c''\chords{
     >
     \paper{
        linewidth = -1.0;
-        \translator { \ChordNameContext chordNameWordSpace = #1 }
-        \translator { \LyricsContext textScriptWordSpace = #0.3 }
+               \translator { 
+                       \ChordNameContext
+                       ChordName \push #'word-space = #1 
+               }
     }
 }
 
index 8fc784cb40520c87bba05d4fb436e17cc6c831d8..8a6b07823fa9ec7d68e024fb55f934a8810147c5 100644 (file)
@@ -59,4 +59,10 @@ keys = \notes{
                \context ChordNames \scales
                \context Staff < \scales \keys >
        >
+       \paper{
+               \translator { 
+                       \ChordNameContext
+                       ChordName \push #'word-space = #1 
+               }
+       }
 }
index 2e18444a95d669239cf4928e652313547c11acfd..731a360f1ec3c8b66a47ba02f5b7e06f3a19c67f 100644 (file)
@@ -1,11 +1,11 @@
-%
-% Make sure the correct msamxx.tfm is where lily can find it
-% (ie cwd or lily's tfm dir).
-%
-% For normal (20pt) paper, do
-%
-%   cp locate `msam9.tfm` $LILYPONDPREFIX/tfm
-%
+%% This should only be necessary if your kpathsea setup is broken
+%%
+%% Make sure the correct msamxx.tfm is where lily can find it
+%% (ie cwd or lily's tfm dir).
+%%
+%% For normal (20pt) paper, do
+%%
+%%   cp locate `msam9.tfm` $LILYPONDPREFIX/tfm
 
 #(set! chord::names-alist-american
       (append 
       chord::names-alist-american))
 
 chord = \notes\transpose c''\chords{
-\property ChordNames.chordNameStyle = "american"
-c:m5-.7-
-c:m5-.7
+       \property ChordNames.ChordName \push #'style = #"american"
+       c:m5-.7-
+       c:m5-.7
 }
 
 \score{
-<
-\context ChordNames \chord
-\context Staff \chord
->
+    <
+       \context ChordNames \chord
+       \context Staff \chord
+    >
     \paper
     {
-        \translator { \ChordNameContext chordNameWordSpace = #1 }
-        \translator { \LyricsContext textScriptWordSpace = #0.3 }
+         \translator { 
+               \ChordNameContext
+               ChordName \push #'word-space = #1 
+         }
     }
 }
 
index 19650961e2ae420f7ee2967d483cab8b04a742fc..dff902e2bd4e5757e754d7b4405491b170ad1e19 100644 (file)
@@ -13,6 +13,7 @@
 #include "score-element.hh"
 #include "paper-column.hh"
 #include "line-of-score.hh"
+#include "staff-symbol-referencer.hh"
 
 /*
   TODO: move text lookup out of Chord_name
@@ -169,5 +170,16 @@ Chord_name::brew_molecule (SCM smob)
   SCM func = me->get_elt_property (ly_symbol2scm ("chord-name-function"));
   SCM text = gh_call3 (func, style, pitches, gh_cons (inversion, bass));
 
-  return ly_text2molecule (me, text).create_scheme ();
+  Molecule mol = ly_text2molecule (me, text);
+
+  SCM space =  me->get_elt_property ("word-space");
+  if (gh_number_p (space))
+    {
+      Molecule m;
+      m.set_empty (false);
+      mol.add_at_edge (X_AXIS, RIGHT, m, gh_scm2double (space)*
+                      Staff_symbol_referencer::staff_space (me));
+    }
+
+  return mol.create_scheme ();
 }