ufo-spec icon indicating copy to clipboard operation
ufo-spec copied to clipboard

`smooth` attribute in `point` element is unclear

Open drj11 opened this issue 2 years ago • 4 comments

Refer to https://unifiedfontobject.org/versions/ufo3/glyphs/glif/#point

The text is:

This attribute must only be given when type indicates the point is on-curve. When set to yes, it signifies that a smooth curvature should be maintained at this point, either as a curve point or a tangent point in Fontographer terms. This attribute may be set for all point types except offcurve.

  • Referring to Fontographer is bad. Especially for those of us that have never used it.
  • The way "curvature" is used here can't be consistent with its usual mathematical sense.

I expect the intention is that the curve's tangent going into the point is the same as the curve's tangent leaving the point. This is not the same as a smooth curvature.

Can we say that:

"When set to yes, it signifies that the curve is smooth at this point: the tangent entering the point is the same as the tangent leaving the point. This means that the previous point, this point, and the next point are colinear (up to the chosen precision)."

drj11 avatar Jun 03 '22 13:06 drj11

It is purely a flag for edit behavior. It doesn't necessarily say the curve is smooth at this point, but rather that an editor should try to constrain the surrounding handle(s) to keep/make smoothness.

But yes, a better formulation here is definitely a good idea.

justvanrossum avatar Jun 03 '22 13:06 justvanrossum

if you're fine with "this is a flag used by willing editors" then so am i. ;)

drj11 avatar Jun 03 '22 13:06 drj11

While we're nitpicking: the flag only makes sense on an on-curve point with at least one off-curve neighbor. It is meaningless if both neighbors are on-curve.

justvanrossum avatar Jun 03 '22 13:06 justvanrossum

Yep. I did pick that up in my reading, but even i have only a certain budget for nitpicking. But also the UFO spec has plenty of room for people to create meaningless UFO files.

drj11 avatar Jun 03 '22 14:06 drj11