[cairo] rendering changes cairo 1.16 -> 1.17.4

Uli Schlachter psychon at znc.in
Mon Mar 1 11:46:05 UTC 2021


I tried reproducing this. Here is what I did:
- Install weasyprint from debian testing (version 51-2)
- Copy the code from [1] to foo.html
- Run weasyprint -f png /tmp/foo.html foo-1.16.0-5.png
- Run LD_LIBRARY_PATH=/home/psychon/projects/cairo/build-meson/src
weasyprint -f png /tmp/foo.html foo-master.png

(Note that in both cases there was a warning: WARNING: Font-face
"weasyprint" cannot be loaded)

Results are attached.

I am confused. My conclusion is that this bug is already reproducable
with cairo 1.16.0-5 from debian testing...? (Or alternatively: I am
doing this wrong.)

When running the same thing with "-t pdf", instead of "red pixel smear",
I get the letter "o" in red. The PDFs for both master and 1.16 look the

Thus: I guess this is just a bad test in weasyprint that actually tests
whether cairo rounds glyph positions...?



P.S.: Not really important, but Felix seems to be "someone from Fedora"
[2]. Weasyprint upstream does not really care about this test failure
since they switched from cairo to another means of PDF generation [3]
(but how are they generating PNGs then?).

[2]: https://github.com/Kozea/WeasyPrint/issues/1291#issuecomment-784352198
[3]: https://www.courtbouillon.org/blog/00003-from-cairo-to-pydyf

Am 01.03.21 um 08:52 schrieb Felix Schwarz:
> Am 28.02.21 um 23:32 schrieb Heiko Lewin:
>> You are referring to commits dealing with glyph-rasterization. The
>> images you posted do not really seem to be concerned with glyphs at all.
>> Can you clarify?
> I'd love to but unfortunately I can't. I'm only seeing this via
> WeasyPrint which is a HTML -> PDF tool written in Python. Deep inside it
> uses cairo for the final PDF generation but there is quite a bit of code
> on top.
> Anyway I'll try to work my way through WeasyPrint extract the cairo code
> in Python. The Python code should be very close to a regular C program
> which uses cairo as it uses cffi to interface with cairo.
> Felix

If you have to type the letters "A-E-S" into your source code, you're
doing it wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo-master.png
Type: image/png
Size: 374 bytes
Desc: not available
URL: <https://lists.cairographics.org/archives/cairo/attachments/20210301/62d661ff/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo-1.16.0-5.png
Type: image/png
Size: 338 bytes
Desc: not available
URL: <https://lists.cairographics.org/archives/cairo/attachments/20210301/62d661ff/attachment-0001.png>

More information about the cairo mailing list