Skip to content

pgf_pdflatex test fails on Windows #7160

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

Closed
Kojoley opened this issue Sep 22, 2016 · 12 comments · Fixed by #25576
Closed

pgf_pdflatex test fails on Windows #7160

Kojoley opened this issue Sep 22, 2016 · 12 comments · Fixed by #25576
Labels
backend: pgf status: inactive Marked by the “Stale” Github Action topic: testing
Milestone

Comments

@Kojoley
Copy link
Member

Kojoley commented Sep 22, 2016

We see it under appveyor and it happens to me locally.
I do not know when it started to fail, because test was disabled prior to #6757, but I will try to figure it out.

The problem seems related to font handling pgf_pdflatex.pdf

Baseline:
expected_pgf_pdflatex_pdf

Result:
pgf_pdflatex_pdf

Diff:
pgf_pdflatex_pdf-failed-diff

Baseline:
image

Result:
image

@tacaswell tacaswell added this to the 2.0.1 (next bug fix release) milestone Sep 22, 2016
@tacaswell
Copy link
Member

@Kojoley Thanks for looking into this.

These tests seem to be very sensitive to exactly how tex is set up.

attn @jenshnielsen @pwuertz

@tacaswell
Copy link
Member

If it proves to be too much of a time sink, maybe skip it so that the appveyor chcekmark is useful again while it gets sorted out?

@Kojoley
Copy link
Member Author

Kojoley commented Sep 22, 2016

If it proves to be too much of a time sink, maybe skip it so that the appveyor chcekmark is useful again while it gets sorted out?

I thought about the same.

I tried to solve this without any luck. It is the only test that uses pdflatex, I do not have ideas how it is related due to lack of knowledge in pdf generation.

@QuLogic
Copy link
Member

QuLogic commented Sep 22, 2016

Can you check the font properties on the produced PDFs? Maybe some font with slightly different attributes is being used.

@jenshnielsen
Copy link
Member

I think @QuLogic is right. If the right fonts are not available tex is very happy to select a different font. I had to install extra font packages to get the tests passing on travis

@Kojoley
Copy link
Member Author

Kojoley commented Sep 23, 2016

Can you check the font properties on the produced PDFs? Maybe some font with slightly different attributes is being used.

The pdf is in the first post.

>grep -a FontName expected_pgf_pdflatex.pdf

>grep -a FontName pgf_pdflatex.pdf
/FontName /FFANCX+CMMI10
/FontName /WFRFVK+CMMI12
/FontName /QTCKXR+CMR12
/FontName /GULNPR+CMR17
/FontName /RKDUWA+CMR7
/FontName /JBQCQC+CMSY10

>mgs -dNODISPLAY -q -dDumpMediaSizes -dDumpFontsUsed -dShowEmbeddedFonts -sFile=expected_pgf_pdflatex.pdf toolbin-pdf_info.ps

        expected_pgf_pdflatex.pdf has 1 page.

Creator: TeX
Producer: pdfTeX-1.40.16
CreationDate: D:20160909164742-04'00'
ModDate: D:20160909164742-04'00'
Trapped: False

Page 1 MediaBox: [0 0 460.8 345.6]     Page uses transparency features

Font or CIDFont resources used:
FFANCX+CMMI10
GULNPR+CMR17
JBQCQC+CMSY10
QTCKXR+CMR12
QTVKGX+SFSS1000
QZMGUO+SFRM2074
RKDUWA+CMR7
VRFAUY+SFRM1000
WFRFVK+CMMI12

>mgs -dNODISPLAY -q -dDumpMediaSizes -dDumpFontsUsed -dShowEmbeddedFonts -sFile=pgf_pdflatex.pdf toolbin-pdf_info.ps

        pgf_pdflatex.pdf has 1 page.

Creator: TeX
Producer: MiKTeX pdfTeX-1.40.17
CreationDate: D:20160921163710+03'00'
ModDate: D:20160921163710+03'00'
Trapped: False

Page 1 MediaBox: [0 0 460.8 345.6]     Page uses transparency features

Font or CIDFont resources used:
FFANCX+CMMI10
GULNPR+CMR17
JBQCQC+CMSY10
QTCKXR+CMR12
RKDUWA+CMR7
WFRFVK+CMMI12

toolbin-pdf_info.ps

Difference is

QTVKGX+SFSS1000
QZMGUO+SFRM2074
VRFAUY+SFRM1000

Looks like all the fonts from cm-super package. Installing it...

>python tests.py -v matplotlib.tests.test_backend_pgf:test_pdflatex
Python byte-compilation optimization level: 0
lib/matplotlib/tests/test_backend_pgf.py::test_pdflatex ... ok

----------------------------------------------------------------------
Ran 1 test in 1.552s

OK

🎉

I think @QuLogic is right. If the right fonts are not available tex is very happy to select a different font. I had to install extra font packages to get the tests passing on travis

Then we should somehow check if font required by test is available.

@Kojoley
Copy link
Member Author

Kojoley commented Sep 23, 2016

I have no luck at finding a conda recipe that includes cm-super. It is a problem because mpm --install=cm-super is slow

