rendering problem with metadata on text elements

Bug #238093 reported by sas
4
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Undecided
sas

Bug Description

This applies both to ordinary text and to flowed text.

Current behaviour:
If a text object has a 'title', 'desc' or 'metadata' child element, that child element is rendered as part of the text in the image.

Expected behaviour:
'title', 'desc' and 'metadata' elements shouldn't be rendered, as they just provide metadata for the parent element (see section 5.4 and chapter 21 of the SVG specification).

To reproduce:

  1) Add some text.
  2) Give it a title (right click on it, select Object Properties, type in a title, click Set).
  3) Notice that the title appears in the image.

If you check with the XML editor, you will see that the title has been added correctly. So this is a rendering problem rather than a misfunctioning of the Object Properties dialog.

Tags: text
Revision history for this message
codedread (codedread) wrote :

The following simple patch corrects the text showing up initially. However there is at least one case that is still not covered:

1) Type some text in
2) Right-click, Object Properties and add a Title
3) Edit the text and include a line-break
4) Press backspace to remove the line-break

Upon performing #4, the title and desc element text contents are prepended to the visible text (in fact, the title and desc elements have been eliminated and the text contents placed as children of the parent text element). I've started looking at src/text-editing.cpp but have not debugged this problem yet.

Revision history for this message
sas (sas-sas) wrote :

Thanks - I've committed your patch (revision 19219).

I'll leave the bug report open until the editing problem is fixed.

Changed in inkscape:
assignee: nobody → sas-sas
status: New → In Progress
Revision history for this message
codedread (codedread) wrote :

This patch should fix the problem described in my first comment https://bugs.launchpad.net/inkscape/+bug/238093/comments/1

I'm worried that throughout the text-editing we really don't deal with 'meta' elements very well at a fundamental level. However, I believe that with this patch title and desc elements will survive at least simple text editing.

I wonder how difficult Bug #249445 is to fix... when's the next release of Inkscape happening?

Revision history for this message
sas (sas-sas) wrote :

I've committed your patch (SVN revision 19448). Thanks!

I've posted a comment on bug 249445.

http://wiki.inkscape.org/wiki/index.php/0.47_Refactoring_Plan says September for Inkscape 0.47. But that plan was written back in March.

Changed in inkscape:
status: In Progress → Fix Released
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.