Corner components + Mask + Variable TTF = 🥲

I’m working on a variable font with a rounding axis and I use corner components to handle the rounding. (This way I can simply copy and paste the outlines between the masters.)

The corners are made with 2 points and 2 handles, scaled down to w/h: 0 in the sharp master. This exports to variable TTF just fine, so the corners themselves don’t seem to be the problem.

Screenshot 2024-04-17 at 17.45.06 Screenshot 2024-04-17 at 17.45.13
Sharp master (left), Rounded master (right)

However, when I try to mask a component that uses the corners with another object, I get outline incompatibility error on export. I’ve been trying to figure this out for days and I noticed a few things:

  • When I export to static TTF, Glyphs adds extreme points to the rounded corners.
  • When I export to variable TTF, Glyphs doesn’t add any extra points, just decomposes the corners exactly as they are.
  • The export doesn’t work if I use a stroke as a mask (left).
  • The export does work if I do the subtraction manually (right).
  • Interestingly, the export works if the eye is crossed only halfway, even if the mask is a stroke and Glyphs does the expansion and subtraction itself. The only difference I can think of here is that the result is a single outline, not two.

Knowing all this, I suspect that the problem might be that Glyphs adds extreme points to the rounded corners when doing the decomposition and subtraction of the mask? And if it doesn’t need to process the mask, it just decomposes the corners as they are?

I can of course draw everything manually and not rely on reusing any components, but given how large the glyph set will be, solving this would be a huge help. Thanks!