-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
font.kerning.get() unnecessarily restricts types for default return value #723
Comments
according the docs it should either be a kern value or the fallback you can provide can also only be a int/float or None, nothing else... I guess its best to test on None:
|
Thanks for the explanation and the help.
This will not work when the pair in question has a kerning value of |
font.kerning.get()
allows for a default return value in case the pair is not present.However, this afternoon I discovered that fontParts puts an unnecessary restriction on what types it allows for the default value.
Where in former days of RoboFab the code below would happily work:
Now I was suddenly confronted with this cryptic traceback:
To me this seems an overly strict application of normalisation.
Just like in standard Python dictionaries, default return values should be passed along as they are.
The text was updated successfully, but these errors were encountered: