[Top][All Lists]

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

Re: Cairo based backend

From: Jonas Hahnfeld
Subject: Re: Cairo based backend
Date: Wed, 07 Jul 2021 18:36:45 +0200
User-agent: Evolution 3.40.2

Am Montag, dem 05.07.2021 um 00:10 +0200 schrieb Knut Petersen:
> Hi everybody!
> The attached patch implements a new backend based on Cairo.
> To test select the desired output formats by any combination of the '--pdf', 
> '--ps' and '--svg' command line options and  add '-dbackend=cairo'. The 
> '--svg' option must precede the '-dbackend=cairo' option.
> Features:
>   * Faster than all other backends.
>   * It is easy to add support for other image formats.
>   * Safer than the postscript backend.
>   * Files that fail with the svg backend produce valid svg  output with the 
> cairo backend.

I saw that you opened a merge request (actually, two...), but I think
there are some high-level things that should be discussed on the
mailing list.

The first one is about *how* the backend should be added. In the
previous thread, I proposed that it should be optional at first and I
meant this to imply that Cairo should not become a required dependency
from the beginning. Actually, I think it may be even better to only
compile the backend if passing a flag to configure, say --enable-cairo.
In particular the requirement on version 1.16 will cut out many active
distributions, most importantly Ubuntu 18.04 used in the CI pipelines
and representing, more or less, the minimum versions required for
LilyPond. (Is there a particular reason for 1.16 or could the code work
with older versions? Debian 9 Stretch has 1.14.8 and is supported until
next year, but not really required once the backend is optional.)

The code in !837 also depends on libpng to write out images, where the
use of setjmp made me frown. It appears that Cairo has a (very simple)
API available for writing PNGs, any reason not to use that? (Although
I'd say the first MR should focus on PDF only as the default format.)

Briefly looking through the code, I find the macros MCRA, MCRB, MSURA,
and MSURB very hard to read (no clue what they stand for). I'd have to
look into it, but I hope there are nicer ways to write that. Also the
amount of global variables is worrying...


Attachment: signature.asc
Description: This is a digitally signed message part

reply via email to

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