Skip to content

Commit 6354bfc

Browse files
committed
Fix font embedding on Windows.
svn path=/branches/v0_91_maint/; revision=5136
1 parent 1f24714 commit 6354bfc

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
2008-05-14 Don't use stat on Windows (fixes font embedding problem) - MGD
2+
13
2008-05-09 Fix /singlequote (') in Postscript backend - MGD
24

35
2008-05-08 Fix kerning in SVG when embedding character outlines - MGD

lib/matplotlib/cbook.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,11 @@ def __call__(self, path):
412412
result = self._cache.get(path)
413413
if result is None:
414414
realpath = os.path.realpath(path)
415-
stat = os.stat(realpath)
416-
stat_key = (stat.st_ino, stat.st_dev)
415+
if sys.platform == 'win32':
416+
stat_key = realpath
417+
else:
418+
stat = os.stat(realpath)
419+
stat_key = (stat.st_ino, stat.st_dev)
417420
result = realpath, stat_key
418421
self._cache[path] = result
419422
return result

0 commit comments

Comments
 (0)