-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Pass explicit font paths to fontspec in backend_pgf. #10339
New issue
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
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
basename
seems undefined. Apparently an untested code path 😦
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, fixed
@@ -77,23 +58,20 @@ def _parse_lualatex_version(output): | |||
def get_fontspec(): | |||
"""Build fontspec preamble from rc.""" | |||
latex_fontspec = [] | |||
texcommand = get_texcommand() | |||
texcommand = rcParams["pgf.texsystem"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That does already get checked during standard rcparam validation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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