This PDF[1] has type-3 fonts. it looks good in Evince but when converted to SVG with pdf2svg (poppler+cairo) the text is blurry. The PDF is from [2]. [1] http://cseweb.ucsd.edu/~goguen/pps/tcs97.pdf [2] https://superuser.com/questions/740002/pdf-with-type-3-fonts-looks-better-after-pdf2ps-how-can-i-convert-it-back
Created attachment 140782 [details] SVG exported with pdf2svg
Created attachment 140783 [details] Screenshot of the SVG
Looking at the SVG's source, the glyphs have been "rastered". For example: <symbol overflow="visible" id="glyph0-238"> <g transform="matrix(1,0,0,1,0,3)"> <rect x="1" y="1" width="1" height="1"/> <rect x="3" y="1" width="1" height="1"/> <rect x="1" y="2" width="1" height="1"/> <rect x="2" y="4" width="1" height="1"/> </g> </symbol> I would guess that the size of the raster is about 7x5 and that's also more or less the equality of the resulting picture. No idea *why* this happens, but somewhere along the process, some important information gets lost. Also, no idea if this is Poppler's fault or cairo's fault. Adrian?
The PDF looks good in Evince (poppler) and when converted to PNG with pdftocairo. Maybe it means that the issue is with Cairo SVG backend?
This issue seems to be related: https://bugs.freedesktop.org/show_bug.cgi?id=12769 The PDF attached in the issue has the same problem when exported to SVG. They say that the 12 commits on poppler master from 0b5ee897 to 0741a4026 fixed it. https://lists.freedesktop.org/archives/poppler/2008-October/004190.html https://lists.freedesktop.org/archives/poppler/2008-November/004198.html Is it possible that it was fixed specifically for PS export and a similar fix is needed for SVG export?
I've changed the cairo svg surface to ps surface in pdf2svg and now the font isn't blurry. https://github.com/dawbarton/pdf2svg/blob/master/pdf2svg.c Line 29: --#include <cairo-svg.h> ++#include <cairo-ps.h> Line 66: --surface = cairo_svg_surface_create(svgFilename, width, height); ++surface = cairo_ps_surface_create(svgFilename, width, height); Does this mean that the problem is on Poppler side or Cairo side?
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/107.
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.