Summary: | Type 3 font from PDF rendered blurry in SVG | ||
---|---|---|---|
Product: | cairo | Reporter: | Ben <ben.browitt> |
Component: | svg backend | Assignee: | Emmanuel Pacaud <emmanuel.pacaud> |
Status: | RESOLVED MOVED | QA Contact: | cairo-bugs mailing list <cairo-bugs> |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
SVG exported with pdf2svg
Screenshot of the SVG |
Description
Ben
2018-07-23 15:35:14 UTC
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.