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
PDF Embedded fonts with python3 mpl reported as 'Unknown' by pdffonts and pdf readers #3049
Comments
This is also an issue for me. |
@jkseppan - any ideas on this? |
@jclevesque - can you make the offending pdf file available at some web address? I'd like to peek inside. My guess is that because of Python 3's unicode-vs-bytes differentiation the font name gets encoded in a different encoding than before (e.g. UCS-2 vs ASCII) but I don't have a Python 3 installation handy to test on. |
I attached an example of offending pdf along with the Python3 script used 2014-06-18 7:20 GMT-04:00 Jouni K. Seppänen notifications@github.com:
|
@audurand - Sorry, I can't see the pdf file linked from this github issue. Could you either put it up on Dropbox or similar, or email it directly to me at jks@iki.fi? |
Here is an example of offending pdf along with the Python3 script used to 2014-07-09 2:15 GMT-04:00 Jouni K. Seppänen notifications@github.com:
|
I can reproduce this issue. But only with |
Yes, it seems to be related to the AFM parsing in type1font.py. |
Communicate token types as objects instead of strings from the tokenizer to the parser. Use proper Unicode strings for string-like data in the font properties. Fix the handling of delimiters. Resolves matplotlib#3049.
Say I want to save a PDF figure with a simple script :
If I run this script with python2, then the output of
pdffonts test.pdf
is the following :However, if I run the script with python3, then the output of
pdffonts test.pdf
becomes :Both figures are visually identical. This is a problem for me because I'm trying to make sure my PDFs contain only the allowed font types for a conference paper submission.
This is with matplotlib 1.3 for both python 2.7.3 and python 3.2.3.
The text was updated successfully, but these errors were encountered: