We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This bug happens when drawing a figure when using AFM fonts (ps.useafm=True) and setting ScalarFormatter(useMathText=True),
The _sanity_check() function in aft.py requires a BufferedReader, while the "_get_font()" function in mathext.py returns TextIOWrapper
if cached_font is None: fname = os.path.join(self.basepath, basename + ".afm") with open(fname, 'r') as fd: print(fd) cached_font = AFM(fd) cached_font.fname = fname self.fonts[basename] = cached_font self.fonts[cached_font.get_fontname()] = cached_font return cached_font
The line "with open(fname, 'r') as fd:" should be "with open(fname, 'rb') as fd:"
The text was updated successfully, but these errors were encountered:
Can you try with the 2.0.0b4 release?
This should be fixed by #6898
Sorry, something went wrong.
@lijunsun Thank you for taking the time to report this issue and suggest a solution!
No branches or pull requests
This bug happens when drawing a figure when using AFM fonts (ps.useafm=True) and setting ScalarFormatter(useMathText=True),
The _sanity_check() function in aft.py requires a BufferedReader, while the "_get_font()" function in mathext.py returns TextIOWrapper
if cached_font is None:
fname = os.path.join(self.basepath, basename + ".afm")
with open(fname, 'r') as fd:
print(fd)
cached_font = AFM(fd)
cached_font.fname = fname
self.fonts[basename] = cached_font
self.fonts[cached_font.get_fontname()] = cached_font
return cached_font
The line "with open(fname, 'r') as fd:" should be "with open(fname, 'rb') as fd:"
The text was updated successfully, but these errors were encountered: