Correct path direction for all masters often makes glyphs MM incompatible

Just tried the Correct path direction for all masters in Comfortaa, https://github.com/googlefonts/comfortaa.

It ended up making the following glyphs incompatible.

50

Glyphs v2.5.1 (1141)

Hi Mark,
Check the start points and master compatibility. There are the problems.
et

The issue is that the start points and master compatibility is correct before applying “correct path direction”

Hi, Dave
Yes, all glyphs are compatible until correct directions for all masters in all glyphs is applied.
I opened the source file and check it.
The issue can be solved manually.
et

I’d suspect that some of that may result from masters in which the bottom-most point is different. E.g. on the ß, maybe for one master the bottom left corner of the stem is lower than the bottom node of the bowl, while on another it isn’t. Glyphs assigns lowest (and then leftest) node as the starting node when correcting paths.

2 Likes

Thank you all for your replies.

Imo, correcting a path’s direction should happen without altering the starting points.

The command does three things; it:

  • corrects path direction
  • reorders paths
  • resets start points

Each of these applies heuristics, and each of these can break compatibility.

At the moment, you could do your own algorithm iterating through all GSLayer.paths and setting GSPath.direction (-1 for counterclockwise or 1 for clockwise) attributes.

Thank you Mekkablue!

I’ll spin my own.

@Marc_Foley did you spin your own?

I thought I’d try resurrecting this old thread as I also don’t see why “Correct path direction” needs to break compatibility of masters that were already compatible. The problem is that the pairing of the paths gets messed up and I often need to do “Fix compatibility” manually afterwards.

How about a simple heuristic that doesn’t alter the pairing of the paths if they were previously compatible?

The algorithm is not particularly smart. It used the size and proportions. And those can be different in different masters. It’s on my list to improve this.

Thanks for your reply, Georg. Is this something I might be able to help out with?

Irrespective of the “smartness” of the algorithm, my suggestion for a feature request would be to split this function up into its three constituent parts, making it possible (e.g. via a dialog box or other keyboard shortcut) to just run one of them.