Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lib/matplotlib/dviread.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,15 +395,18 @@ def _xxx(self, special):
'debug')

def _fnt_def(self, k, c, s, d, a, l, n):
tfm = _tfmfile(n[-l:].decode('ascii'))
fontname = n[-l:].decode('ascii')
tfm = _tfmfile(fontname)
if tfm is None:
raise FileNotFoundError("missing font metrics file: %s" % fontname)
if c != 0 and tfm.checksum != 0 and c != tfm.checksum:
raise ValueError('tfm checksum mismatch: %s'%n)
# It seems that the assumption behind the following check is incorrect:
#if d != tfm.design_size:
# raise ValueError, 'tfm design size mismatch: %d in dvi, %d in %s'%\
# (d, tfm.design_size, n)

vf = _vffile(n[-l:].decode('ascii'))
vf = _vffile(fontname)

self.fonts[k] = DviFont(scale=s, tfm=tfm, texname=n, vf=vf)

Expand Down