0

I start with an "i" in Chalkboard SE, font size 32 and stroke width 8px. Then I click "Path > Stroke to path" and the design now has a hole in the middle of the dot of the i. The larger the stroke width, the larger the hole, but only in the dot of the "i", not in the main body. Illustrator also gives the same result (after Expand of Object and Fill and Expand of Fill and Stroke, then hiding the fill).

Object before stroke to pathObject after stroke to path

Even more puzzling, with a French cursive font (direct link to .ttf font here), the "i" with font size 47.5px, stroke width 5 pixels, with stroke path expanded and united with the original object still has two holes, one in the middle of the dot of the i, another small one at the end of the tail to the right. Illustrator does not produce this second hole.

cursive i with extra hole in the tail

How can I avoid the holes in converting from a stroke to a path?

Update: After @Moini suggested the dynamic offset and "object to path" in an answer, I tested with j in cursive standard and also got a hole in the body of the j. Notice the anchor points inside the outline of this screenshot:

hole in the middle of cursive j with dynamic offset

Of course, I could remove the hole by hand, but I want to use the stroke width or path outset programmatically, so fixing it by hand afterwards is tedious.

Second update: I tried stroke width and all the relevant commands under the menu item "Path": outset, dynamic offset, and linked offset. I found no solution. I attach a picture below that summarizes this issue. Expanding an "i" with stroke width produces a hole in the middle, the outset command turns a straight line into a curved line so I didn't try further, and both dynamic offset and linked offset create extraneous paths inside the region that would mess up the design for the laser cutter. I tried both "Object to path" and "stroke to path".

Summary of the issue with stroke width, outset, dynamic offset, and linked offset

5
  • 1
    why not use object to path you will still have control over stroke and fill
    – Junme
    Jun 24, 2018 at 12:53
  • I want to export this as DXF for LaserCut 5.3, which ignores stroke widths. So to export an object with an offset, I need to convert the stroke to a path. I also tried the command Path > Outset and got weird, non-smooth results where the offset of the straight side of the i is not straight. Jun 24, 2018 at 13:31
  • @mmorin does any of the other offtset functions work better?
    – Moini
    Jun 27, 2018 at 12:43
  • @Moini the dynamic offset does not work when I tested with the letter j and I updated the question with that. I am looking for a programmatic solution and the solution by z3z would require manual inspection and intervention to select the holes that should disappear and those that shouldn't, e.g. the hold in the leg of the j should disappear but not the hole near the top. Are those the offset functions you mean? Jun 27, 2018 at 14:51
  • @mmorin In the menu, there are a couple of those, all below each other. I don't know if they all work the same way. I suspect the inset and outset functions might work differently. Also try if setting the fill-mode (heart-shaped icon in the fill+stroke dialog) to the solid option changes anything.
    – Moini
    Jun 28, 2018 at 11:41

2 Answers 2

2

After converting the stroke to path, use Break Apart, then Union (both on the path menu). Using Keyboard shortcuts, you'd do...

Convert Stroke to Path

Ctrl + Shift + K

Ctrl ++

4
  • This fix works for the "i" in particular, but not for the "j" in cursive font, because the leg of the "j" has a hole that I want to keep, and breaking apart and uniting makes that hole in the leg disappear. Jun 24, 2018 at 14:04
  • @mmorin If you want to keep the hole, then you could outset the outline, not the hole. You'll need to break apart the hole first obviously, then afterwards you'll need to combine them.
    – Billy Kerr
    Jun 24, 2018 at 21:07
  • @BillyKerr in that case the hole would not be outset, for example in the leg of the "j". In any case, I am looking for a programmatic solution and I added that in the question. Jun 25, 2018 at 7:32
  • @mmorin then you could inset the hole separately, just not so much that it disappears.
    – Billy Kerr
    Jun 25, 2018 at 8:27
1

You could use an offset instead.

Select path.
Path > Dynamic offset.
Drag on offset node with node tool until you like the result.
Path > Object to Path.

1
  • that worked for some letters but not for others and I updated the question with that. Jun 24, 2018 at 19:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.