Cosimo Lupo
df10cdea05
Use fonttools' ReverseContourPen
...
Fixes #51
2017-10-30 18:56:02 +00:00
Cosimo Lupo
13abea3ca5
[pens] fix number of segments reported in stats
...
It appears we were reporting the 'stats' differently in the pens and
in the main ufo module.
https://github.com/googlei18n/cu2qu/blob/7a2f638/Lib/cu2qu/ufo.py#L148
You can git blame me, sorry.
Funny how it's been broken for almost two years :)
2017-10-25 18:49:19 +01:00
Cosimo Lupo
153404077d
[pens] remove ReverseContourPointPen copy; import it from ufoLib (v2.1.0)
...
... or from robofab (I haven't tested the latter though)
2017-05-24 19:05:14 +01:00
James Godfrey-Kittle
039e35b212
No error returned from API, update tests
2016-07-27 13:21:47 -07:00
Cosimo Lupo
ae2eb8d4df
cu2qu.pens: make sure closed contour starts with an on-curve
...
This is still the same contour as before, as UFO spec allows both;
it's just normalized so that the first segments' off-curves appear at
the bottom, and the first point in the contour is an on-curve.
2016-07-21 11:35:41 +01:00
Cosimo Lupo
a246bcfdbd
[pens] add "super bezier" support to Cu2QuPointPen
2016-03-25 19:55:38 +01:00
Cosimo Lupo
8e3c6ce5a2
[pens] minor comments and assertion error message
2016-03-25 19:55:08 +01:00
Cosimo Lupo
c5bd215e2f
[pens] add assertions esuring that Cu2QuPen methods are called in the right order
2016-03-25 14:26:33 +01:00
Cosimo Lupo
a79ea7e126
[pens] set smooth=False for offcurve points in new quadratic segments
2016-03-18 15:41:44 +00:00
Cosimo Lupo
4f6d04bcf3
[pens] don't use super() for compat with robofab's old-style classes
2016-03-18 15:40:16 +00:00
Cosimo Lupo
84f24b189b
[pens] fix imports for robofab pens
2016-03-16 18:58:06 +00:00
Cosimo Lupo
9fcca0f5c5
[pens] call lineTo if len(points) == 1 in qCurveTo()
...
we were alrady doing that in curveTo, so we might well do it here too
2016-03-16 10:39:06 +00:00
Cosimo Lupo
adaa9fc242
[pens] add docstrings; make ignore_single_points=False by default
2016-03-16 10:14:05 +00:00
Cosimo Lupo
a7ed9c8cc1
add pens module containing Cu2QuPen, Cu2QuPointPen, ReverseContourPen and ReverseContourPointPen
...
I copied the ReverseContourPointPen from the robofab.pens. I think it's useful for the Cu2QuPen to
have a `reverse_direction` argument which inverts the contours' winding direction. I didn't want to
add a dependency on robofab, since things are in transitions... We will add it to the future "penBox"
package (or whatever it'll be called) once that is set up.
2016-03-15 19:49:23 +00:00