From cbbe45a7654a0481dcfe2de1877c990a57a6c451 Mon Sep 17 00:00:00 2001 From: Jens Kutilek Date: Fri, 26 Aug 2016 11:02:18 +0200 Subject: [PATCH] Bugfix for float comparison in fractional coordinate tests --- RedArrow.glyphsReporter/Contents/Info.plist | 6 +++--- .../Contents/Resources/outlineTestPen.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/RedArrow.glyphsReporter/Contents/Info.plist b/RedArrow.glyphsReporter/Contents/Info.plist index 3ec2415..f688413 100644 --- a/RedArrow.glyphsReporter/Contents/Info.plist +++ b/RedArrow.glyphsReporter/Contents/Info.plist @@ -19,15 +19,15 @@ CFBundleSignature ???? CFBundleVersion - 52 + 53 CFBundleShortVersionString - 0.5.2 + 0.5.3 UpdateFeedURL https://raw.githubusercontent.com/jenskutilek/RedArrow-Glyphs/glyphs2/RedArrow.glyphsReporter/Contents/Info.plist productPageURL https://github.com/jenskutilek/RedArrow-Glyphs productReleaseNotes - Respect the grid and grid subdivisions, don’t display arrows in preview modes. + Respect the grid and grid subdivisions, don’t display arrows in preview modes. Bugfix release. LSHasLocalizedDisplayName NSAppleScriptEnabled diff --git a/RedArrow.glyphsReporter/Contents/Resources/outlineTestPen.py b/RedArrow.glyphsReporter/Contents/Resources/outlineTestPen.py index a91f7bb..dc69eb1 100644 --- a/RedArrow.glyphsReporter/Contents/Resources/outlineTestPen.py +++ b/RedArrow.glyphsReporter/Contents/Resources/outlineTestPen.py @@ -317,7 +317,7 @@ def _countQCurveSegment(self): def _checkFractionalCoordinates(self, pt): if self.fractional_ignore_point_zero: pr = round_point(pt, self.grid_length) - if pr == pt: + if abs(pr[0] - pt[0]) < 0.001 and abs(pr[1] - pt[1]) < 0.001: return False else: if type(pt[0]) == int and type(pt[1] == int):