Text object to Path: get a single path instead of an outline

Post questions on how to use or achieve an effect in Inkscape.
inkedge
Posts: 3
Joined: Fri Mar 09, 2012 10:05 pm

Text object to Path: get a single path instead of an outline

Postby inkedge » Fri Mar 09, 2012 11:27 pm

I have a Text object (with a fill and no stroke) that I want to plot it with my cutplotter.
I turn the text object into a path and end up with a path representing the outline of my text.
So far, so good.
BUT:
This time I want to plot differently:
I do not want the plotter to cut along the "outline" of the glyphs, I rather want it to plot along the glyph's imaginary "middle line".
The conversion to path should work the same way converting a ellipse object to path works:
Converting the ellipse object gives me 1 path representing the ellipse fill's center.
Converting a text object gives me 2 paths, representing the inner and outer outline of the glyph.

Here is an illustration of what I mean:

Image
(the two node views on the right are in display mode "outline", so you cannot see the object's fills)

Can inkscape convert a text object to path in the same way it converts an ellipse object to path?
Preferably in one go.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Text object to Path: get a single path instead of an out

Postby brynn » Sun Mar 11, 2012 5:27 am

Image
Welcome to InkscapeForum!

Hhm, no I don't think that's possible -- not that I know how to do, anyway. But if you can explain a little more about your ultimate goal, we may be able to find a way to accomplish it. Because if you cut along such a path, well I don't know what use you'd have for that. But you must have some reason to want to plot that?

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Text object to Path: get a single path instead of an out

Postby druban » Sun Mar 11, 2012 5:51 am

brynn wrote:Because if you cut along such a path, well I don't know what use you'd have for that.


I think Brynn has said it precisely! Think of the letter 'J' for example. Even if you hand altered the converted text object to a single line and cut it, what would you have? A slit in your material....
Are you looking perhaps for the effect of a much lighter font, perhaps one with no contrast (that's the difference between thick and thin parts of the letter) and no serifs? There are users on this forum that have a lot of font knowledge that might be able to recommend the right font for your purpose if you tell us what it is.
Your mind is what you think it is.

inkedge
Posts: 3
Joined: Fri Mar 09, 2012 10:05 pm

Re: Text object to Path: get a single path instead of an out

Postby inkedge » Sun Mar 11, 2012 6:59 am

Thanks for the warm welcome :)
And your replies, of course.

The reason I want to this is because I "pimped" my cut plotter a little bit:
Instead of a cutting knife it holds a calligraphic pen.
Instead of a cutting a foil it draws on paper with ink.
So, the cut plotter's pen behaves just like the calligraphic tool in Inkscape.

The calligraphic pen has a rather wide nib (approx. 5mm) and draws beautifully ...
... as long as if it moves along a "single" path.
As soon as it moves along an outline, it often crosses its own path which spoils the result.

This is why I was wondering, if I could turn the outline of a text object into a "centered single inline".

llogg
Posts: 443
Joined: Tue Mar 11, 2008 7:30 am

Re: Text object to Path: get a single path instead of an out

Postby llogg » Sun Mar 11, 2012 11:45 pm

I'm fairly certain there's no automated way to accomplish this. You can sort of do it manually, but some letters will be more difficult than others.
Screenshot.png
Screenshot.png (128.64 KiB) Viewed 20668 times

1. In that screenshot you see on the top left I created a text object and converted it to a path.
2. I then did Path>Break Apart (ctrl-K) and deleted the interior loop path, though I think you could just delete those nodes without doing Break Apart. Then swap fill and stroke so there is no fill and only a stroke to get the top middle image.
3. I then deleted the nodes along the inside curve, broke the path between the "vertical" stroke of the letter and the "curved" stroke of the letter, and did Path>Break Apart to get the top right image.
4. I next did Path>Dynamic Offset (ctrl-J) on each of the paths in order to get the correct curves for a stroke along the midline of the letter. You see this on the bottom right.
5. I then converted the offsets to paths (ctrl-shift-C), broke the paths at the places where the curves were closed, and combined the paths (ctrl-K). This is the bottom middle image.
6. To get the bottom left image I simply did some node editing with :tool_node: .

Very tedious and not likely to be useful if you are really trying to get the cutter to write large blocks of text. You probably need code that lets your cutter/calligraphy machine interpret text as text in order to do this practically and efficiently.

EDITED to simply point out that the grey letter in the background of steps 2-6 is simply a duplicate I placed there to show the result of each step relative to the original letter shape.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Text object to Path: get a single path instead of an out

Postby brynn » Mon Mar 12, 2012 6:31 pm

Other than llogg's suggestion, I don't know of any way to do it.

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: Text object to Path: get a single path instead of an out

Postby ~suv » Tue Mar 13, 2012 4:11 am

inkedge wrote:(…) Can inkscape convert a text object to path in the same way it converts an ellipse object to path?
Preferably in one go.
No, there is no such feature in Inkscape. You ought to use real engraving fonts (based on strokes) instead of the normal fonts (based on fills).

Install the Hershey Text extension for Inkscape from the 'Egg-Bot' project and use it if you need text formatted with engraving fonts (aka centerline fonts).

inkedge
Posts: 3
Joined: Fri Mar 09, 2012 10:05 pm

Re: Text object to Path: get a single path instead of an out

Postby inkedge » Thu Mar 15, 2012 7:02 am

Thanks for your help, guys. I really appreciate it.

llogg, I like your detailed how-to. However, you are right: feasable for a few individual characters, but too cumbersome to for an entire characterset.

I guess ~suv got me on the right trak, i.e. using centerline fonts. Thanks man!

rockaukum
Posts: 1
Joined: Wed Feb 08, 2017 2:08 pm

Re: Text object to Path: get a single path instead of an outline

Postby rockaukum » Wed Feb 08, 2017 2:13 pm

I stumbled upon this in search of the same thing for a different reason. I use inkscape (v.91) for design to apply gcode for a cnc router. There are times I want to just do a simple one line characters with a v bit or straight bit. I am wondering if there is now a way within inkscape to accomplish this?
Thanks much,
rockaukum

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Text object to Path: get a single path instead of an outline

Postby tylerdurden » Thu Feb 09, 2017 1:08 am

I'd take a look at the Hershey font extension in the menu: extensions > render.
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/


Return to “Help with using Inkscape”