"Stroke to path" command adds font info to style for item when it wasn't even a font to begin with

Bug #1212136 reported by rickmastfan67
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Undecided
Unassigned

Bug Description

Inkscape 0.48.4 r9939
Windows 7 x64

Steps to reproduce:
1. Create an item with just a stroke. (or load the attachment)
2. Look at the "style" info for the item you have created (in a text editor):

style="fill:none;stroke:#00ffff;stroke-width:10;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"

3. Path > Stroke to Path
4. Save
5. Now reload the file in a trusty text editor and notice that after you have done the "Stroke to Path" command, Inkscape has added font info to your file, causing the file to become bloated with un-needed info.

style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#00ffff;fill-opacity:1;stroke:none;stroke-width:10;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans"

What should happen:
Inkscape should either keep the same style info as before (except for the needed flip of the color from stroke to fill) the "Stroke to Path" command was used, or just use the minimal style info possible to keep the file size down (just the fill info).

Now, I can understand having the font info being kept intact if the item was a font to begin with, but not adding it to a quickly drawn item that you wanted to convert from a single line to a filled item via the "Stroke to Path" command.

Revision history for this message
rickmastfan67 (rickmastfan67) wrote :
Revision history for this message
rickmastfan67 (rickmastfan67) wrote :
Revision history for this message
jazzynico (jazzynico) wrote :

Confirmed on Windows XP, Inkscape trunk revision 12475.

tags: added: node-editing styles
Changed in inkscape:
status: New → Triaged
Revision history for this message
su_v (suv-lp) wrote :

Duplicate of Bug #168720 “Text styles remain in type objects converted to paths.”?

(Other related reports: bug #890139, bug #744819, bug #390549, bug #171983)

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

> Duplicate of Bug #168720 “Text styles remain in type objects converted to paths.”?

Nevermind - not a duplicate of this one.

IIRC <https://bugs.launchpad.net/inkscape/+bug/890139/comments/3> was the result last time I tried to find an explanation for this behavior.

description: updated
Revision history for this message
rickmastfan67 (rickmastfan67) wrote :

Just wanted to also mention that while I was working on a file that I made 15 items in (they were never fonts) that needed to be converted from stroke to path, Inkscape bloated the file by over 10kb that I had to manually clean out because of this bug.

So, if somebody had to do this, say, 100 times in one file and none of the items were a "font" at any time, it could easily add over 75kb+ to the file size that isn't needed . That isn't good. And saving it as a "plain" svg doesn't help fix this problem at all since the items added are legit non-Inkscape only lines.

Revision history for this message
Tavmjong Bah (tavmjong-free) wrote :

In trunk (0.91), you can optionally tell Inkscape to cleanout unneeded attributes and properties under the Input/Output -> SVG output tab in the Inkscape Preferences dialog. Make sure you have a backup file the first time you try this.

Revision history for this message
Nathan Lee (nathan.lee) wrote :

Hi - thanks for reporting!

As part of the manual bug migration to Inkscape's new bug tracker on GitLab, I've closed the here. The issue can still be tracked in https://gitlab.com/inkscape/inkscape/-/issues/967

Note it has been fixed in 1.1-dev, but remains in 1.0.

Please feel free to file new bugs about the issues you're seeing at http://inkscape.org/report.

Moved to: https://gitlab.com/inkscape/inbox/-/issues/967
Closed by: https://gitlab.com/nathanal

Changed in inkscape:
status: Triaged → Fix Released
Revision history for this message
Nathan Lee (nathan.lee) wrote :

Arg, wrong label again, should be Fix Committed.

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

Other bug subscribers

Bug attachments

Remote bug watches

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