I recently found out that I could do perfect one-line fonts using built-in function "centerline autotrace". However, the action itself takes 10 steps, and I really wanted to make it into macro or extension so it could be used in a single click. However, I am stuck cuz I can't find out how to use couple of functions from Python.
The macro should be doing next things in order:
Check if text (or path) is selected.
Write its Width, Height to a variables fWidth/fHeight. Also remember its X, Y position to variables fX, fY.
Scale the selection 500 times.
Rasterize selection (Alt + B).
Remove object in p.3.
Use Centerline Autotrace on p.4.
Remove object in p.4.
Scale object p.6. to match bigger size from p.2. proportion locked.
Restore position of p.6. object to p.2's fX and fY.
The problem is - I couldn't find how to do p.4 and p.6 through python script. If anybody can help, it would be greatly appreciated.
I recently found out that I could do perfect one-line fonts using built-in function "centerline autotrace". However, the action itself takes 10 steps, and I really wanted to make it into macro or extension so it could be used in a single click. However, I am stuck cuz I can't find out how to use couple of functions from Python.
The macro should be doing next things in order:
The problem is - I couldn't find how to do p.4 and p.6 through python script. If anybody can help, it would be greatly appreciated.
Most of the functions of the main Inkscape GUI are not available to the extension system directly.
However most of them are available from the Inkscape command line.
They can be accessed by doing a command call in the background on a temporary file, then loading the resulting file back into the extension system.
--- However Tracing functions are not one of these, they are not available to to the Inkscape command line.
Prior to Inkscape version 1, there was a centreline trace extension for Inkscape 0.923
It used autotrace separately to the main Inkscape program.
However it is Python 2 only I believe ?
https://github.com/fablabnbg/inkscape-centerline-trace