Saving text to PDF causes fill and outline to separate

Bug #1099005 reported by Esther
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Triaged
Undecided
Unassigned
inkscape (Ubuntu)
New
Undecided
Unassigned

Bug Description

I created a simple drawing with only text. Changed the font to Arial and enlarged the text to fill the page. Saved the document as PDF with only the defaulted options selected. Opened the document in Document Viewer where it is obvious the fill and outline of the text have separated. I expected no separation to occur. Attaching both the PDF and SVG files.

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: inkscape 0.48.3.1-1ubuntu6
ProcVersionSignature: Ubuntu 3.5.0-21.32-generic 3.5.7.1
Uname: Linux 3.5.0-21-generic i686
ApportVersion: 2.6.1-0ubuntu9
Architecture: i386
Date: Sat Jan 12 16:53:03 2013
InstallationDate: Installed on 2012-04-25 (262 days ago)
InstallationMedia: Xubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012)
MarkForUpload: True
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: inkscape
UpgradeStatus: Upgraded to quantal on 2013-01-07 (5 days ago)

Revision history for this message
Esther (melanes) wrote :
Revision history for this message
Esther (melanes) wrote :

The original SVG file

Revision history for this message
Alvin Penner (apenner) wrote :

confirmed on Windows XP, Inkscape rev 12093.
when viewing the pdf in Adobe Reader the separation seems to depend quite a bit on the zoom level.

The problem appears to be related to the fact that this text has both Fill and Stroke defined. Normally when you draw text in Inkscape, it will initially have only Fill, no Stroke.

Changed in inkscape:
status: New → Confirmed
Revision history for this message
Alvin Penner (apenner) wrote :

two comments:

1. It looks as if this is a Cairo issue. The fill part of the text is being rendered using a call to cairo_show_glyphs. The stroke part of the text is being rendered using calls to cairo_stroke and cairo_glyph_path. These calls are executed in libcairo-2.dll. They originate in the Inkscape routines CairoRenderContext::_showGlyphs and CairoRenderContext::renderGlyphtext.

2. The agreement can be slightly improved by removing the transform that has been applied to the text. The text has the following transform:
transform="scale(0.99181249,1.0082551)"
If this is removed using the XML editor then the agreement between fill and stroke is somewhat better, especially at high magnification. That is to say, the transform is apparently being applied correctly, both fill and stroke are being scaled using it, but there appears to be some random numerical error, perhaps round-off error, associated with applying it.

Revision history for this message
Esther (melanes) wrote :

For me, the default text settings have the fill and stroke set to black. I have to remember to turn off the stroke, especially with certain fonts. This is the best work around for the moment.

I did a several test changing around the settings and these are my results.

Timey2_red.pdf Changing the stroke color to a different color from the fill and the separation is not visible.

Timey2_blackXML.pdf - in this version I edited the XML file and removed the scale transformation. Separation is still visible in the PDF.

I also played around with changing the font and it made no difference.

Revision history for this message
Esther (melanes) wrote :
Revision history for this message
Alvin Penner (apenner) wrote :

sorry, I should have mentioned that you can modify these defaults to be whatever you want:

- first create a text object with the defaults you like, for example fill but no stroke.
- go to File->Inkscape Preferences
- then go to Tools->Text
- click on "This tools own style"
- click on 'Take from selection'
- these preferences should now be remembered for future use.

su_v (suv-lp)
tags: added: exporting pdf
su_v (suv-lp)
tags: added: cairo
Changed in inkscape:
status: Confirmed → Triaged
Revision history for this message
gillnrb (gillnrb) wrote :

Seems to be same as https://bugs.launchpad.net/inkscape/+bug/1449476
Inkscape 0.48 works fine in this. Proper strokes on all sizes. 0.48 has same Cairo version?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.