recognize verselayout and use lyrictext font size to render verse markup
This commit is contained in:
parent
0199813a81
commit
201a54f60a
@ -14,7 +14,6 @@
|
||||
property-defaults.fonts.sans = \songLyricFont
|
||||
%annotate-spacing = ##t
|
||||
% spacing stuff
|
||||
lyric-size = #lyricSize
|
||||
two-sided = ##t
|
||||
inner-margin = 1.5\cm
|
||||
outer-margin = \songMargin
|
||||
|
@ -109,51 +109,6 @@ generalLayout = \layout {
|
||||
(make-pad-right-markup -0.1 (make-tied-lyric-markup text))
|
||||
text))))
|
||||
|
||||
lyricsWithChordsLayout = \layout {
|
||||
\generalLayout
|
||||
\context {
|
||||
\ChordNames
|
||||
\override ChordName.font-size = \songTextChordFontSize
|
||||
}
|
||||
\context {
|
||||
\Lyrics
|
||||
\override VerticalAxisGroup.nonstaff-relatedstaff-spacing.basic-distance = #(- (- songTextLineHeigth songTextChordFontSize) 1)
|
||||
\override LyricText.parent-alignment-X = #LEFT
|
||||
\override LyricText.self-alignment-X = #LEFT
|
||||
\override LyricText.word-space = 0.8
|
||||
\override LyricSpace.minimum-distance = 0.8
|
||||
\override LyricText.stencil = #custom-lyric-text::print
|
||||
}
|
||||
\context {
|
||||
\Score
|
||||
\override PaperColumn.keep-inside-line = ##f
|
||||
\override SpacingSpanner.uniform-stretching = ##t
|
||||
\override SpacingSpanner.spacing-increment = 0
|
||||
\remove Bar_number_engraver
|
||||
\remove Mark_engraver
|
||||
\remove Volta_engraver
|
||||
\remove Parenthesis_engraver
|
||||
}
|
||||
\context {
|
||||
\Staff
|
||||
\remove Staff_symbol_engraver
|
||||
\remove Clef_engraver
|
||||
\remove Time_signature_engraver
|
||||
\omit KeySignature
|
||||
}
|
||||
\context {
|
||||
\Voice
|
||||
\remove Stem_engraver
|
||||
\remove Rest_engraver
|
||||
\remove Multi_measure_rest_engraver
|
||||
\remove Phrasing_slur_engraver
|
||||
\remove Slur_engraver
|
||||
\remove Tie_engraver
|
||||
\remove Dynamic_engraver
|
||||
\remove Note_heads_engraver
|
||||
}
|
||||
}
|
||||
|
||||
% Akkord mit Bunddiagramm anzeigen
|
||||
#(define-markup-command (fret-chord layout props fret chord) (string? string?)
|
||||
(interpret-markup layout props
|
||||
|
@ -12,7 +12,7 @@ verselayout = \layout {
|
||||
}
|
||||
TEXT = \markuplist {
|
||||
\override #`(transposition . ,TRANSPOSITION)
|
||||
\override #`(verselayout . verselayout)
|
||||
\override #`(verselayout . ,verselayout)
|
||||
\override #`(verse-chords . ,#{ \chords { \verseChords } #})
|
||||
\override #`(verse-reference-voice . ,#{ \global \firstVoice #})
|
||||
\TEXT
|
||||
|
@ -155,9 +155,18 @@
|
||||
)
|
||||
|
||||
#(define-markup-command (verseformat layout props verse) (markup?)
|
||||
#:properties ((verselayout generalLayout))
|
||||
"Textformatierung für Strophen"
|
||||
(interpret-markup layout props
|
||||
(make-sans-markup (make-fontsize-markup (ly:output-def-lookup layout 'lyric-size) verse))
|
||||
(let* (
|
||||
(layout-scale (ly:output-def-lookup layout 'output-scale 1.0))
|
||||
(verselayout-scale (ly:output-def-lookup verselayout 'output-scale layout-scale))
|
||||
(mag-scale (/ verselayout-scale layout-scale))
|
||||
(lyric-context-props (ly:context-def-lookup (ly:assoc-get 'Lyrics (ly:output-find-context-def verselayout 'Lyrics)) 'property-ops))
|
||||
(lyric-size (caddr (find (lambda (prop) (and (equal? 'push (car prop)) (equal? 'LyricText (cadr prop)) (equal? 'font-size (cadddr prop)))) lyric-context-props)))
|
||||
)
|
||||
(make-magnify-markup mag-scale (make-sans-markup (make-fontsize-markup lyric-size verse)))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@ -225,7 +234,8 @@
|
||||
(verse-break-voice #{#})
|
||||
(verse-line-height songTextLineHeigth)
|
||||
(intraverse-vspace 0)
|
||||
(transposition (cons #f #f)))
|
||||
(transposition (cons #f #f))
|
||||
(verselayout generalLayout))
|
||||
"Vers mit Akkorden"
|
||||
(interpret-markup layout props
|
||||
#{
|
||||
@ -241,11 +251,48 @@
|
||||
\addlyrics { #lyrics }
|
||||
>>
|
||||
\layout {
|
||||
\lyricsWithChordsLayout
|
||||
\verselayout
|
||||
\context {
|
||||
\Staff
|
||||
\override LeftEdge.space-alist.first-note = #'(fixed-space . 5.0)
|
||||
}
|
||||
\context {
|
||||
\Lyrics
|
||||
\override VerticalAxisGroup.nonstaff-relatedstaff-spacing.basic-distance = #(- (- songTextLineHeigth songTextChordFontSize) 1)
|
||||
\override LyricText.parent-alignment-X = #LEFT
|
||||
\override LyricText.self-alignment-X = #LEFT
|
||||
\override LyricText.word-space = 0.8
|
||||
\override LyricSpace.minimum-distance = 0.8
|
||||
\override LyricText.stencil = #custom-lyric-text::print
|
||||
}
|
||||
\context {
|
||||
\Score
|
||||
\override PaperColumn.keep-inside-line = ##f
|
||||
\override SpacingSpanner.uniform-stretching = ##t
|
||||
\override SpacingSpanner.spacing-increment = 0
|
||||
\remove Bar_number_engraver
|
||||
\remove Mark_engraver
|
||||
\remove Volta_engraver
|
||||
\remove Parenthesis_engraver
|
||||
}
|
||||
\context {
|
||||
\Staff
|
||||
\remove Staff_symbol_engraver
|
||||
\remove Clef_engraver
|
||||
\remove Time_signature_engraver
|
||||
\omit KeySignature
|
||||
}
|
||||
\context {
|
||||
\Voice
|
||||
\remove Stem_engraver
|
||||
\remove Rest_engraver
|
||||
\remove Multi_measure_rest_engraver
|
||||
\remove Phrasing_slur_engraver
|
||||
\remove Slur_engraver
|
||||
\remove Tie_engraver
|
||||
\remove Dynamic_engraver
|
||||
\remove Note_heads_engraver
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user