TrueType Kinks vs PostScript Curves

I recently noticed a huge difference between the OTF and TTF versions of some fonts I exported:

Outline Flavour TT is producing these kinds of kinks/flat curves where there aren’t any in the OTFs.

I’m aware there is a “laser beam” in the construction, but in this case it’s intentional. Anyway, I wouldn’t expect such a difference between TT and CFF exports. I also tested it with a random converter, and the result is smoother than the outlines exported by Glyphs.

I’m okay with exporting WOFFs with CFF outlines (although that’s not my standard workflow), but I would like to have some static TTFs with a much better result.

can you show how the outlines lock in Glyphs in edit mode?

I believe the inflection is unintentional? If so, you can optimise the curve, i.e. change the angle into a steeper position and balance the curve handles on the big segment. Then the TT conversion is going to be much better.

Install the Show Angled Handles plugin and it will show you the problem (red X will appear on the top handle). With the plugin you will understand how to re-position them.

Also, Show Kinks is a useful plugin for these kind of proplems.

Try to change BCP’s position to red line.

1 Like

Everything on this outline is intentional. I built it this way so I could control 100% the interpolation between the 2 masters. I’m happy with the curves (CFF), the construction logic is replicated in other glyphs and it works on the system. This is a very display design and I want to make sure there is no kink on these segments.

@knikola I starting my post this way:

I have them. Thanks for the tips anyway.

The point was not the construction but the result of the curve on the TT export. I understand technically I don’t have the most balanced handles but I would like to make the best possible exports with them.

At the end, I will probably add a 3rd point to control this curve on the ttf exports.

What makes the conversion from CFF to TrueType harder: unbalanced handles or inflections?

Inflections seems to be more problematic, but I would need to do some more testing.

Also, is it possible to have an Alternate Glyph (similar to the “Rename Glyphs” custom parameter) that is used only for the TTF export? For example:

if outline Flavour == “TrueType”:
n.part = n.part.ttf

Can you try with this balanced BCP’s

curve.glyphs (5.2 KB)

Adding a third point will probably introduce even more problems after the conversion to TTF because it will add another one on top of that.

Hmmm. Not sure. The top handle is unnecessarily long. I don’t think the inflection in the curve segment makes sense for the shape. What does the other master look like? Or is the image with the two curves next to each other showing both masters?

1 Like

Having to adjust the handle relations means that the TT converter is not perfect (I know it’s a difficult task ad Glyphs is handling it very well already). Let’s not pretend there is any flaw in the way Francisco has drawn the curves.

1 Like

That’s it. On the image you have the 2 masters segments that will interpolate.

Maybe try it the other way round: Interpolate with a hand-edited TrueType curve, and have it automatically converted to cubic on (CFF) export?

(The selected point is necessary to model the inflection)

Or insert a point at 45° in the cubic curve. (The Red Arrow plugin is flagging the inflection there)

Yes, that’s my solution already. I tried it and it works better of course but I was trying to avoid it. At the end, that’s a different curve.

Thanks for all the suggestions. Again, my point was not the construction, but the CFF > TT conversion on a design like this.

Thanks @TimAhrens for understanding it :slightly_smiling_face:

TrueType curves can only represent certain shapes because of the underlying math. That means converting cubic curves to TrueType can be tricky. So if you need TrueType, sometimes, you need to compromise with the setup of the cubic curves.

1 Like