In the Ubuntu bug tracker, bug reports are piling up about evince producing scrambled documents when printing (also when printing to file, also seen in print preview):
This seems to be a regression, evince in Ubuntu 10.10 (cairo 1.10.0) shows this issue, evince in Ubuntu 10.04 (cairo 1.8.10) does not.
One example document showing this problem:
And this is the output of "Print to file (PDF)":
When I build evince in Ubuntu 10.04 with the newer version of cairo, I can reproduce this problem, therefore I think it is really a cairo bug.
I tried bisecting cairo from git, and it points to this commit as introducing the problem:
edcefa87ed0a8ff59b54ef9251182ce68f9158ba type1: Use correct glyph advance when subsetting type 1 fonts
It's perfectly possible that I did something wrong in debugging this issue, but the above commit sounds at least potentially related.
Fixed in master with http://cgit.freedesktop.org/cairo/commit/?id=6dc0b19adb6da690ad5944623081b9cdb42de066
Fixed in 1.10 with http://cgit.freedesktop.org/cairo/commit/?h=1.10&id=f47830dbbc34c7068ccdd8f7f9042e8734c9e408
You will probably also need http://cgit.freedesktop.org/cairo/commit/?h=1.10&id=43c93f2b101f534f8aa4213403af3281fcdc17fb for the patch to apply cleanly.
Thanks for the fast response! The fix (the two 1.10 patches together) seems to work for me on the package in Ubuntu 10.10.
I added the patch to the Ubuntu package and am now waiting for others to test it.