Skip to content

pgf_pdflatex test fails on Windows #7160

Closed

Description

@Kojoley

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

Activity

  1. added this to the milestone on Sep 22, 2016
  2. tacaswell commented on Sep 22, 2016

    @tacaswell
    Member

    @Kojoley Thanks for looking into this.

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

    attn @jenshnielsen @pwuertz

  3. tacaswell commented on Sep 22, 2016

    @tacaswell
    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?

  4. Kojoley commented on Sep 22, 2016

    @Kojoley
    MemberAuthor

    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.

  5. QuLogic commented on Sep 22, 2016

    @QuLogic
    Member

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

  6. jenshnielsen commented on Sep 23, 2016

    @jenshnielsen
    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

  7. Kojoley commented on Sep 23, 2016

    @Kojoley
    MemberAuthor

    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.

  8. Kojoley commented on Sep 23, 2016

    @Kojoley
    MemberAuthor

    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.

  9. jenshnielsen commented on Sep 25, 2016

    @jenshnielsen
    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.

  10. Kojoley commented on Sep 25, 2016

    @Kojoley
    MemberAuthor

    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"
    
  11. jenshnielsen commented on Sep 25, 2016

    @jenshnielsen
    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.
  12. Kojoley commented on Sep 25, 2016

    @Kojoley
    MemberAuthor

    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.

  13. modified the milestones: , on Oct 12, 2016
  14. modified the milestones: , on Sep 24, 2017
  15. modified the milestones: , on Oct 9, 2017
  16. github-actions commented on Mar 30, 2023

    @github-actions

    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!

  17. added 2 commits that reference this issue on Mar 30, 2023
    6686a77
    5134427
  18. added a commit that references this issue on Apr 17, 2023
    e5489e5
  19. added a commit that references this issue on Apr 19, 2026
    9731700
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions