Page MenuHomePhabricator

(Piano)Staff.instrumentName=#"Clarinet" returns only the 4 or 5 last characters
Open, Stalled, LowPublic

Description

Author: jeanluc.thiebaut

Description:
<score>

\new PianoStaff <<
  \set PianoStaff.instrumentName = #"Clarinet"
  \context Staff = "up" { c'1 }
  \context Staff = "down" { \clef bass c1 }
>>

</score>

displays as name "inet", while Frescobaldi can display up to 9 letters

(replacing PianoStaff by Staff display 4 characters)


Version: unspecified
Severity: minor
OS: Linux
Platform: PC

Details

Reference
bz58688

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:36 AM
bzimport set Reference to bz58688.
bzimport added a subscriber: Unknown Object (MLST).

jeanluc.thiebaut wrote:

please read :
... (replacing PianoStaff by Staff display 5 characters i.s.o. 4)

Something to do with how we encapsulate the lilypond code (I don't really know enough about lilypond to understand what goes wrong). workaround:

<score raw>

\new PianoStaff <<
  \set PianoStaff.instrumentName = #"Clarinet"
  \context Staff = "up" { c'1 }
  \context Staff = "down" { \clef bass c1 }
>>

\score {

\new Score { c1 }
\midi { }

}
\header { tagline = ##f}

</score>

Ebe123 changed the task status from Open to Stalled.Aug 5 2017, 12:51 AM
Ebe123 claimed this task.
Ebe123 removed a project: Browser-Support-Firefox.
Ebe123 subscribed.

Fixed with rESCRaf73c9a7ddb8: Output SVG in scores, as the rendering process in Lilypond is different. The reason why it cuts off here and not in Frescobaldi is that here the \indent for the score is explicitly set to 0, whereas in Frescobaldi (Lilypond defaults), if the variable hasn't been declared, there is an indent. Can't really be fixed without using SVG as it would reduce the usable 1-line space for snippets.

Thus, waiting on T49578: Score should output SVG.

This is known Lilypond behaviour for "long" instrument names. See Lilypond documentation for solution. An explicitly declared indent is required in a layout block. Doing this is standard Lilypond practice.

Just confirming that I cannot reproduce this (bug?) with LilyPond 2.23.82 and the Score extension from recent master (commit adee410, 14 December 2022) using SVG output.