Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0bff071 commit 877fe08Copy full SHA for 877fe08
lib/matplotlib/backends/backend_pgf.py
@@ -50,9 +50,14 @@ def get_fontspec():
50
for family, command in zip(families, commands):
51
# 1) Forward slashes also work on Windows, so don't mess with
52
# backslashes. 2) The dirname needs to include a separator.
53
- path = pathlib.Path(fm.findfont(family))
54
- latex_fontspec.append(r"\%s{%s}[Path=\detokenize{%s}]" % (
55
- command, path.name, path.parent.as_posix() + "/"))
+ try:
+ path = pathlib.Path(
+ fm.findfont(family, fallback_to_default=False))
56
+ except ValueError:
57
+ pass
58
+ else:
59
+ latex_fontspec.append(r"\%s{%s}[Path=\detokenize{%s}]" % (
60
+ command, path.name, path.parent.as_posix() + "/"))
61
62
return "\n".join(latex_fontspec)
63
0 commit comments