Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
fix for #3669 Font issue without PyCXX#3671
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Looks like CharacterComplement doesn't return a unicode string so make it a bytestring in python3
mdboom commentedOct 20, 2014
Looks good. Thanks! |
fix for#3669 Font issue without PyCXX
mdboom commentedOct 20, 2014
characterComplement is essentially a bitfield. See here: http://www.microsoft.com/typography/otspec/pclt.htm If we wanted to provide a really Pythonic API to it, it would probably be a list of bools or something. But matplotlib itself doesn't even use this, and it's part of matplotlib's public API so I didn't want to change it (well, not intentionally). |
jenshnielsen commentedOct 20, 2014
Thanks for the explanation. I didn't manage to google a good explanation of CharacterComplement |
Thisfixes#3669 for me. It looks like CharacterComplement doesn't return a valid unicode string so make it a bytestring in python3
This happens to me for the standard matplotlib font matplotlib/mpl-data/fonts/ttf/Vera.ttf
not sure why it doesn't happen on travis.
In any case 'characterComplement' is '\xff\xff\xff\xff6\xff\xff\xfe628R00' for this font on both python2 and python3 which looks rather strange to me. I expected this to be a string of all chars that this font contains so perhaps there is a deeper issue?