From 8e20dfb6502ca5e639bed5851e3139519a23aa52 Mon Sep 17 00:00:00 2001 From: Mark Hindley Date: Thu, 18 Oct 2001 07:58:38 +0100 Subject: [PATCH] patch::: 1.4.8.moh1: [PATCH] 1.4 Lyric alignment 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 | 16 +++++++++++++++- VERSION | 2 +- lily/syllable-group.cc | 4 ++-- scm/grob-description.scm | 1 + scm/grob-property-description.scm | 1 + scm/interface-description.scm | 3 ++- 6 files changed, 22 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index b52916675b..260254e251 100644 --- 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 28c826a5dc..fac467866c 100644 --- 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. diff --git a/lily/syllable-group.cc b/lily/syllable-group.cc index 119acd03df..9016333fb1 100644 --- a/lily/syllable-group.cc +++ b/lily/syllable-group.cc @@ -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 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.") diff --git a/scm/interface-description.scm b/scm/interface-description.scm index 3dd45314c4..7f64966647 100644 --- a/scm/interface-description.scm +++ b/scm/interface-description.scm @@ -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 )) -- 2.39.2