Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 16c22dc

Browse files
committed
Some refactoring of dviread, plus a reader for psfonts.map format files
svn path=/trunk/matplotlib/; revision=3767
1 parent 4ea152b commit 16c22dc

2 files changed

Lines changed: 374 additions & 170 deletions

File tree

lib/matplotlib/backends/backend_pdf.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,9 +1288,8 @@ def _draw_tex(self, gc, x, y, s, prop, angle):
12881288
texmanager = self.get_texmanager()
12891289
fontsize = prop.get_size_in_points()
12901290
dvifile = texmanager.make_dvi(s, fontsize)
1291-
dvi = Dvi(dvifile)
1292-
dvi.read()
1293-
text, boxes = dvi.output(72)
1291+
dvi = Dvi(dvifile, 72)
1292+
text, boxes = iter(dvi).next()
12941293
fontdir = os.path.join(get_data_path(), 'fonts', 'ttf')
12951294

12961295
if angle == 0: # avoid rounding errors in common case

0 commit comments

Comments
 (0)