-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Error with greek letters in pdf export when using usetex=True and mathptmx #16087
Comments
Can you try with different pdf viewers? If I download your pdfs and look at them in chrome or okular (or docview in emacs) the look correct. If I squint, I could believe that the line is a very distorted version of phi. I took a quick look at the API and release notes for 1.5.0 and nothing jumped out at me as being related. |
With Adobe reader another error is displayed. The reader message is that the font "StandardSymL_Slant_167" could not be extracted (attached Screenshot). For me it sounds simmilar to issue #11259 |
Any ideas how to debug this problem a little bit more? #9139 seams to be very similar |
attn @arm2arm from #16894 as well. If anyone has access to Acrobat Pro, can you try running preflight (https://helpx.adobe.com/acrobat/using/analyzing-documents-preflight-tool-acrobat.html) on one of the "bad" pdf docs and see what comes out? |
pdf and report |
So Adobe is just complaining about some bad glyph widths. This can be fixed manually, as I've done in the attached file here: test.1.pdf But locally Acrobat DC still fails to open the new file. Is that also the case for you? I'm also confused that apparently preflight does extract the glyphs just fine, but for some reason the pdf viewer refuses to display them. |
Well, that's annoying because we can't even know why Acrobat complains about that file (as you mention, edge is happy with it; on linux, poppler and mupdf-based readers are fine too, as is chromium). Any chance you could contact Adobe to ask them what's wrong with the file, or whether it's something on their side? |
This was a weird one! I compared to the output of pdftex, and the only major differences in the embedded font I saw were:
vs. pdftex's
Because Type 1 is a subset of PostScript and PostScript interpreters typically only support single-precision floating point, I suspect that their parsers return some bogus value for I'm preparing a patch, but in the meanwhile people with other pdf readers could see if the attached file works better. |
When I export a pdf with savefig I have errors in the greek letters, but only in the pdf the png export is fine. I use the option "usetex=True" and the package "mathptmx".
With the provided code you will get a png and a pdf file. In the pdf file the \varphi symbol in the legend is only a long line. With version 2.2.4 and 1.5.3 this happens. With Version 1.4.3 the pdf and the png is fine.
Matplotlib version
All instalations done via macports.
Attached the output files:
Version 1.4.3
mpl_1.4.3.pdf
Version 1.5.3
mpl_1.5.3.pdf
Version 2.2.4
mpl_2.2.4.pdf
Screenshot of error in pdf
The text was updated successfully, but these errors were encountered: