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

Skip to content

Commit de8369b

Browse files
committed
Merged revisions 7803 via svnmerge from
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_99_maint ........ r7803 | mdboom | 2009-09-21 07:57:17 -0400 (Mon, 21 Sep 2009) | 1 line Fix 'variable used before defined' errors in backend_pdf.py building the docs ........ svn path=/trunk/matplotlib/; revision=7807
1 parent 7455c47 commit de8369b

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

lib/matplotlib/backends/backend_pdf.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -529,19 +529,18 @@ def writeFonts(self):
529529
if filename.endswith('.afm'):
530530
# from pdf.use14corefonts
531531
matplotlib.verbose.report('Writing AFM font', 'debug')
532-
fontdictObject = self._write_afm_font(filename)
532+
fonts[Fx] = self._write_afm_font(filename)
533533
elif self.dviFontInfo.has_key(filename):
534534
# a Type 1 font from a dvi file; the filename is really the TeX name
535535
matplotlib.verbose.report('Writing Type-1 font', 'debug')
536-
fontdictObject = self.embedTeXFont(filename, self.dviFontInfo[filename])
536+
fonts[Fx] = self.embedTeXFont(filename, self.dviFontInfo[filename])
537537
else:
538538
# a normal TrueType font
539539
matplotlib.verbose.report('Writing TrueType font', 'debug')
540540
realpath, stat_key = get_realpath_and_stat(filename)
541541
chars = self.used_characters.get(stat_key)
542542
if chars is not None and len(chars[1]):
543-
fontdictObject = self.embedTTF(realpath, chars[1])
544-
fonts[Fx] = fontdictObject
543+
fonts[Fx] = self.embedTTF(realpath, chars[1])
545544
self.writeObject(self.fontObject, fonts)
546545

547546
def _write_afm_font(self, filename):

0 commit comments

Comments
 (0)