Multiline text not rendered properly

Bug #1522478 reported by Dirv
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
New
Undecided
Unassigned

Bug Description

Multiline text isn't rendered properly, either in the GUI or when a SVG is export to PNG. There may be other bugs that talk about something without tspan, but it is not dependent on a tspan (explained below). This bug has been observed in Inkscape 0.91 r13725 using Windows 7 x64. I haven't tested it on Ubuntu yet, but can upon request.

I have a SVG that was exported from Visio, that is part of a documentation package that normally gets rendered in a browser. The SVG is rendered as expected in Firefox, Chrome, and (gulp) IE. However, when I open it in Inkscape, the multiline text I have is rendered such that all the lines in the multiline text group are on top of one another. This makes the text completely unreadable.

Additionally, when running Inkscape from command line with the -z option, exporting to a PNG, I get the same results in the PNG (intial find). I was hoping to use Inkscape to convert all SVGs for the documentation package, since Adobe Acrobat cannot combine HTML files with linked SVGs and have them render in the output PDF. My intent was to create a PDF package of the documentation for reference use.

My theory behind bug:

When I create multiline text in Inkscape I see lots of sodipodi namespaced attributes in the output XML. I do not see that in the other file - although that difference is *possibly* irrelevant. Also, in the Inkscape-generated file, all the display text is in a <tspan> element - each line is in its own tspan with absolute x,y positions. In the other file, the first line is *not* in a tspan element. Additionally, each subsequent line that is in a tspan uses the dy attribute, with units in em. So I would imagine the issue is in calculating, or rather *not* calculating, the y-position of a tspan when a dy attribute is present. I haven't tested if a similar issue may be found with using the dx attribute, but I do suspect that issue may exist as well.

Please let me know if you have any other questions regarding this bug report.

-D

Tags: text
Dirv (dirvin)
tags: added: text
Revision history for this message
su_v (suv-lp) wrote :

Please attach a test case (e.g. the mentioned SVG file exported from Visio) to allow further investigation of the reported issue, thank you.

Changed in inkscape:
status: New → Incomplete
Revision history for this message
Dirv (dirvin) wrote :

I've attached a sample file that should show the issue.

Revision history for this message
su_v (suv-lp) wrote :

AFAIU the issue is with the relative units used in Visio's SVG file for the dy ('em' in this case). Inkscape does not handle relative units like 'em' or 'ex' well for the relative vertical offsets (coordinates) of <tspan> or <text> elements.

Proposing to link as duplicate to
* Bug #262528 “Problem with <tspan> element and attribute dy”
  https://bugs.launchpad.net/inkscape/+bug/262528

Related report tracking the issue for <text> elements:
* Bug #168845 “<text> position attributes should handle relative units”
  https://bugs.launchpad.net/inkscape/+bug/168845

Changed in inkscape:
status: Incomplete → New
Revision history for this message
su_v (suv-lp) wrote :

Confirmed fixed with commit in rev 14505 (fix will be available in future release Inkscape 0.92) - linking as duplicate to bug #262528.

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.