On 2025-06-06 06:02, Werner LEMBERG wrote:

    But I still think that there's a problem with \fill-line. I
    don't think it should cause the word "Composer" to protrude
    past the end of the staff when there is plenty of room for it
    to fit properly right-aligned to the end of the staff.

Yes, this is definitely a flaw in the current implementation of
\fill-line.

I don't think so.  IMHO it's rather that the documentation of
`\fill-line` is not adequate to what this function really does, namely
to split a line into N equally large regions for N arguments, with the
text in the leftmost region left-aligned, the text in the rightmost
region right-aligned, and the remaining text strings centered in the
respective regions.  In many cases it is plain ugly if the middle part
is moved to the right because the left part is little bit longer.

   When copy/pasting my example into the previous email, I missed to
   include a couple of lines, so the example didn't show the actual bug.
   Here comes the example I intended to include, which shows the bug
   namely that the right-most markup on the line is pushed to the right
   beyond line-width:
   \version "2.25.25"
   \paper {
     line-width = #100
   }
   \markup\fill-line{ "|Left" "Middle" "Right|" }
   \markup\fill-line{ "|Leeeeeeeeeeeeeeeeeeeeeeeeeeeeeeft" "Middle"
   "Right|" }
   \markup\fill-line{ "|Leeeeeeeeeeeeeeeeeeeeeeeeeeeeeeft" \null "Right|"
   }
   \markup \vspace #1
   \markup\italic "Expected:"
   \markup\fill-line{ "|Left" "Middle" "Right|" }
   \markup\fill-line{ \with-dimension #X #'(0 . 0 )
   "|Leeeeeeeeeeeeeeeeeeeeeeeeeeeeeeft" "Middle" "Right|" }
   \markup\fill-line{ \with-dimension #X #'(0 . 0 )
   "|Leeeeeeeeeeeeeeeeeeeeeeeeeeeeeeft" \null "Right|" }

      /Mats

Reply via email to