Pass explicit font paths to fontspec in backend_pgf.#10339
Pass explicit font paths to fontspec in backend_pgf.#10339timhoffm merged 1 commit intomatplotlib:masterfrom
Conversation
|
Hi, thanks a lot for the work. This time it worked like a charm. I tried different parameters and the code worked every time. I'm looking forward to see your improvements merged upstream. If you need further testing on macOS, please let me know. |
jklymak
left a comment
There was a problem hiding this comment.
This seems fine to me, and glad it fixes the pdf issue...
9b8d6f1 to
a0313ec
Compare
4dc3ed1 to
b002924
Compare
| # backslashes. 2) The dirname needs to include a separator. | ||
| dirname = Path(fm.findfont(family)).parent.as_posix() + "/" | ||
| latex_fontspec.append( | ||
| r"\%s{%s}[Path=%s]" % (command, basename, dirname)) |
There was a problem hiding this comment.
basename seems undefined. Apparently an untested code path 😦
| """Build fontspec preamble from rc.""" | ||
| latex_fontspec = [] | ||
| texcommand = get_texcommand() | ||
| texcommand = rcParams["pgf.texsystem"] |
There was a problem hiding this comment.
Do we explicitly not want the check and fallback mechanism to xelatex, which was implemented in get_texcommand?
There was a problem hiding this comment.
That does already get checked during standard rcparam validation.
timhoffm
left a comment
There was a problem hiding this comment.
Conditional on CI.
Bonus points if you want to add a test for the pgf.rcfonts code path.
|
I'll skip the bonus points. |
PR Summary
xref #10307. @laborleben Can you check whether this works for you? Seems better than continuously posting patches :)
Basically
PR Checklist