bug-lilypond
[Top][All Lists]
Advanced

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

Re: \center-column broken


From: Johannes Feulner
Subject: Re: \center-column broken
Date: Sun, 14 Feb 2021 16:59:35 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

Hi Aron,

the \center-column issue seems to be a problem of the SVG backend. I compiled LilyPond from master and use a custom backend based on LilyPond's SVG backend. However, the pictures were made with LilyPond's standard SVG backend. I've now used the PDF backend,  it is not affected.

Thanks for the "-\tweak parent-alignment-X #CENTER" hint. Works nicely. Shouldn't that be the default value?

I had seen the "-" operator before but could not find it in LilyPond's docs. Could you please tell me ho it works?

Cheers,

Johannes

Am 14.02.2021 um 16:36 schrieb Aaron Hill:
On 2021-02-14 7:08 am, Johannes Feulner wrote:
Hi there,

\center-column is broken. In 2.18 it was still OK. The lines of a
\center-column are supposed to be centered under each other. This is
at least with 2.23.1 not any longer the case. Please, see attached
pictures. The "aaaa" is clearly not centered unter the "|".

   \version "2.18.0"

   { a'1 a'1
      c'' ^\markup
     \center-align \box \bold \fontsize #10 \center-column { "|" "aaaa"
   "bbb" "|" }
   }


For reference, I see the correct behavior with 2.22.0 and 2.23.0, testing with both PDF and cropped PNG output.  (Latest on lilypond.org is 2.23.0-1, so are you compiling something yourself?)

Ultimately, this is a bug with how the glyphs are being rendered, not one related to centering.  Specifically, the wrong font is being rendered compared to the one that determined the physical extent.  If the narrower-looking letters had been intended, \box would have been much tighter around the markup.  This looks like an issue you would get with poor font substitution, so are you able to rule out issues with your PDF viewer and environment?


Another problem is with \center-align. \center-align centers its
contents (here the box) over the left edge of the note it is attached
to. This does not look very centered at all. It should be centered
over the middle of the note's x-extent. This was already wrong in
2.18.

You need to adjust parent-alignment-X as desired:

%%%%
\version "2.22.0"

{ a'1 a'1
  c'' -\tweak parent-alignment-X #CENTER
      ^\markup \center-align \box \bold \fontsize #10
               \center-column { "|" "aaaa" "bbb" "|" } }
%%%%


-- Aaron Hill


--
Johannes Feulner
Tel: +49 721 33500158  johannes.feulner@scorio.com

scorio GmbH  Bonhoefferweg 3   76327 Pfinztal
Geschäftsführer Johannes Feulner
Sitz der Gesellschaft Karlsruhe
Amtsgericht Mannheim HRB 713486




reply via email to

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