Deterministic LaTeX text in SVG images #5766

Merged
merged 1 commit into from Dec 30, 2015

Conversation

Projects
None yet
5 participants

ksemb commented Dec 30, 2015

Provides deterministic SVG output in the presence of LaTeX text.

@ksemb ksemb Deterministic SVG LaTeX text
ef00f56
Owner

mdboom commented Dec 30, 2015

👍

Member

WeatherGod commented Dec 30, 2015

Why is this milestoned for 1.5.1? This requires py2.7+ due to the use of OrderedDict().

Owner

mdboom commented Dec 30, 2015

@WeatherGod: Thanks for catching. I was just thinking "bugfix", but you're right, we still technically support py2.6 on 1.5.

@WeatherGod WeatherGod added a commit that referenced this pull request Dec 30, 2015

@WeatherGod WeatherGod Merge pull request #5766 from ksemb/master
Deterministic LaTeX text in SVG images
c708029

@WeatherGod WeatherGod merged commit c708029 into matplotlib:master Dec 30, 2015

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 68.476%
Details

tacaswell removed the needs_review label Dec 30, 2015

@WeatherGod WeatherGod added a commit that referenced this pull request Dec 30, 2015

@WeatherGod WeatherGod Merge pull request #5766 from ksemb/master
Deterministic LaTeX text in SVG images
4ca39f7
Member

WeatherGod commented Dec 30, 2015

cherry-picked to 2.x as 4ca39f7

Member

QuLogic commented Dec 31, 2015

This doesn't appear to be working.

Member

WeatherGod commented Dec 31, 2015

I doubt it is actually because of the test. The logs show a whole bunch of
other things going wrong while the font-cache is getting built. I restarted
one of the builds to see if the problem resolves itself.

On Thu, Dec 31, 2015 at 12:18 AM, Elliott Sales de Andrade <
notifications@github.com> wrote:

This doesn't appear to be working
https://travis-ci.org/matplotlib/matplotlib/builds/99481118.


Reply to this email directly or view it on GitHub
#5766 (comment)
.

Member

WeatherGod commented Dec 31, 2015

Hmmm, it is repeatable. Here is the error that is coming up:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/travis/build/matplotlib/matplotlib/venv/lib/python2.7/site-packages/matplotlib-1.5.0+233.g4ca39f7-py2.7-linux-x86_64.egg/matplotlib/tests/test_backend_svg.py", line 146, in _test_determinism_save
    FigureCanvasSVG(fig).print_svg(filename)
  File "/home/travis/build/matplotlib/matplotlib/venv/lib/python2.7/site-packages/matplotlib-1.5.0+233.g4ca39f7-py2.7-linux-x86_64.egg/matplotlib/backends/backend_svg.py", line 1220, in print_svg
    return self._print_svg(filename, svgwriter, fh_to_close, **kwargs)
  File "/home/travis/build/matplotlib/matplotlib/venv/lib/python2.7/site-packages/matplotlib-1.5.0+233.g4ca39f7-py2.7-linux-x86_64.egg/matplotlib/backends/backend_svg.py", line 1248, in _print_svg
    self.figure.draw(renderer)
  File "/home/travis/build/matplotlib/matplotlib/venv/lib/python2.7/site-packages/matplotlib-1.5.0+233.g4ca39f7-py2.7-linux-x86_64.egg/matplotlib/artist.py", line 62, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/home/travis/build/matplotlib/matplotlib/venv/lib/python2.7/site-packages/matplotlib-1.5.0+233.g4ca39f7-py2.7-linux-x86_64.egg/matplotlib/figure.py", line 1159, in draw
    func(*args)
  File "/home/travis/build/matplotlib/matplotlib/venv/lib/python2.7/site-packages/matplotlib-1.5.0+233.g4ca39f7-py2.7-linux-x86_64.egg/matplotlib/artist.py", line 62, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/home/travis/build/matplotlib/matplotlib/venv/lib/python2.7/site-packages/matplotlib-1.5.0+233.g4ca39f7-py2.7-linux-x86_64.egg/matplotlib/axes/_base.py", line 2389, in draw
    a.draw(renderer)
  File "/home/travis/build/matplotlib/matplotlib/venv/lib/python2.7/site-packages/matplotlib-1.5.0+233.g4ca39f7-py2.7-linux-x86_64.egg/matplotlib/artist.py", line 62, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/home/travis/build/matplotlib/matplotlib/venv/lib/python2.7/site-packages/matplotlib-1.5.0+233.g4ca39f7-py2.7-linux-x86_64.egg/matplotlib/axis.py", line 1142, in draw
    self.label.draw(renderer)
  File "/home/travis/build/matplotlib/matplotlib/venv/lib/python2.7/site-packages/matplotlib-1.5.0+233.g4ca39f7-py2.7-linux-x86_64.egg/matplotlib/artist.py", line 62, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/home/travis/build/matplotlib/matplotlib/venv/lib/python2.7/site-packages/matplotlib-1.5.0+233.g4ca39f7-py2.7-linux-x86_64.egg/matplotlib/text.py", line 792, in draw
    mtext=mtext)
  File "/home/travis/build/matplotlib/matplotlib/venv/lib/python2.7/site-packages/matplotlib-1.5.0+233.g4ca39f7-py2.7-linux-x86_64.egg/matplotlib/backends/backend_svg.py", line 1166, in draw_tex
    self._draw_text_as_path(gc, x, y, s, prop, angle, ismath="TeX")
  File "/home/travis/build/matplotlib/matplotlib/venv/lib/python2.7/site-packages/matplotlib-1.5.0+233.g4ca39f7-py2.7-linux-x86_64.egg/matplotlib/backends/backend_svg.py", line 966, in _draw_text_as_path
    return_new_glyphs_only=True)
  File "/home/travis/build/matplotlib/matplotlib/venv/lib/python2.7/site-packages/matplotlib-1.5.0+233.g4ca39f7-py2.7-linux-x86_64.egg/matplotlib/textpath.py", line 347, in get_glyphs_tex
    font.select_charmap(charmap_code)
RuntimeError: In select_charmap: Could not set the charmap
Member

WeatherGod commented Dec 31, 2015

and i just now noticed #5770

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment