unified-font-object / ufo-spec

The official Unified Font Object specification source files.
http://unifiedfontobject.org
174 stars 30 forks source link

`smooth` attribute in `point` element is unclear #209

Open drj11 opened 2 years ago

drj11 commented 2 years ago

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.

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)."

justvanrossum commented 2 years ago

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.

drj11 commented 2 years ago

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

justvanrossum commented 2 years ago

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.

drj11 commented 2 years ago

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.