Skip to content

Search for fonts in XDG directory as well. #13766

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

Merged
merged 3 commits into from
Mar 30, 2019
Merged

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Mar 26, 2019

PR Summary

It currently checks ~/.fonts, but not ~/.local/share/fonts, which fontconfig does do.

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • [?] New features are documented, with examples if plot related
  • [N/A] 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)
  • [N/A] Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

QuLogic added 2 commits March 26, 2019 04:38
It currently checks ~/.fonts, but not ~/.local/share/fonts, which
fontconfig does do.

# Precondition: the test font should not be available
fonts = findSystemFonts()
assert not any(font_test_file in font for font in fonts)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only to make sure that the test can run. It’s not part of the actual test condition. Shouldn‘t this better be a pytest.fail or pytest.skip?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, possibly. I just copied this test from the one below.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I've added a skip if this condition isn't met.

@timhoffm timhoffm added this to the v3.1.0 milestone Mar 30, 2019
@timhoffm timhoffm merged commit 2829d51 into matplotlib:master Mar 30, 2019
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Mar 30, 2019
dstansby added a commit that referenced this pull request Mar 30, 2019
…766-on-v3.1.x

Backport PR #13766 on branch v3.1.x (Search for fonts in XDG directory as well.)
@QuLogic QuLogic deleted the xdg-font branch March 30, 2019 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants