Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitde6c955

Browse files
committed
Convert path to str in FontManager.addpath
1 parentf33f5ab commitde6c955

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎lib/matplotlib/font_manager.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,6 +1091,8 @@ def addfont(self, path):
10911091
----------
10921092
path : str or path-like
10931093
"""
1094+
path=str(path)# Convert to string in case of a path as
1095+
# afmFontProperty and FT2Font expect this
10941096
ifPath(path).suffix.lower()==".afm":
10951097
withopen(path,"rb")asfh:
10961098
font=_afm.AFM(fh)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp