Wrong Path Direction

When I try to generate a variable font from properly interpolating TT source, Glyphs 3 changes all path directions, they get a PS direction.

PS based fonts need to be reversed (and converted to quadratic curves of cause). But for paths that have only lines, it is not clear if they are meant to be cubic (CCW) or quadratic (CW). So if you have TrueType outlines in a .glyphs file, they need to be CCW, too. Then Glyphs can safely reverse all outlines. Opening a .ttf will automatically revert.

According to the specifications, TrueType paths have black on the right.
I opened an externally generated Glyphs file with proper path directions, and when I generate a font, all paths are wrong, I do not consider that “safely reversing”, but a serious export bug.

If it is because Glyphs would have difficulties figuring out if paths with straight lines are PostScript or TrueType then maybe Glyphs should not try to figure that out :slight_smile:

I have always worked with TrueType outlines that have the right direction, I do not want to work with wrong outlines.

The spec you mentioned is relevant for curves inside an OpenType font.

The spec for the .glyphs file format says that all path need to follow the PS direction.

About the “safely reversing”. What you expect to happen for a font that has only line segments and export as .otf (CFF) and as .ttf (glyf). One of the file will be wrong?

I expect black on the left for CFF and black on the right for TTF, both right :slight_smile:

But how should Glyphs know if you drew your paths the CFF way or the TT way? And what if some glyphs are TT and some are CFF (can easily happen if someone opens a TTF and adds some new glyphs/shapes).

Glyphs could check the directions of the outer paths to make an educated guess if the font is mostly TT or CFF. Other professional apps also don’t always get it right with the path direction, so it might be a yet unsolved challenge to come up with a watertight algorithm.
I like to get an export warning:
inconsistent path directions detected, adjust/don’t adjust.
and then I would like to see which glyphs were modified, to visually check them.

My system is very watertight. A very simple rule and always correct results for export in any direction (TT and PS outlines to both .ttf and .otf).

When Glyphs generates a variable TrueType font with PostScript path directions (no warning) I do not consider it a watertight system. Drawing with TrueType outlines whose direction is against the TrueType specification is confusing for users that read specifications.