denemo-devel
[Top][All Lists]
Advanced

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

[bug #61965] Indent of Instrument name not automatic


From: Richard Shann
Subject: [bug #61965] Indent of Instrument name not automatic
Date: Mon, 31 Jan 2022 11:03:31 -0500 (EST)

Update of bug #61965 (project denemo):

                  Status:                    None => In Progress            

    _______________________________________________________

Follow-up Comment #1:

The following script sets the indent based on the longest instrument name and
the current font size:

8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><

(let ((size (/ (string->number (d-ScoreProperties "query=fontsize")) 10.0))) 
                (define (doit)
                        (while (d-MoveToStaffUp))
                        (let ((longest 0)(name (d-DirectiveGet-staff-display 
"InstrumentName")))
                                (if name
                                                (set! longest (max longest 
(string-length name))))
                                (while (d-MoveToStaffDown)
                                          (set! name 
(d-DirectiveGet-staff-display "InstrumentName"))
                                          (if name
                                                (set! longest (max longest 
(string-length name)))))
                longest))
        (d-ScoreIndent (* size (doit))))

8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><

It would be good perhaps to call this on each invocation of Instrument Name...

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61965>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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