[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lilypond-user
Subject:    Multiple spaces disappear in SVG rendering
From:       James Harkins <jamshark70 () qq ! com>
Date:       2015-02-26 5:35:15
Message-ID: 87h9u9utf0.wl-jamshark70 () qq ! com
[Download RAW message or body]

Interesting little discrepancy -- I just found that consecutive spaces in markup \
strings render correctly using the PDF backend, but get collapsed down to one space \
in SVG.

I'm documenting a live-coding library, mainly using Emacs org-mode + LaTeX, but I \
threw in a bit of LilyPond to make a figure showing how the text notation of rhythm \
translates into notated rhythms. Laying out the table was pretty easy. I didn't want \
to mess around with trying to find the exact page size by numbers, so I rendered to \
SVG and opened it in Inkscape (since it has an automatic "crop to contents" feature). \
Then I saw:

Source: \line { 7. \typewriter "\"--| -  |- --| -\"" }

PDF view: 7. "--| -  |- --| -"

SVG view: 7. "--| - |- --| -"

Whitespace is significant as a timing placeholder, so this was not acceptable. I \
tried non-breaking spaces; same result. Eventually I worked around it by inserting a \
zero-width space (U+200B) in between two regular spaces.

https://code.google.com/p/lilypond/issues/detail?id=1434 seems related, though it \
says it's for leading and trailing spaces. If in fact it's the same issue, probably \
the description to be updated to mention multiple consecutive spaces in the middle of \
a string.

hjh



_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic