-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
should a qcurve segment not preceded by any offcurves be interpreted as a straight line? #211
Comments
not sure if relevant here but I noticed that the fontTools BasePen (the mother of all pens!), while it does handle the variable number of off-curves in the def qCurveTo(self, *points):
n = len(points) - 1 # 'n' is the number of control points
assert n >= 0 /cc @justvanrossum @typemytype @jenskutilek EDIT: it totally is expected if you understand the difference between |
That's for sure the intention. |
oops sorry... can't even read python code. |
When constructing a pathops.Path using the PathPen, we should handle variable number of point arguments to curveTo and qCurveTo, following fontTools' BasePen which is the blueprint of all segment-based pens. https://github.com/fonttools/fonttools/blob/35856412485bce4a1e6c08cceb52c7a87c75c4ee/Lib/fontTools/pens/basePen.py#L274-L329 Also see unified-font-object/ufo-spec#211 and googlefonts/ufo2ft#468 (comment)
The current GLIF point types spec currently says about "curve"
https://unifiedfontobject.org/versions/ufo3/glyphs/glif/#point-types
For the "qcurve" quadratic curve segment type, it simply says:
It does not explicitly say what to do in the case of zero offcurve points preceding the oncurve point marked as "qcurve".
I think this situation should also be interpreted as a straight line, which it also appears to be what Robofont does.
Maybe the UFO spec should be updated to mention this explicitly if that's the case.
This issue came up in googlefonts/ufo2ft#468 (comment)
The text was updated successfully, but these errors were encountered: