Avoid self interecting path after OffsetCurve custom parameter

Hi guys !
Still working on my font.
I created instances with custom parameters, and I’m experiencing something I don’t figure out how to fix :
The path of one of my instances has to be shrinked. So I use this parameter :
OffsetCurve; -25; -25; 0; 0.5
But this creates self intersecting paths… Is there a way to avoid that ?

Thanks !

The problem is that those intersections span two segments. Detecting that is a bit more tricky. I can’t promise to improve that any time soon.

Ok thanks, so there is absolutely no way to avoid that ?

What outcome do you expect?

My goal is to create a hatched style, but I don’t want the lines going through the whole letter surface, that’s why I need to shrink the paths before applying the “Hatch Outline” filter.

So I don’t want the strange artefacts at the corners.

BTW for an unknown reason, the hatched lines are not centered inside the character, that’s why I need to move them downward like I said in this post.

Where do you check? In Adobe apps? The way the first baseline offset is calculated by the app may interfere.

The shift appears in Photoshop & Illustrator.

You can try the “Delete Small Paths” filter to remove the debris. You might need a “RemoveOverlap” for that.

I tried to add “Remove Overlap” and “DeleteSmallPaths” filters as you can see in the capture below. These are the Custom Parameters for my “Hatch” instance.

And here is the result in the Adobe Apps. As you can see, it has no effect on the weird intersecting artefacts:

This capture shows well that they are some differences between Id, Ps and AI on the way they put the font upward or not… strange, isn’t it ?

The offset comes from the wrong calculation of the first baseline. Illustrator uses the top of the bounding box of the lowercase d. So you need to make sure that all d’s in all styles have the same top point.

You don’t need the second DeleteSmallPaths and RemoveOverlap. And maybe try a bigger number in the DeleteSmallPaths filter?

Oh… OK ! I didn’t know about that “d” rule :grinning: thanks @GeorgSeifert
But as my styles are automatically generated with Custom Parameters, how can I make sure that my d’s have the same top point ?

I tried to increase the number in the DeleteSmallPaths parameter, but it deletes some of the hatched lines… but not the unwanted ones :sob:
So I think I’ll have to edit the exported OTF characters one by one…

Don’t do the deletesmallpaths after the hatching. Only before.

I did. But what is the unit for the DeleteSmallPath filter ?
Because I tried to increase it A LOT, and it seems that it works only until a certain value…
Take a look a this :

How can you explain that there is still really small piece of lines ?

Here are my font’s informations BTW :
Capture d’écran 2020-12-11 à 09.38.06

The DeleteSmallPath was mostly meant to remove the outside self intersections. You can use a second pass to remove very small hatched bits, but with a smaller value.

The order of the filters is important. So if the hatching comes after the DeleteSmallPath, its results will not be filtered.

Thank you, @GeorgSeifert I have good results using these settings :

I’ll fix the outside self intersect paths by hand, it’s not a big deal.