Wednesday, January 14, 2015

Convert from double to single line font trix - find centerline

I have several "normal" double line fonts that I'd like to convert to single line fonts. There is many ways to do this. I know of none effective and automatic. Here I show one of the partly automatic, but still pretty ineffective ways I've found to do this and some step-by-step images.

I found this topic in Inkscape forum that discuss how to find the centerline of lines from drawings and the extension interpolate was suggested so I tried it and think it works good. To get it right and to make the single line draw the path one would with handwriting we need to add som manual preparation before using the extension on the glyphs.

So here is an example for the simple glyph c and the more complex d. I have used the font League Script that I found on fontsquirrel.com. Lets start with the simple c. Type the letters and convert to path. Turn on stroke and off fill.

Cut the double-path at the positions where the centerline path should start and stop. Break apart the two paths (Ctrl+Shift+K). Reverse one of the two paths to make the start and end point of the two paths match.

Select the two paths and go to Extensions->Generate from path->Interpolate and use steps 1 and do not duplicate endpaths. Apply.

Now I have the centerline as a new path. I have colored it red to better show the result.

Now, lets advance to the d. Here I have a plan to cut the final d-path into three parts; the ring, the top and the tail. The red dots show where I have cut the paths. For each of the three parts I have two paths (inner and outer if you like) that will be interpolated. The closed paths (inner ring and inner top) also have to be cut close to the position of the start and end for the outer paths.

Here I have the interpolated ring.

and the top

and the tail.

Removing the original paths I now have three paths to combine. First I combine the paths using Ctrl+K. Then I think of how I would write this by hand and combine the end nodes of the ring and top according to that

and continue to combine the top with the tail.

Now - the rest of the alphabet...

No comments:

Post a Comment