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

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
timhoffm merged 1 commit intomatplotlib:masterfromanntzer:pgf-fontspec
May 6, 2018

Conversation

anntzer
Copy link
Contributor

PR Summary

xref#10307.@laborleben Can you check whether this works for you? Seems better than continuously posting patches :)

Basically

  1. we already have a font fonding mechanism and should just reuse it in backend_pgf.
  2. we sometimes find fonts in nonstandard locations and may need to tell tex exactly where to find them.

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@laborleben
Copy link

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.

@anntzeranntzer added this to thev2.2 milestoneJan 29, 2018
Copy link
Member

@jklymakjklymak left a 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...

@anntzeranntzer modified the milestones:needs sorting,v3.0Feb 17, 2018
@anntzeranntzerforce-pushed thepgf-fontspec branch 2 times, most recently from4dc3ed1 tob002924CompareMay 3, 2018 02:50
# 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))
Copy link
Member

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 😦

Copy link
ContributorAuthor

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"]
Copy link
Member

@timhoffmtimhoffmMay 6, 2018
edited
Loading

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 inget_texcommand?

Copy link
ContributorAuthor

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.

Copy link
Member

@timhoffmtimhoffm left a 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.

@anntzer
Copy link
ContributorAuthor

I'll skip the bonus points.

@timhoffmtimhoffm merged commitbdeb21e intomatplotlib:masterMay 6, 2018
@anntzeranntzer deleted the pgf-fontspec branchMay 6, 2018 21:02
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jklymakjklymakjklymak approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.0.0
Development

Successfully merging this pull request may close these issues.

4 participants
@anntzer@laborleben@jklymak@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp