Skip to content

Feature: Text shape-padding and shape-subtract controls (and menu item)

This merge request adds a simple knot feature which allows flow text in SVG 2.0 to set the shape-padding and shape-subtract attributes.

text-subtract

An improvement that could be made is using const Geom::Point chk = c.pointAt(c.nearestTime(req)); to find the point nearest to the curve of the shape instead of opting for the top right visualBounds location. But this is left for the next iteration.

Tested with multiple shapes, transformations, different text types.

There's a small cleanup in the text tool which pushes the test for what should have knots to the knot handler itself, since it was seemingly duplicating code (and I think the rectangle adjustment node wouldn't have appeared on tool switching based on the logic there) so that should now work slightly better as well.

flow-feature

Edited by Martin Owens

Merge request reports