[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue 2155 in lilypond: TextScript isn't entirely scaled, while usin
From: |
lilypond |
Subject: |
Re: Issue 2155 in lilypond: TextScript isn't entirely scaled, while using another "staff-size" |
Date: |
Mon, 02 Jan 2012 22:41:25 +0000 |
Comment #1 on issue 2155 by address@hidden: TextScript isn't
entirely scaled, while using another "staff-size"
http://code.google.com/p/lilypond/issues/detail?id=2155
1. The following might be a work-around (scaled-markup-test-1.png):
\version "2.15.20"
scaledMarkup =
#(define-music-function (parser location dir arg ln)(integer? markup? pair?)
"dir: choose 1 or -1 "
(define (ln-stencil grob)
(let* ((sz (ly:grob-property grob 'font-size 0.0))
(mult (magstep sz))
(ln-markup (markup arg #:scale (cons mult mult) #:draw-line ln)))
(grob-interpret-markup grob ln-markup)))
#{
\override TextScript #'stencil = #ln-stencil
$(make-music
'EventChord
'elements (list (make-music
'TextScriptEvent
'direction dir
'text "")))
#})
mus = { \scaledMarkup #-1 "XXX" #(cons 0 4) c'1 }
<<
\new Staff \with {
fontSize = #-8
\override StaffSymbol #'staff-space = #(magstep -8)
\override StaffSymbol #'thickness = #(magstep -8)
}
\mus
\new Staff
\mus
2. The first time I note this issue was, when I tried to override
Stem-stencil using the draw-line-markup-command.
Same trickery as above _works_ when overriding Beam-stencil and
NoteHead-stencil but _not_ with Stem-stencil, don't know why
(scaled-markup-test-2.png):
\version "2.15.20"
#(define (ln-stencil- grob)
(let* ((sz (ly:grob-property grob 'font-size 0.0))
(mult (magstep sz))
(ln-markup (markup #:with-color red #:scale (cons mult mult)
#:draw-line (cons 2 2))))
(grob-interpret-markup grob ln-markup)))
msc = \relative c' {
\once\override Beam #'stencil = #ln-stencil-
c8[ d]
\once\override NoteHead #'stencil = #ln-stencil-
c8[ d]
\once\override Stem #'stencil = #ln-stencil-
c8[ d]
}
<<
\new Staff \with {
fontSize = #-8
\override StaffSymbol #'staff-space = #(magstep -8)
\override StaffSymbol #'thickness = #(magstep -8)
}
\msc
\new Staff
\msc
-Harm
Attachments:
scaled-markup-test-1.png 2.2 KB
scaled-markup-test-2.png 3.0 KB
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Issue 2155 in lilypond: TextScript isn't entirely scaled, while using another "staff-size",
lilypond <=