Created attachment 91766 [details] [review] Generate PDFs with correct font names Cairo exports font names in their original form. But these can be wrong, they can sometimes contain white space characters or PDF/PostScript delimiter characters. Such fonts are not common but they appear. This can cause a problem when you are printing such file in evince. The printing fails during processing of an intermediate PDF because there are delimiter characters where they shouldn't be. Attached patch escapes PostScript names of fonts (ps_name variable) right after these are loaded. It was already case for TrueType and OpenType fonts but not for pure CFF fonts. Type1 fonts were just shortened to the last correct character. Marek
Created attachment 91767 [details] CFF reproducer
Created attachment 91768 [details] Type1 reproducer You can find the intermediate PDF in /var/spool/cups/d* .
Pushed. Thanks for the patch > You can find the intermediate PDF in /var/spool/cups/d* . The easier way is to use pdftocairo. BTW, what application created the PDF? This looks like PS incorrectly translated to PDF: stream 300 300 m /F2 40 Tf (Hello) Tj endstream it should be: stream BT 1 0 0 1 300 300 Tm /F2 40 Tf (Hello) Tj ET endstream
(In reply to comment #3) > Pushed. Thanks for the patch Thank you very much. > > You can find the intermediate PDF in /var/spool/cups/d* . > > The easier way is to use pdftocairo. > > BTW, what application created the PDF? This looks like PS incorrectly > translated to PDF: > > stream > 300 300 m > /F2 40 Tf > (Hello) Tj > endstream > > it should be: > > stream > BT > 1 0 0 1 300 300 Tm > /F2 40 Tf > (Hello) Tj > ET > endstream I've created it manually and I overlooked this somehow.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.