Hi Kieren,

thank you! I'll try (and play with) that at once. Where did you find it that fast?

Nora

On 17.08.2014 17:29, Kieren MacMillan wrote:
Hi Nora,

how do I assign an absolute value to LyricText.font-size?
allowGrobCallback =
#(define-scheme-function (parser location syms) (symbol-list?)
    (let ((interface (car syms))
          (sym (cadr syms)))
      #{
        \with {
          \consists #(lambda (context)
                       `((acknowledgers .
                           ((,interface . ,(lambda (engraver grob 
source-engraver)
                                             (let ((prop (ly:grob-property grob 
sym)))
                                               (if (procedure? prop) 
(ly:grob-set-property! grob sym (prop grob)))
                                               ))))
                           ))
                       )
        }
      #}))

absFontSize =
#(define-scheme-function (parser location pt)(number?)
    (lambda (grob)
      (let* ((layout (ly:grob-layout grob))
             (ref-size (ly:output-def-lookup (ly:grob-layout grob) 
'text-font-size 12)))
        (magnification->font-size (/ pt ref-size))
        )))

\layout {
   \context {
     \Global
     \grobdescriptions #all-grob-descriptions
   }
   \context {
     \Lyrics
     \override LyricText.font-size = \absFontSize #10.5
   }
}

Hope this helps!
Kieren.
_______________________

Kieren MacMillan, composer
www:  <http://www.kierenmacmillan.info>
email:  [email protected]



_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to