From 00e3a03861adf206eb4b8a36df2e2812d8621e8c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Wobst?= Date: Thu, 7 Jul 2011 21:09:24 +0000 Subject: [PATCH] fix for MS Windows: open virtual font files in binary mode git-svn-id: https://pyx.svn.sourceforge.net/svnroot/pyx/trunk/pyx@3181 069f4177-920e-0410-937b-c2a4a81bcd90 --- CHANGES | 2 ++ pyx/dvi/dvifile.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 72eb03d6..8d9caeae 100644 --- a/CHANGES +++ b/CHANGES @@ -107,6 +107,8 @@ TODO: - text module: - fix subprocess call on MS Windows (closefds not functional not also not required at all) + - dvifile module: + - fix for MS Windows: open virtual font files in binary mode - added the mpost (MetaPost) module: - create smooth paths from a series of points (TODO: documentation) diff --git a/pyx/dvi/dvifile.py b/pyx/dvi/dvifile.py index e4b2d979..b1e81237 100644 --- a/pyx/dvi/dvifile.py +++ b/pyx/dvi/dvifile.py @@ -220,7 +220,7 @@ class DVIfile: # check whether it's a virtual font by trying to open it. if this fails, it is an ordinary TeX font try: - fontfile = filelocator.open(fontname, [filelocator.format.vf]) + fontfile = filelocator.open(fontname, [filelocator.format.vf], mode="rb") except IOError: afont = texfont.TeXfont(fontname, c, q/self.tfmconv, d/self.tfmconv, self.tfmconv, self.pyxconv, self.debug>1) else: -- 2.11.4.GIT