Skip to content

Commit d872d29

Browse files
authored
Fix mathinfo (#137)
* Proposed fix. * It seems addition is different from subtractions.
1 parent b2b31b0 commit d872d29

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Lib/fontMath/mathInfo.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,17 @@ def _processMathOne(self, copiedInfo, otherInfo, ptFunc, func):
6060
else:
6161
v = self._processMathOneNumber(a, b, func)
6262
elif a is not None and b is None:
63-
v = a
63+
#v = a
64+
if func == add:
65+
v = a
66+
else:
67+
v = 0
6468
elif b is not None and a is None:
65-
v = b
69+
#v = b
70+
if func is add:
71+
v = b
72+
else:
73+
v = 0
6674
if v is not None:
6775
setattr(copiedInfo, attr, v)
6876
# special attributes

0 commit comments

Comments
 (0)