]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.4.8.moh1: [PATCH] 1.4 Lyric alignment
authorMark Hindley <mark@hindley.uklinux.net>
Thu, 18 Oct 2001 06:58:38 +0000 (07:58 +0100)
committerMark Hindley <mark@hindley.uklinux.net>
Thu, 18 Oct 2001 06:58:38 +0000 (07:58 +0100)
1.4.8.moh1
==========

* new property "end-alignment" to control non-centered lyric alignment

1.4.8
=====

---
Generated by mark@hindley.uklinux.net,
>From = lilypond-1.4.8, To = lilypond-1.4.8.moh1

usage

    cd lilypond-source-dir; patch -E -p1 < lilypond-1.4.8.moh1.diff

Patches do not contain automatically generated files
or (urg) empty directories,
i.e., you should rerun autoconf, configure

CHANGES
VERSION
lily/syllable-group.cc
scm/grob-description.scm
scm/grob-property-description.scm
scm/interface-description.scm

diff --git a/CHANGES b/CHANGES
index b52916675b57dfdd80e6cb9d8970fbb556859f2a..260254e2515a67b9d102e7f7c134c11b3b756767 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,18 @@
-1.4.8.jcn1
+--- ../lilypond-1.4.8/CHANGES  Wed Oct 17 09:25:04 2001
+++ b/CHANGES   Wed Oct 17 10:55:11 2001
+@@ -1,3 +1,12 @@
+1.4.8.moh1
+==========
+
+* new property "end-alignment" to control non-centered lyric alignment
+
+
+1.4.8
+=====
+
+ 1.4.7.jcn2
+ ==========
+ 1.4.8.jcn1
 ==========
 
 * Backported more guile > 1.4 compatibility stuff.
diff --git a/VERSION b/VERSION
index 28c826a5dcdc248773a25a82fd262e0b432ea1da..fac467866ccb3bba77d1e8764a2146777e6b0919 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=4
 PATCH_LEVEL=8
-MY_PATCH_LEVEL=jcn1
+MY_PATCH_LEVEL=moh1
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 119acd03df36e3dfe6de5a799d5a626d8f6105e9..9016333fb1ab557976e52aeb797104f392517ce0 100644 (file)
@@ -131,7 +131,7 @@ Syllable_group::set_lyric_align (const char *punc, Grob *default_notehead_l)
 /** determine the distance to translate lyrics to get correct alignment
     Rules: If alignment is centre, translate = 0
            Otherwise,
-             If (length of longest lyric) < 2 * (length of shortest lyric),
+             If (length of longest lyric) < property("end-alignment") * (length of shortest lyric),
                 - centre longest lyric on notehead
              Otherwise
                 - move so shortest lyric just reaches notehead centre
@@ -142,7 +142,7 @@ Syllable_group::amount_to_translate ()
   Real translate = 0.0;
   if (alignment_i_ != CENTER) {
     // FIXME: do we really know the lyric extent here? Some font sizing comes later?
-    Real l1 = longest_lyric_l_->extent (longest_lyric_l_, X_AXIS).length () / 2;
+    Real l1 = longest_lyric_l_->extent (longest_lyric_l_, X_AXIS).length () / gh_scm2double (longest_lyric_l_->get_grob_property("end-alignment"));
     Real l2 = shortest_lyric_l_->extent (shortest_lyric_l_, X_AXIS).length ();
 
     translate = l1 <? l2;
index 22082c5ae32f855ee6d2a8f52564ae22a2ba8a2c..9090ee659ca8a75fa12ebf8547a73c1f95b1e9a6 100644 (file)
                (self-alignment-X . 0)
                (non-rhythmic . #t)
                (word-space . 0.6)
+               (end-alignment . 5)
                (font-family . roman)
                (font-shape . upright)
                (meta . ,(grob-description "LyricText" lyric-syllable-interface text-interface font-interface ))
index a20fc98a6adfccc306f75eb08b49808b15a11080..63526597ceb27a3c5a4e180706e4ed180761e09a 100644 (file)
@@ -360,6 +360,7 @@ function of type (beam multiplicity dy staff-line-thickness) -> real.  Default v
 (grob-property-description 'visibility-lambda procedure? "a function that takes the break direction and returns a  cons of booleans containing (TRANSPARENT . EMPTY).")
 (grob-property-description 'when moment? "when does this column happen?.")
 (grob-property-description 'word-space number? "elongate left by this much (FIXME: cumbersome semantics).")
+(grob-property-description 'end-alignment number? "proportion of lyric length to align with note-head for non-centered lyrics.")
 (grob-property-description 'x-gap number? "horizontal gap between notehead and tie.")
 (grob-property-description 'y-free number? "minimal vertical gap between slur and noteheads or stems.")
 (grob-property-description 'y-offset number? "extra vertical offset for ties away from the center line.")
index 3dd45314c4dfaeda191ab9fa38c49de180800e5e..7f6496664773d075064d99369d50c3f01a7acc87 100644 (file)
@@ -532,7 +532,8 @@ that helps show the length of a melissima (tied/slurred note)."
    'lyric-syllable-interface
    "a single piece of lyrics"
    '(
-    word-space  
+    word-space
+    end-alignment
     ))