fonttools: PointInsidePen failure

The test point is clearly outside of the test contour, but the result of PointInsidePen is True.

from fontTools.pens.pointInsidePen import PointInsidePen

def testContour(pen):
    pen.moveTo( (727.546875, 697.0) )
    pen.curveTo( (722.953125, 697.953125), (718.109375, 698.515625), (712.9375, 698.515625) )
    pen.lineTo( (504.375, 698.515625) )
    pen.curveTo( (487.328125, 719.359375), (507.84375, 783.140625), (555.796875, 783.140625) )
    pen.lineTo( (717.96875, 783.140625) )
    pen.curveTo( (738.890625, 783.140625), (748.796875, 711.5), (727.546875, 697.0) )
    pen.closePath()

testPt = (416.625, 783.140625)

piPen = PointInsidePen(None, testPt)
testContour(piPen)
print piPen.getResult()

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 30 (16 by maintainers)

Commits related to this issue

Most upvoted comments

Passing again. Hopefully this one will stick for a while.