scour-project / scour

Scour - An SVG Optimizer / Cleaner
Apache License 2.0
765 stars 60 forks source link

Also text nodes have positions that can be scoured #76

Open launchpad-issue-importer opened 8 years ago

launchpad-issue-importer commented 8 years ago

The list of nodes that contain length kind of attributes misses the "text" entity. Attached patch cares for that.


Imported from Launchpad using lp2gh.

launchpad-issue-importer commented 8 years ago

(by pch-myzel)

launchpad-issue-importer commented 8 years ago

(by louis-simard-deactivatedaccount) The SVG specification says that x= and y= (and dx= and dy=) for may be lists of numbers instead of just numbers. The scourLength function doesn't appropriately react to having more than one number delimited by anything in its input string.

There are also some more length attributes in <text> that your patch doesn't cover, like dx=, dy= and textLength=, as well as more elements using the same attributes as <text>, such as <tspan> and <altGlyph>.