17 Commits

Author SHA1 Message Date
Nikolaus Waxweiler
01328213c7 Remove __future__ imports 2019-08-09 12:20:13 +01:00
Behdad Esfahbod
f3bfea12c6 Add __all__ to pens that didn't have it 2017-02-21 12:01:10 -06:00
Behdad Esfahbod
d8e8a657fa [areaPen] Remove unnecessary docstrings 2017-02-21 12:01:10 -06:00
James Godfrey-Kittle
238e8cbc52 Typo 2016-10-04 17:32:49 -07:00
James Godfrey-Kittle
870b7ce92a Allow single-point open contours in area pen
Sometimes an anchor is drawn as a moveTo followed by an endPath, for
that case it makes sense just to ignore and count the area as zero.
2016-10-04 16:27:09 -07:00
Behdad Esfahbod
220ff2b238 [pens.areaPen] Clean up a bit
Based on discussion in
https://github.com/behdad/fonttools/pull/618#issuecomment-226105824
2016-06-15 14:10:44 +04:00
Cosimo Lupo
d51b88a234 areaPen.py: remove unused 'interpolate' function; call polygon_area directly in closePath 2016-06-12 11:37:02 +01:00
Cosimo Lupo
39f919f1f1 areaPen.py: calculate area under quadratic curve directly, using Green theorem 2016-06-12 03:14:09 +01:00
Cosimo Lupo
5f0e48e649 areaPen.py: make sure the first and last points of contour overlap 2016-06-12 03:13:32 +01:00
Cosimo Lupo
38359b054d areaPen.py: invert sign of area (CCW is now positive) 2016-06-12 03:12:02 +01:00
Cosimo Lupo
eb7e193773 areaPen.py: typo 2016-06-11 23:07:23 +01:00
Cosimo Lupo
76dc5d2607 areaPen.py: use tabs for indentation as that's the norm in fontTools
(despite I prefer spaces)
2016-06-11 23:07:23 +01:00
Cosimo Lupo
2dc88be8a7 areaPen.py: remove unused 'distance' function 2016-06-11 23:07:23 +01:00
Cosimo Lupo
2cb93ee7dd areaPen.py: hook up quadratic_curve_area to AreaPen._qCurveToOne method 2016-06-11 23:07:23 +01:00
Cosimo Lupo
ac3b30e0db areaPen.py: add default __future__ imports 2016-06-11 23:07:23 +01:00
Cosimo Lupo
ad4b94f4b9 areaPen.py: use regular tuples for points instead of namedtuple 2016-06-11 23:07:23 +01:00
Cosimo Lupo
046333dda5 areaPen.py: pen to calculate the area of a glyph (by Behdad)
https://github.com/behdad/fonttools/issues/617#issuecomment-225029592
2016-06-11 23:07:23 +01:00