Open uebele opened 2 years ago
I get the same. Adding a check like if value and value < 77000
resolves the issue (same for existing_value
and exception_value
).
This is fixed in pull request 35d4772829c6a87bbc0c49d37e39ebfbc32f8d7d
font.kerningForPair()
will always return None if there is no pair so the check could be
if value is not None:
Other API (specifically the core objc methods) might return NSNotFound
. But in this case the check agains Null
is fine.
That's what I wrote, if value is not None
is the same as if value
, or am I mistaken?
Ah, wait. if value is 0, that would fail the check. So if value is not None
is correct. Thanks!
I get an error message:
Traceback (most recent call last): File "Expand Kerning.py", line 34 if value < 77000: TypeError: '<' not supported between instances of 'NoneType' and 'int'
Glyphs 3133