Bug 691844

Summary: Cairo's SVG output generates glyph entries that cannot be viewed in many SVG clients
Product: Red Hat Enterprise Linux 5 Reporter: Tom "spot" Callaway <tcallawa>
Component: cairoAssignee: Benjamin Otte <otte>
Status: CLOSED WONTFIX QA Contact: desktop-bugs <desktop-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.8CC: ovasik, tcallawa
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-25 20:33:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Patch to fix text glyph output from Cairo to be visible in all SVG clients
none
SVG generated by R on RHEL-5 with normal cairo package
none
SVG generated by R on RHEL-5 with fixed cairo package
none
Fixed spec file for RHEL-5 none

Description Tom "spot" Callaway 2011-03-29 15:53:09 UTC
Created attachment 488488 [details]
Patch to fix text glyph output from Cairo to be visible in all SVG clients

An R user reported a bug on RHEL-5 where a simple graph plot, written by R via cairo generated an SVG that did not appear to have text labels. Upon analysis, I discovered that on modern Fedora, R would output a valid SVG with text labels.

To reproduce this issue, install "R-core" from EPEL, and run R, then enter:

svg("plot.svg");
plot(cars);
dev.off(); 

This will output "plot.svg". Some clients seemed able to properly view this RHEL-5 SVG (inkscape, gimp), but others could not (firefox, chromium).

When I diff'd the two files (the RHEL-5 generated SVG and the Fedora 14 generated SVG), I discovered that the glyph entries in the RHEL-5 generated SVG were missing the overflow="visible" attribute. Sure enough, this was a bug identified and fixed in Cairo 1.4.0:

"SVG: Fix bug preventing text from appearing in many viewers"

http://cairographics.org/news/cairo-1.4.0/

When I looked to see how the bug was fixed, the fix was to simply add the overflow="visible" attribute when writing out glyphs. I backported this one-line fix to the RHEL-5 cairo package, rebuilt, and confirmed that it now generated SVG files which can be viewed with text labels in all SVG clients I could find.

I have attached a fixed SPEC, patch, and before/after SVG files. This patch should not affect API. Please consider this for a future update.

Comment 1 Tom "spot" Callaway 2011-03-29 15:54:03 UTC
Created attachment 488489 [details]
SVG generated by R on RHEL-5 with normal cairo package

Comment 2 Tom "spot" Callaway 2011-03-29 15:54:30 UTC
Created attachment 488490 [details]
SVG generated by R on RHEL-5 with fixed cairo package

Comment 3 Tom "spot" Callaway 2011-03-29 15:55:34 UTC
Created attachment 488491 [details]
Fixed spec file for RHEL-5

Comment 4 RHEL Program Management 2014-03-07 13:43:50 UTC
This bug/component is not included in scope for RHEL-5.11.0 which is the last RHEL5 minor release. This Bugzilla will soon be CLOSED as WONTFIX (at the end of RHEL5.11 development phase (Apr 22, 2014)). Please contact your account manager or support representative in case you need to escalate this bug.

Comment 5 Tom "spot" Callaway 2014-03-07 13:47:41 UTC
I guess it's a good thing I'm not a customer, otherwise, I'd probably be pretty annoyed that a bug WITH A PATCH ATTACHED TO FIX IT remained unfixed for three years.

Comment 6 Ondrej Vasik 2014-06-25 20:33:41 UTC
Customers should use product support channels - not bugzilla shortcuts - but you are right, it is very annoying to receive such message in these cases after several years. You know very well update capacities are always limited - and patch is not the only thing needed to ship update for customers. Sorry, closing WONTFIX.