Exported variable font adding points to curved paths

I just exported an early test for a variable font I’m working on and ran into this issue when testing in Illustrator. It’s adding a bunch of points that don’t exist in the design. Consequently the paths appear jagged.

Has anybody else ran into this issue / know what might be causing this to happen?

In OTVar export, all curves are converted to TT, and what you see in illustrator after converting to paths is a conversion from TT back to PS. Would surprise me if it was the same points after converting twice.

The kink may already be caused in the PS curves. I assume the triplet of points around the inflection change their angle and their proportions throughout the masters?

@mekkablue thanks for your response. In theory that all makes perfect sense. Still figuring out the quirks of variable fonts for sure!

Double checked and there are no issues in my PS curves and OTFs generated from my instances don’t have kinks.

I just expanded some default variable fonts in Illustrator (like Minion, Myriad, etc.) and the curves + points reflect original PS curves. Any idea how they were able to achieve this? Expanded a couple variable fonts from small foundries and those tended to reflect the TT curves converted to PS.

The kinks are only really visible in the tight counters at the heaviest weight.

Most default font use the qubic bezier path directly. Only variable font (mostly) use TrueType curves.

These are CFF2 fonts with PS outlines.

Try to get rid of inflection points wherever your design allows it. Try to sync node proportions or angles across masters where it is not possible. Good tools for this:

  • mekkablue scripts > Interpolation > Kink Finder and Dekink Master Layers
  • Window > Plugin Manager > Show Smooth Node Angle and Proportion
1 Like

Even without inflection points in the masters, the conversion to quadratic curves will put nodes there, which will probably kink unless you have a way of controlling the conversion or the quadratic handles directly.

One way that avoids kinks is to make sure the handles on each side of the inflection are identical in length and angle in all masters. But that may not give you the curves you need.

1 Like

Thanks for all this insight and taking the time to answer these questions!

@mekkablue suppose my final questions would then be if there’s currently a way to generate CFF2 variable fonts with Glyphs? If there isn’t, do you know what platform is used to generate these files? Understand that CFF2 aren’t widely supported yet on all browsers, so thinking more for desktop usage.

Thanks for directing me to the scripts / plugins as well. I’ll give those a play to see how it affects the curves!

You would have to do CFF2 with fontmake I believe. It takes a .glyphs file as input with the -g option.

The kinks happen where a curved path is too flat (goes along the handle and doesn’t curve for too long). I guess it confuses the converter and it adds a bunch of nodes there, resulting in kinks. Either change the angle of the handles, or add extra nodes to have a real flat part:

Then you need to keep proportions or angle between all 4 points (2 handles, 2 nodes) in all masters to avoid kinky interpolation. Tricky but possible!

I think this would be good to add to the tutorials by the way

1 Like