From: Bertrand Bordage Date: Sat, 6 Aug 2011 22:20:23 +0000 (+0200) Subject: Adds a glyph for tied lyrics. X-Git-Tag: release/2.15.9-1~10^2~12 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=8d148ea05fa4b34f8cc3407e112363d715b27ad8;p=lilypond.git Adds a glyph for tied lyrics. --- diff --git a/Documentation/de/notation/vocal.itely b/Documentation/de/notation/vocal.itely index d0382e8e7d..71af9dd1eb 100644 --- a/Documentation/de/notation/vocal.itely +++ b/Documentation/de/notation/vocal.itely @@ -625,19 +625,15 @@ Um mehr als eine Silbe zu einer Note zuzuordnen, können die Silben mit geraden Anführungszeichen (@code{"}) umgeben werden oder ein Unterstrich (@code{_}) benutzt werden, um ein Leerzeichen zwischen Silben zu setzen. Mit der Tilde (@code{~}) kann ein Bindebogen -gesetzt werden. Dies erfordert, dass eine Schriftart vorhanden ist, -die das entsprechende Symbol (U+203F) beinhaltet. Frei erhältliche -Schriftarten, die den Bindebogen enthalten, sind @qq{FreeSerif} (ein -Times-Klon), @qq{DejaVuSans} (aber nicht DejaVuSerif) oder -TeXGyreSchole (ein Century Schoolbook-Klon). +gesetzt werden. @lilypond[quote,ragged-right,verbatim] { \time 3/4 \relative c' { c2 e4 g2 e4 } - \addlyrics { gran- de_a- mi- go } - \addlyrics { pu- "ro y ho-" nes- to } - \addlyrics { pu- ro~y~ho- nes- to } + \addlyrics { gran -- de_a -- mi -- go } + \addlyrics { pu -- "ro y ho" -- nes -- to } + \addlyrics { pu -- ro~y~ho -- nes -- to } } @end lilypond diff --git a/Documentation/es/notation/vocal.itely b/Documentation/es/notation/vocal.itely index ce3416cae3..f6d352c94e 100644 --- a/Documentation/es/notation/vocal.itely +++ b/Documentation/es/notation/vocal.itely @@ -640,20 +640,15 @@ Para asignar más de una sílaba a una única nota con espacios entre las sílabas, podemos encerrar la frase entre comillas o utilizar un carácter de guión bajo @code{_}. De forma alternativa, podemos usar el símbolo de tilde curva (@code{~}) para obtener una ligadura de -texto. La ligadura de texto está implementada con el carácter Unicode -U+203F, por tanto debemos asegurarnos de usar una fuente tipográfica -para este glifo que realmente lo contenga. Algunas de las fuentes -tipográficas disponibles libremente con una ligadura de letra son, por -ejemplo, `FreeSerif' (un clon de Times), `DejaVuSans' (pero no -`DejaVuSerif') o `TeXGyreSchola' (un clon de Century Schoolbook). +texto. @lilypond[quote,ragged-right,verbatim] { \time 3/4 \relative c' { c2 e4 g2 e4 } - \addlyrics { gran- de_a- mi- go } - \addlyrics { pu- "ro y ho-" nes- to } - \addlyrics { pu- ro~y~ho- nes- to } + \addlyrics { gran -- de_a -- mi -- go } + \addlyrics { pu -- "ro y ho" -- nes -- to } + \addlyrics { pu -- ro~y~ho -- nes -- to } } @end lilypond diff --git a/Documentation/fr/notation/notation-appendices.itely b/Documentation/fr/notation/notation-appendices.itely index e6e8a4c7db..980ce5bc12 100644 --- a/Documentation/fr/notation/notation-appendices.itely +++ b/Documentation/fr/notation/notation-appendices.itely @@ -605,6 +605,7 @@ informations, reportez-vous au chapitre @ref{Mise en forme du texte}. * Glyphes d'extrémité d'accolade:: * Glyphes de pédale:: * Glyphes d'accordéon:: +* Glyphes de liaison:: * Glyphes de style vaticana:: * Glyphes de style medicaea:: * Glyphes de style Hufnagel:: @@ -791,6 +792,16 @@ informations, reportez-vous au chapitre @ref{Mise en forme du texte}. @end lilypond +@node Glyphes de liaison +@unnumberedsubsec Tie glyphs + +@lilypond[quote] +\include "font-table.ly" +\markuplines \override-lines #'(word-space . 4) + \doc-chars #ties +@end lilypond + + @node Glyphes de style vaticana @unnumberedsubsec Glyphes de style vaticana @translationof Vaticana glyphs diff --git a/Documentation/fr/notation/vocal.itely b/Documentation/fr/notation/vocal.itely index d6f08b51ea..5460e4a500 100644 --- a/Documentation/fr/notation/vocal.itely +++ b/Documentation/fr/notation/vocal.itely @@ -611,21 +611,15 @@ Référence des propriétés internes : Pour attribuer plus d'une syllabe à une même note, vous pouvez soit les mettre entre guillemets, soit utiliser le caractère souligné (@code{_}) pour obtenir une espace, ou bien encore utiliser un tilde -(@code{~}) pour obtenir une liaison entre les syllabes. Cette -liaison adaptée aux paroles correspond au caractère Unicode -@code{U+203F}, et n'apparaîtra dans la partition que si le système -dispose d'une police installée qui contient ce symbole. Un certain -nombre de fontes librement disponibles en disposent, comme FreeSerif -(un clone de Times), `DejaVuSans' (mais pas DejaVuSerif) ou -TeXGyreSchola (un clone de Century Schoolbook). +(@code{~}) pour obtenir une liaison entre les syllabes. @lilypond[quote,ragged-right,verbatim] { \time 3/4 \relative c' { c2 e4 g2 e4 } - \addlyrics { gran- de_a- mi- go } - \addlyrics { pu- "ro y ho-" nes- to } - \addlyrics { pu- ro~y~ho- nes- to } + \addlyrics { gran -- de_a -- mi -- go } + \addlyrics { pu -- "ro y ho" -- nes -- to } + \addlyrics { pu -- ro~y~ho -- nes -- to } } @end lilypond diff --git a/Documentation/included/font-table.ly b/Documentation/included/font-table.ly index 35b835cdd9..398286ac4e 100644 --- a/Documentation/included/font-table.ly +++ b/Documentation/included/font-table.ly @@ -76,6 +76,7 @@ (define brackettips (get-group glyph-list "^brackettips\\.")) (define pedal (get-group glyph-list "^pedal\\.")) (define accordion (get-group glyph-list "^accordion\\.")) + (define ties (get-group glyph-list "^ties\\.")) ;; remove all remaining groups from the glyph-list (for-each @@ -95,7 +96,8 @@ arrowheads brackettips pedal - accordion)) + accordion + ties)) ;;;;;;;;; diff --git a/Documentation/notation/notation-appendices.itely b/Documentation/notation/notation-appendices.itely index ded7f6e624..53c75c0351 100644 --- a/Documentation/notation/notation-appendices.itely +++ b/Documentation/notation/notation-appendices.itely @@ -627,6 +627,7 @@ see @ref{Formatting text}. * Bracket-tip glyphs:: * Pedal glyphs:: * Accordion glyphs:: +* Tie glyphs:: * Vaticana glyphs:: * Medicaea glyphs:: * Hufnagel glyphs:: @@ -797,6 +798,16 @@ see @ref{Formatting text}. @end lilypond +@node Tie glyphs +@unnumberedsubsec Tie glyphs + +@lilypond[quote] +\include "font-table.ly" +\markuplines \override-lines #'(word-space . 4) + \doc-chars #ties +@end lilypond + + @node Vaticana glyphs @unnumberedsubsec Vaticana glyphs diff --git a/Documentation/notation/vocal.itely b/Documentation/notation/vocal.itely index b8f13106e3..f6ab639d91 100644 --- a/Documentation/notation/vocal.itely +++ b/Documentation/notation/vocal.itely @@ -609,21 +609,15 @@ Internals Reference: In order to assign more than one syllable to a single note with spaces between the syllables, you can surround the phrase with quotes or use a @code{_} character. Alternatively, you can use -code the tilde symbol (@code{~}) to get a lyric tie. The lyric -tie is implemented with the Unicode character U+203F, so be -sure to use a font for this glyph which actually contains it. -Freely available fonts with a lyric tie are, for example, -`FreeSerif' (a Times clone), `DejaVuSans' (but not -`DejaVuSerif'), or `TeXGyreSchola' (a Century Schoolbook -clone). +the tilde symbol (@code{~}) to get a lyric tie. @lilypond[quote,ragged-right,verbatim] { \time 3/4 \relative c' { c2 e4 g2 e4 } - \addlyrics { gran- de_a- mi- go } - \addlyrics { pu- "ro y ho-" nes- to } - \addlyrics { pu- ro~y~ho- nes- to } + \addlyrics { gran -- de_a -- mi -- go } + \addlyrics { pu -- "ro y ho" -- nes -- to } + \addlyrics { pu -- ro~y~ho -- nes -- to } } @end lilypond diff --git a/Documentation/po/fr.po b/Documentation/po/fr.po index 917528951e..162af1f555 100644 --- a/Documentation/po/fr.po +++ b/Documentation/po/fr.po @@ -5388,6 +5388,11 @@ msgstr "Glyphes de pédale" msgid "Accordion glyphs" msgstr "Glyphes d'accordéon" +#. @node in Documentation/notation/notation-appendices.itely +#. @unnumberedsubsec in Documentation/notation/notation-appendices.itely +msgid "Tie glyphs" +msgstr "Glyphes de liaison" + #. @node in Documentation/notation/notation-appendices.itely #. @unnumberedsubsec in Documentation/notation/notation-appendices.itely msgid "Vaticana glyphs" diff --git a/mf/feta-generic.mf b/mf/feta-generic.mf index 6c00aa5784..3ba7949ba6 100644 --- a/mf/feta-generic.mf +++ b/mf/feta-generic.mf @@ -45,6 +45,7 @@ if test = 0: input feta-pedals; input feta-brackettips; input feta-accordion; + input feta-ties; else: input feta-test-generic.mf; fi diff --git a/mf/feta-test-generic.mf b/mf/feta-test-generic.mf index 71f7ce842f..a910b52c5a 100644 --- a/mf/feta-test-generic.mf +++ b/mf/feta-test-generic.mf @@ -14,3 +14,4 @@ input feta-accidentals; %input feta-timesignatures; %input feta-pedals; %input feta-accordion; +%input feta-ties; diff --git a/mf/feta-ties.mf b/mf/feta-ties.mf new file mode 100644 index 0000000000..4378d576d8 --- /dev/null +++ b/mf/feta-ties.mf @@ -0,0 +1,46 @@ +% Feta (not the Font-En-Tja) music font -- small ties +% This file is part of LilyPond, the GNU music typesetter. +% +% Copyright (C) 2011 Bertrand Bordage +% +% LilyPond is free software: you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation, either version 3 of the License, or +% (at your option) any later version. +% +% LilyPond is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with LilyPond. If not, see . + +fet_begingroup ("ties"); + +fet_beginchar ("lyric tie", "lyric"); + save padding; + + padding := .4 staff_space; + + set_char_box (0, 0, + .7 staff_space#, 0); + + z1 = (-staff_space, -padding); + z2 = (0, -d); + z3 = (staff_space, -padding); + + penpos1 (1.2 linethickness, 50); + penpos2 (2 linethickness, 90); + penpos3 (1.2 linethickness, 130); + + fill z2l + .. simple_serif (z3l, z3r, 90) + .. z2r + .. simple_serif (z1r, z1l, 90) + .. cycle; + + penlabels (1, 2, 3); +fet_endchar; + +fet_endgroup ("ties"); diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm index 38bf9623dc..95658c16a6 100644 --- a/scm/define-markup-commands.scm +++ b/scm/define-markup-commands.scm @@ -926,6 +926,7 @@ the use of @code{\\simple} is unnecessary. (define-markup-command (tied-lyric layout props str) (string?) #:category music + #:properties ((word-space)) " @cindex simple text strings with tie characters @@ -938,19 +939,18 @@ Like simple-markup, but use tie characters for @q{~} tilde symbols. @end lilypond" (if (string-contains str "~") (let* - ((parts (string-split str #\~)) - (tie-str (ly:wide-char->utf-8 #x203f)) + ((half-space (/ word-space 2)) + (parts (string-split str #\~)) + (tie-str (markup #:hspace half-space + #:musicglyph "ties.lyric" + #:hspace half-space)) (joined (list-join parts tie-str)) (join-stencil (interpret-markup layout props tie-str)) ) (interpret-markup layout - (prepend-alist-chain - 'word-space - (/ (interval-length (ly:stencil-extent join-stencil X)) -3.5) - props) - (make-line-markup joined))) - ;(map (lambda (s) (interpret-markup layout props s)) parts)) + props + (make-concat-markup joined))) (interpret-markup layout props str))) (define-public empty-markup