question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PointInsidePen failure

See original GitHub issue

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()

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:30 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
behdadcommented, Jul 20, 2016

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

0reactions
behdadcommented, Aug 11, 2016

@miguelsousa Should be fixed. Though, I’d argue that contours without endPath or closePath are incomplete.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pointPen — fontTools Documentation - Read the Docs
A PointPen has a very simple interface, it just steps through all the points in a call from glyph.drawPoints(). This allows the caller...
Read more >
ImportError: No module named Numeric - Google Groups
hi guys. i have a problem using the pointInside function. it has worked before, but somehow got screwed after i downloaded and installed...
Read more >
8b3c57bdcbbbd9cb1dc98546b567a138207b7638 - platform ...
... Doc/source/pens/perimeterPen.rst[Added - diff]; Doc/source/pens/pointInsidePen.rst[Added - diff] ... Lib/fontTools/feaLib/error.py[Added - diff] ...
Read more >
Fixing Failure Points: Crash Course Kids #42.2 - YouTube
Now that we've talked about failure points, let's talk about how to fix them. In this episode of Crash Course Kids, Sabrina shows...
Read more >
Ubuntu – File list of package python3-fonttools/bionic/all
... /usr/lib/python3/dist-packages/fontTools/feaLib/error.py ... /usr/lib/python3/dist-packages/fontTools/pens/pointInsidePen.py ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found