Skip to content

Commit 0d4c60b

Browse files
authored
Merge pull request #19333 from QuLogic/pgf-special-chars
Fix PGF with special character paths.
2 parents e6479bd + 3431a22 commit 0d4c60b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/backend_pgf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def get_fontspec():
5050
# 1) Forward slashes also work on Windows, so don't mess with
5151
# backslashes. 2) The dirname needs to include a separator.
5252
path = pathlib.Path(fm.findfont(family))
53-
latex_fontspec.append(r"\%s{%s}[Path=%s]" % (
53+
latex_fontspec.append(r"\%s{%s}[Path=\detokenize{%s}]" % (
5454
command, path.name, path.parent.as_posix() + "/"))
5555

5656
return "\n".join(latex_fontspec)

0 commit comments

Comments
 (0)