lilypond-devel
[Top][All Lists]
Advanced

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

Re: some working grob properties are unlisted?


From: David Nalesnik
Subject: Re: some working grob properties are unlisted?
Date: Fri, 25 Jul 2014 16:27:17 -0500

Hi Mark,

On Tue, Jul 22, 2014 at 4:09 PM, Mark Polesky <address@hidden> wrote:

> I noticed that the 'baseline-skip property works with the
> InstrumentName grob, which confuses me, because in the IR
> entry for IntsrumentName, none of the supported interfaces
> listed at the bottom provide the 'baseline-skip property.
>
>
The stencil for InstrumentName is created by system-start-text::print,
which calls grob-interpret-markup, which in turn calls
ly:text-interface::interpret-markup with layout information from the grob.
 You can see the information that gets passed there with the following:

 \version "2.19.10"

#(define (pr grob)
   (let* ((layout (ly:grob-layout grob))
          (defs (ly:output-def-lookup layout 'text-font-defaults))
          (props (ly:grob-alist-chain grob defs)))
     (format #t "immutable properties of grob: ~a~%~%~%" (car props))
     (format #t "mutable properties of grob: ~a~%~%~%" (cadr props))
     (format #t "font defaults: ~a~%~%~%" (caddr props)) ; or defs
     ))

\new Staff \with {
  \override InstrumentName.baseline-skip = #10
  \once \override InstrumentName.after-line-breaking = #pr
  instrumentName = \markup { \column { Viola d'Amore } }
  shortInstrumentName = #"Vln. "
}
{
  c4.. g'16 c4.. g'16 | c1

An entry for 'baseline-skip is added to the mutable properties by the
override, and there is a value in 'text-font-defaults.


> But more importantly, how does a property work when it's not
> provided by any of the grob's interfaces?  Ambiguities like
> that bother me.
>
>
I have no good answer for this.  But note the following, which uses an
invented property which is part of no interface:
http://www.mail-archive.com/lilypond-user%40gnu.org/msg81852.html

Personally, I've long wondered whether interfaces serve any purpose other
than for acknowledging grobs in engravers.

Hope this leads to a better answer!
David


reply via email to

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