lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: can baseline-skip be absolute?


From: Kieren MacMillan
Subject: Re: can baseline-skip be absolute?
Date: Wed, 27 May 2015 12:08:38 -0400

Hi Werner,

> I use a solution as below.

This is great! Thanks.

1. Any thought about submitting a patch for inclusion in the main distro?

2. Maybe along with Mike Solomon’s \absFontSize function (which has proven 
invaluable to me):

%%%%%%%%%%

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 {
    \Score
    \allowGrobCallback font-interface.font-size
  }
}

%%%%%%%%%%

3. With those two additions, what would remain that was not absolutely-sizeable?

Thanks,
Kieren.

________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]