Skip to content
This repository has been archived by the owner on Aug 9, 2023. It is now read-only.

Commit

Permalink
pens: add workaround for BasePointToSegmentPen bug
Browse files Browse the repository at this point in the history
Fixes trufont/trufont#595

We shall remove this workaround once ufoLib is fixed upstream
  • Loading branch information
anthrotype committed Oct 11, 2018
1 parent 041f424 commit e755f58
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Lib/cu2qu/pens.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,13 @@ def _drawPoints(self, segments):
for (pt, smooth, name, kwargs) in offcurves:
pen.addPoint(pt, None, smooth, name, **kwargs)
pt, smooth, name, kwargs = points[-1]
if kwargs is None:
# ufoLib BasePointToSegmentPen incorrectly sets kwargs to
# None for the special quadratic contour with no on-curves:
# https://github.com/unified-font-object/ufoLib/
# issues/11#issuecomment-429033328
# TODO(anthrotype) remove workaround once fixed upstream
kwargs = {}
pen.addPoint(pt, segment_type, smooth, name, **kwargs)
else:
# 'curve' segments must have been converted to 'qcurve' by now
Expand Down

0 comments on commit e755f58

Please sign in to comment.