2016-09-23 16:02:04,112+0300 INFO  mpmcli - starting: mpmcli 2.9.5900 (MiKTeX 2.9)
2016-09-23 16:02:04,430+0300 INFO  mpmcli - starting package maintenance...
2016-09-23 16:02:04,430+0300 INFO  mpmcli - installation directory: C:\Users\user\AppData\Roaming\MiKTeX\2.9
2016-09-23 16:02:04,430+0300 INFO  mpmcli - package repository: http://ftp.cvut.cz/tex-archive/systems/win32/miktex/tm/packages/
2016-09-23 16:02:04,527+0300 INFO  mpmcli - lightweight database digest: 2cf14e05da49fc90f50f32d20cfa5a5a
2016-09-23 16:02:04,527+0300 INFO  mpmcli - going to download 64797738 bytes
2016-09-23 16:02:04,527+0300 INFO  mpmcli - going to install 840 file(s) (1 package(s))
2016-09-23 16:02:04,532+0300 INFO  mpmcli - downloading http://ftp.cvut.cz/tex-archive/systems/win32/miktex/tm/packages/cm-super.tar.lzma...
2016-09-23 16:05:34,928+0300 INFO  mpmcli - 64797738 bytes, 300.85 KB/Sec
2016-09-23 16:05:35,073+0300 INFO  mpmcli - extracting files from cm-super.tar.lzma...
2016-09-23 16:05:46,090+0300 INFO  mpmcli - Package "cm-super" has been successfully installed.

and appveyor cache size is limited to 100MB. Actually I cannot find mpm cache location too.

@jenshnielsen
Copy link
Member

We might want to consider just turning up the tolerance and accept that the pgf tests are basically only smoke test. The right solution would be to check for the installed latex packages and fonts but I suspect that would be a lot of work.

@Kojoley
Copy link
Member Author

Kojoley commented Sep 25, 2016

We might want to consider just turning up the tolerance and accept that the pgf tests are basically only smoke test.

Maybe it is acceptable just to download these 3 fonts instead of the whole cm-super package?

The right solution would be to check for the installed latex packages and fonts but I suspect that would be a lot of work.

>fc-cat | grep SFRM1000
"sfrm1000.pfb" 0 "Computer Modern:style=Roman:slant=0:weight=100:width=100:foundry=unknown:index=0:outline=True:scalable=True:charset=20-7e a0-ff 102-107 10c-10f 111 118-11b 11e-11f 130-133 139-13a 13d-13e 141-144 147-148 14a-14b 150-155 158-15b 15e-165 16e-171 178-17e 192 21a-21b 2c6-2c7 2c9 2ce-2cf 2d8-2dd 335 3a9 3bc 401-402 404-40b 40e-44f 451-452 454-45b 45e-45f 462-463 46a-46b 474-475 48c-4c0 4c3-4c4 4c7-4c8 4cb-4cc 4d4-4d5 4d8-4d9 4e0-4e1 4e8-4e9 e3f 200c 2013-2014 2016 2018-201a 201c-201e 2020-2022 2026 2030-2031 2039-203b 203d 2044-2046 20a1 20a4 20a6 20a9 20ab-20ac 2103 2116-2117 2120 2122 2126-2127 212e 2190-2193 2212 2215 2217 2219-221a 2329-232a 2422-2423 25cb 25e6 266a 301a-301b f6be f6c9-f6cb f6ce-f6d0 f6d4-f6d6 f6de f724 f730-f739 f7a2 fb00-fb04:lang=aa|ab|av|ay|ba|be|bg|bi|br|bua|ce|ch|co|cs|da|de|en|es|et|eu|fi|fj|fo|fr|fur|fy|gd|gl|gv|ho|hu|ia|id|ie|ik|io|is|it|kaa|kk|kum|ky|lb|lez|mg|nb|nds|nl|nn|no|nr|nso|oc|om|os|pl|pt|rm|ru|sah|sel|sk|sma|smj|so|sq|sr|ss|st|sv|sw|tk|tl|tn|tr|ts|tt|tyv|uk|uz|vo|vot|wa|wen|wo|xh|yap|zu|an|crh|csb|fil|hsb|ht|jv|kj|ku-tr|kwm|lg|li|mn-mn|ms|ng|pap-an|pap-aw|rn|rw|sc|sg|sn|su|za:fontversion=0:decorative=False:postscriptname=SFRM1000:color=False:symbol=False"

@jenshnielsen
Copy link
Member

I think there are 2 separate concerns

  • Make it pass on Appveyor ( for this just manually installing the fonts is fine if the concern below can be solved)
  • Skip/know fail the tests if the right fonts aer not installed.

@Kojoley
Copy link
Member Author

Kojoley commented Sep 25, 2016

I tried to download fonts manually and place it to %USERPROFILE%\.font or %windir%\Fonts without any luck (https://ci.appveyor.com/project/Kojoley/matplotlib/build/1.0.9).
I just have noticed that mpm is so slow not because of mirror/internet, but because it loads CPU to 100% (https://sourceforge.net/p/miktex/bugs/2402/).
So I think it is better just disable the test for windows as for now.

@QuLogic QuLogic modified the milestones: 2.1 (next point release), 2.0.1 (next bug fix release) Oct 12, 2016
@tacaswell tacaswell modified the milestones: 2.1 (next point release), 2.1.1 (next bug fix release) Sep 24, 2017
@tacaswell tacaswell modified the milestones: 2.1.1 (next bug fix release), 2.2 (next feature release) Oct 9, 2017
@github-actions
Copy link

This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!

@github-actions github-actions bot added the status: inactive Marked by the “Stale” Github Action label Mar 30, 2023
QuLogic added a commit to QuLogic/matplotlib that referenced this issue Mar 30, 2023
QuLogic added a commit to QuLogic/matplotlib that referenced this issue Mar 30, 2023
@QuLogic QuLogic modified the milestones: future releases, v3.8.0 Mar 30, 2023
Higgs32584 pushed a commit to Higgs32584/matplotlib that referenced this issue Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend: pgf status: inactive Marked by the “Stale” Github Action topic: testing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants