2017-11-05 13:59 GMT+01:00 Thomas Morley <thomasmorle...@gmail.com>: > 2017-11-05 13:29 GMT+01:00 Robin Bannister <r...@dabble.ch>: >> Thomas Morley wrote: >> >>> In the real markup-command there will be no "A", so I can't go for >>> stencil-extent of it.
> The bug is in note-by-number > https://sourceforge.net/p/testlilyissues/issues/5122/ > see last two comments. > Thus no text there. > In my test-markup the "A" was added to have a simple chance to compare > the line and the letter. I think I've found a way: inserting a factor relying on the division of text-font-size taken from paper (probably changed by set-global-saff-size) and text-font-size taken from current layout (probably changed by layout-set-staff-size) will do it. #(define-markup-command (A-plus-vlineIV layout props)() #:properties ((font-size 0)) (let* ((ref-stil (interpret-markup layout props "A")) (line-y 1.6) (layout-text-font-size (ly:output-def-lookup layout 'text-font-size 11)) (paper-text-font-size (ly:output-def-lookup $defaultpaper 'text-font-size 11)) (scaled-line (* (/ layout-text-font-size paper-text-font-size) (magstep font-size) line-y))) (ly:stencil-combine-at-edge ref-stil X RIGHT (ly:round-filled-box '(0 . 0.1) (cons 0 scaled-line) 0.08) 0.2))) %%%%%%%%%%%%%%%%%%%%%%%% %% EXAMPLE %%%%%%%%%%%%%%%%%%%%%%%% #(set-global-staff-size 10) \score { { a^\markup \fontsize #5 { \A-plus-vlineIV \draw-line #'(0 . 1.6) } } \layout { #(layout-set-staff-size 30) } } Looks like a method to improve note-by-number. Wouldn't it be a good idea to make all lines scaling properly? Look at the output from the added \draw-line. Thanks, Harm _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user