Re: LilyPond 2.23.12

2022-08-29 Thread K. Blum

Hi Jean,

Am 30.08.2022 um 00:48 schrieb Jean Abou Samra:

So the limitation is gone now, even without Cairo.

Wow - good news again. I didn't know that and never came to the idea to
try it. But now I did and it works for me too.
Is it documented somewhere since what Ly version this has changed?

Cheers,
Klaus



Re: LilyPond 2.23.12

2022-08-29 Thread Jean Abou Samra

Le 30/08/2022 à 00:41, K. Blum a écrit :

Hi Jean,

Am 29.08.2022 um 22:17 schrieb Jean Abou Samra:

Could you clarify this for me? What does not work with
lilypond-book-preamble.ly in SVG output?

The Cairo backend has many advantages for SVG, but I didn't expect one
of this kind.


This seems to be a limitation of the svg backend that has been there
ever since. "lilypond-book-preamble.ly" explicitely switches to the eps
backend and does not workd (i.e. create cropped images) with the svg
backend.
Sorry, I cannot describe it more deeply, but it has been discussed here:
https://lists.gnu.org/archive/html/lilypond-user/2016-06/msg00133.html




With this code:

\version "2.23.12"
\include "lilypond-book-preamble.ly"
{ c' }


Compiling the file as

lilypond --svg file.ly

I get cropped SVG output.

What you are describing used to be a limitation of 
lilypond-book-preamble.ly,

but no longer is. It got waived at some point in Han-Wen's heavy backend
refactorings (removing the eps backend among others). Well, it's true that
the primary motivation for these refactorings was better Cairo support.

So the limitation is gone now, even without Cairo. That being said, for the
other reasons I mentioned earlier, it is still a very good idea to use Cairo
for SVG output.

Best,
Jean




Re: LilyPond 2.23.12

2022-08-29 Thread K. Blum

Hi Jean,

Am 29.08.2022 um 22:17 schrieb Jean Abou Samra:

Could you clarify this for me? What does not work with
lilypond-book-preamble.ly in SVG output?

The Cairo backend has many advantages for SVG, but I didn't expect one
of this kind.


This seems to be a limitation of the svg backend that has been there
ever since. "lilypond-book-preamble.ly" explicitely switches to the eps
backend and does not workd (i.e. create cropped images) with the svg
backend.
Sorry, I cannot describe it more deeply, but it has been discussed here:
https://lists.gnu.org/archive/html/lilypond-user/2016-06/msg00133.html

Cheers,
Klaus



Re: LilyPond 2.23.12

2022-08-29 Thread Jean Abou Samra

Hi Klaus,

Le 27/08/2022 à 10:30, K. Blum a écrit :

These are really good news!
SVG images are required for OOoLilyPond (LilyPond extension for
LibreOffice) to insert musical snippets into office documents without
quality loss.
At the moment, this is only possible by either using the SVG backend
(drawback: no lilypond-book-preamble)



Could you clarify this for me? What does not work with 
lilypond-book-preamble.ly in SVG output?


The Cairo backend has many advantages for SVG, but I didn't expect one 
of this kind.


Best,
Jean




Re: LilyPond 2.23.12

2022-08-27 Thread K. Blum

Hi Jonas,

Am 24.08.2022 um 18:00 schrieb lilypond-user-requ...@gnu.org:

Starting with this version, the official binaries support the
experimental Cairo backend. Please give it a try with the command line
option -dbackend=cairo and see if it works for you. In case of
problems, please report back to us so it can be worked on.


These are really good news!
SVG images are required for OOoLilyPond (LilyPond extension for
LibreOffice) to insert musical snippets into office documents without
quality loss.
At the moment, this is only possible by either using the SVG backend
(drawback: no lilypond-book-preamble) or by calling an additional
program to convert PDF to SVG.
The new cairo backend could be the ultimate solution to all that. Thanks
a million to everyone who has worked on that feature!

Cheers,
Klaus




Re: LilyPond 2.23.12

2022-08-24 Thread Jean Abou Samra

Le 25/08/2022 à 00:00, CieMaKat a écrit :
Out of couriosity - does the introduction of Cairo bring us any closer 
to rendering LilyPond directly in web browser (i.e. with WebAssembly)? 
Have anyone considered that?




I don't think so — how would it bring us closer?

As far as my understanding goes (but my knowledge of Web programming
is extremely limited), to run LilyPond in a browser from the client
side (i.e. the LilyPond compilation happens in the user's computer, not
on the server), what you would need is to compile LilyPond (with all
of its dependencies) to WASM with the Emscripten compiler.

Cairo would just spare you building GhostScript for WASM in exchange
for building Cairo and LibPNG for WASM.


Jean




Re: LilyPond 2.23.12

2022-08-24 Thread CieMaKat
Out of couriosity - does the introduction of Cairo bring us any closer to
rendering LilyPond directly in web browser (i.e. with WebAssembly)? Have
anyone considered that?


W dniu środa, 24 sierpnia 2022 Jean Abou Samra 
napisał(a):

> Le 24/08/2022 à 09:49, Andrew Bernard a écrit :
>
>> Is Cairo related to producing PDF or only SVG?
>>
>
>
> Both, but its advantages are the most shiny on SVG output, where it
> produces output enormously faster, and embeds fonts in the SVG file which
> ensures they can be viewed on any browser without getting fallback fonts.
>
> PDF output is also faster, but the difference is not very noticeable for
> normal use (although it is noticeable when compiling lots and lots and lots
> of snippets, like when compiling the LilyPond documentation), whereas SVG
> output in the current default SVG backend is really slow, and gets just as
> fast as PDF output with Cairo.
>
> The PDF Cairo backend currently doesn't support all features of the
> traditional PS backend (-dembed-source-code for example).
>
> Jean
>
>
>


Re: LilyPond 2.23.12

2022-08-24 Thread Jean Abou Samra

Le 24/08/2022 à 09:49, Andrew Bernard a écrit :

Is Cairo related to producing PDF or only SVG?



Both, but its advantages are the most shiny on SVG output, where it 
produces output enormously faster, and embeds fonts in the SVG file 
which ensures they can be viewed on any browser without getting fallback 
fonts.


PDF output is also faster, but the difference is not very noticeable for 
normal use (although it is noticeable when compiling lots and lots and 
lots of snippets, like when compiling the LilyPond documentation), 
whereas SVG output in the current default SVG backend is really slow, 
and gets just as fast as PDF output with Cairo.


The PDF Cairo backend currently doesn't support all features of the 
traditional PS backend (-dembed-source-code for example).


Jean




Re: LilyPond 2.23.12

2022-08-24 Thread Andrew Bernard

Is Cairo related to producing PDF or only SVG?

Andrew

On 24/08/2022 3:35 pm, Jonas Hahnfeld via LilyPond user discussion wrote:

Starting with this version, the official binaries support the
experimental Cairo backend.




Re: LilyPond 2.23.12

2022-08-24 Thread Jacques Menu
Thanks a lot to all the Lily developers for their continuous work!

JM

> Le 24 août 2022 à 07:35, Jonas Hahnfeld via LilyPond user discussion 
>  a écrit :
> 
> We are happy to announce the release of LilyPond 2.23.12. This is
> termed a development release, but these are usually reliable. However,
> if you require stability, we recommend using version 2.22.2, the
> current stable release. Please refer to the Installing section in the
> Learning Manual for instructions how to set up the provided binaries:
> https://lilypond.org/doc/v2.23/Documentation/learning/installing
> 
> Starting with this version, the official binaries support the
> experimental Cairo backend. Please give it a try with the command line
> option -dbackend=cairo and see if it works for you. In case of
> problems, please report back to us so it can be worked on.